OUT-4083: cover untested error and guard branches in sync + webhook - #139
Merged
Conversation
- createAndUploadFileInDropbox returns the existing folder id without uploading when the folder already exists in Dropbox. - handleChannelMap records the Dropbox root folder id for a valid folder, and rejects a non-folder root path with a 400. - completePendingAssemblyCreate stamps the Assembly file id before uploading, so a "file created" echo dedupes against the row (asserted via upload-time read). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
updateChannelMap only updates the channel when the root path matches exactly; a moved/stale root path matches nothing and leaves the row unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- handleDropboxEvents skips an account with no active connection (asserts the sync is never triggered), and skips when a webhook is already pending even past the debounce window. - fetchDropBoxChanges returns early when the connection is missing or has no refresh token, before the end-of-sync timestamp is stamped. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Greptile SummaryThis test-only PR expands integration coverage for defensive sync, channel-map, and Dropbox webhook behavior.
Confidence Score: 5/5The PR appears safe to merge because it only adds focused integration tests and no actionable defects were identified. The added fixtures, mocks, and assertions reach the intended production guard and ordering branches while remaining consistent with the repository’s test isolation and request-handler conventions. Important Files Changed
Reviews (1): Last reviewed commit: "test(OUT-4083): cover webhook debounce +..." | 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 & why
A coverage pass found a few defensive branches the existing tests never reached. This adds integration tests for them. Test-only — no production changes, and it fits the existing harness.
Linear: OUT-4083
Coverage (9 new tests)
Sync.service create / root-path guards
Channel map
Webhook debounce + fetch
Notes
onUnhandledRequest:'error'; the stamp-before-upload and no-active-connection tests use call-time reads / trigger spies so they fail if the guard regresses.Testing
pnpm typecheck✅ ·pnpm lint✅ ·pnpm test→ 192 passed ✅pnpm test:integration→ 179 passed ✅ (was 170; +9)🤖 Generated with Claude Code