fix(ingestion): R5 — deep-merge document metadata instead of full replace#408
Merged
Conversation
…lace Stop worker/commit paths from clobbering concurrent renames and agent patches by merging worker-owned metadata deltas onto live JSONB. KNOWN GAP: supabase/drift-manifest.json not regenerated — Docker Desktop cannot start on this host. Do not merge until npm run drift:manifest is green. Co-authored-by: Cursor <cursoragent@cursor.com>
…ct tests JSON null in jsonb_merge_deep now clears sticky error/gate fields that full-replace used to wipe. Worker falls back to a shallow live merge when the R5 RPC is missing, and tests lock the owned-delta contract. Co-authored-by: Cursor <cursoragent@cursor.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
CI verify failed solely on format:check for the new R5 test file. Co-authored-by: Cursor <cursoragent@cursor.com>
Local Docker Desktop/WSL cannot start on this host, so regenerate supabase/drift-manifest.json on ubuntu-latest and download the artifact. Co-authored-by: Cursor <cursoragent@cursor.com>
Local Docker Desktop cannot start (WSL service unavailable). Push a path-filtered regen workflow and marker file so ubuntu-latest can produce supabase/drift-manifest.json as an artifact. Co-authored-by: Cursor <cursoragent@cursor.com>
Regenerated via CI (ubuntu Docker) because local Docker Desktop/WSL cannot start. schema_sha256 now matches supabase/schema.sql after the jsonb_merge_deep / apply_document_metadata_patch additions. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Updates to Preview Branch (claude/r5-worker-metadata-clobber) ↗︎
Tasks are run on every commit but only new migration files are pushed.
❌ Branch Error • Wed, 08 Jul 2026 17:14:23 UTC View logs for this Workflow Run ↗︎. |
Co-authored-by: Cursor <cursoragent@cursor.com>
BigSimmo
enabled auto-merge (squash)
July 8, 2026 17:04
Co-authored-by: Cursor <cursoragent@cursor.com>
Drift manifest is refreshed; remove the path-triggered helper workflow so standard pull_request CI runs again on this PR. Co-authored-by: Cursor <cursoragent@cursor.com>
Regenerated from merged schema.sql (R5 metadata merge + R17/R406 main). Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
docs/ingestion-concurrency-fix-workorder.md:commit_document_index_generationand workerupdateDocumentno longer full-replacedocuments.metadata.jsonb_merge_deep+apply_document_metadata_patch; commit RPC mergesp_metadataonto live metadata.tests/document-metadata-merge.test.ts.Deploy order
Known gap — do not merge yet
supabase/drift-manifest.jsonis not regenerated here. Docker Desktop on this host fails withDocker Desktop is unable to start.tests/drift-detection.test.tswill fail CI untilnpm run drift:manifestis run against thisschema.sqlfrom an environment with a working Docker daemon.Intentionally not included
Test plan
npx vitest run tests/document-metadata-merge.test.tsnpm run drift:manifestonce Docker works, then re-pushnpm run check:driftworker:oncecommit preserves a concurrent rename key