OUT-4045: channel-map mismatch + resync query guards - #132
Open
SandipBajracharya wants to merge 1 commit into
Open
OUT-4045: channel-map mismatch + resync query guards#132SandipBajracharya wants to merge 1 commit into
SandipBajracharya wants to merge 1 commit into
Conversation
Direct-DB integration tests: getOrCreateChannelMap conflict (400 on partial match) vs returns-existing on full match; listFormattedChannelMap bulk soft-deletes stale channel maps and their file rows (Copilot faked via MSW) while keeping live ones; and the remaining resyncFailedFilesForChannel guards (missing active connection -> 404; a trigger failure clears resyncingAt and rethrows). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Greptile SummaryThe PR adds direct-database integration coverage for channel-map mismatch handling, stale-map cascading soft deletion, and resync guard behavior.
Confidence Score: 5/5The PR appears safe to merge, with no concrete defects identified in the added integration tests. The tests use the repository’s established database and mock cleanup mechanisms, and their fixtures reach the intended channel-map and resync service branches without altering production behavior. Important Files Changed
Reviews (1): Last reviewed commit: "test(OUT-4045): add channel-map mismatch..." | Re-trigger Greptile |
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 (Testcontainers Postgres + MSW for Copilot) for the channel-map mismatch guard, the stale channel-map bulk soft-delete, and the remaining resync guards (OUT-4045).
test/flows/channel-map-resync-guards.integration.test.ts(5 tests):getOrCreateChannelMapassemblyChannelId) but the other (dbxRootPath) differslistFormattedChannelMap(Copilot faked via MSW)deletedAt+status=false), cascading to theirfileFolderSyncrows, while the live channel and its rows are returned and untouched. Mocks/v1/channels/files+/v1/companiesinline.resyncFailedFilesForChannel(the 404-unknown-channel and 409-already-resyncing guards are already covered in the resync-sweep suite; these are the remaining paths)resyncingAtand rethrows — the spy assertsresyncingAtwas set before throwing, proving the full set→clear cycleWhy
Part of the DB-integration suite (parent OUT-4042). Partial-unique conflict, the transactional cascade, and the resync guard branches are real behaviors mocks can't reproduce, so they run against a container DB.
Verification
pnpm test:integration test/flows/channel-map-resync-guards.integration.test.ts→ 5/5 passpnpm typecheckclean ·pnpm lintcleanNotes
OUT-4044(stack: OUT-4041 → OUT-4043 → OUT-4044 → OUT-4045).🤖 Generated with Claude Code