OUT-4043: file-map insert conflict + concurrent-insert race - #129
Open
SandipBajracharya wants to merge 2 commits into
Open
OUT-4043: file-map insert conflict + concurrent-insert race#129SandipBajracharya wants to merge 2 commits into
SandipBajracharya wants to merge 2 commits into
Conversation
… tests Direct-DB integration tests for MapFilesService.insertFileMap / insertCreatePending against Testcontainers Postgres: null on partial-unique path conflict, the concurrent same-path insert race (exactly one row wins), the generated item_path_lower column, and the dbxFileId update on conflict (IS DISTINCT FROM, null-safe). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Greptile SummaryAdds direct-Postgres integration coverage for file-map insertion and create-pending conflict behavior.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains. Important Files Changed
Reviews (2): Last reviewed commit: "test(OUT-4043): cover case-variant path ..." | Re-trigger Greptile |
Greptile P2: the conflict-update cases used identical casing, so a case-sensitive regression in the update's lower(itemPath)=lower(payload) lookup would leave dbxFileId stale for case-variant paths undetected. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Collaborator
Author
|
@greptileai review again |
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.
What
Direct-DB integration tests for
MapFilesService.insertFileMap/insertCreatePendingagainst Testcontainers Postgres — covering the behaviors where the database itself is the risk (OUT-4043).test/flows/file-map-insert.integration.test.ts(12 tests):insertFileMapitem_path_lowercolumnnullon a partial-unique path conflict (case-insensitive viaitem_path_lower)insertCreatePendingnullwhen a live row already exists at the pathdbxFileIdon conflict for an ASSEMBLY create — null → value (NULL-safeIS DISTINCT FROM)dbxFileIdon conflict when it changes from one non-null id to anotherupdatedAtuntouched)dbxFileIduntouched when the target is DROPBOXdbxFileIduntouched when the newdbxFileIdis nullWhy
Part of the DB-integration test suite (parent OUT-4042). These behaviors — partial-unique indexes, the generated column, concurrent-insert serialization, and
IS DISTINCT FROMnull semantics — are real Postgres behaviors that mocks can't reproduce, so they run against a real container DB.Verification
pnpm test:integration test/flows/file-map-insert.integration.test.ts→ 12/12 passpnpm lintclean ·pnpm typecheckcleanNotes
Base is
OUT-4041(stacked). Reviewed by fullstack-code-reviewer — no correctness issues; its two actionable items (added the non-null→non-null update case, renamed "tombstone"→"placeholder") are applied.🤖 Generated with Claude Code