OUT-4040: L1.3 — Assembly webhook flow tests - #127
Merged
Conversation
mockDropboxDeleteFile captures the deleted paths, proven by a harness test driving the real filesDeleteV2 client method. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Drive AssemblyWebhookService directly: create uploads to Dropbox and records the mapping; delete removes the Dropbox file (verifying the exact deleted path) and soft-deletes the row; update replaces the Dropbox file. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…p + guards) Drive the route POST: skips a created-event echo of our own in-flight create (scoped by path), proceeds otherwise, and honours the event guards (non-handleable, non-syncable object, already-deleted, no-op update, sync-disabled, missing account). Skip cases register no Dropbox handlers so a stray call trips onUnhandledRequest; unchanged updatedAt proves no write. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Greptile SummaryAdds integration coverage for the Assembly-to-Dropbox webhook flow and its ping-pong deduplication behavior.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains. Important Files Changed
Sequence DiagramsequenceDiagram
participant A as Assembly webhook
participant C as Webhook controller
participant S as AssemblyWebhookService
participant D as Dropbox
participant DB as Postgres
A->>C: File event
C->>DB: Check connection and pending sync state
alt Event should be skipped
C-->>A: 200 without Dropbox operation
else Event should be synchronized
C->>S: Handle create, delete, or update
S->>D: Upload or delete file
S->>DB: Create or soft-delete mapping
S-->>C: Completed
C-->>A: 200
end
Reviews (2): Last reviewed commit: "test(OUT-4040): don't assert the delete_..." | Re-trigger Greptile |
The app ignores the delete_v2 response body (only success vs 409), so the harness test now checks the call works and the deleted path was recorded, instead of asserting response metadata. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Collaborator
Author
|
@greptileai review PR 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 & why
L1.3 — integration tests for the Assembly→Dropbox webhook flow (Copilot notifies of a file created/deleted/updated → we sync to Dropbox), including the ping-pong dedup that stops us re-syncing our own echoes. Third of the L1 flow spine (after L1.1 initial sync, L1.2 Dropbox webhook delta). Drives the real graph in-process (via the L1.0 Trigger double) against Testcontainers Postgres, Dropbox + Copilot faked via MSW.
Changes (all
test/**, zero production change)test/msw/write.ts(+ harness test) —mockDropboxDeleteFile(/2/files/delete_v2, captures deleted paths)test/flows/assembly-webhook.integration.test.ts— service-direct: create / delete / updatetest/flows/assembly-webhook-controller.integration.test.ts— controller: ping-pong dedup + event guardsWhat it proves
Skip scenarios register no Dropbox handlers, so a stray outbound call trips
onUnhandledRequest:'error'; the delete/update tests also assert the exact deleted path and that unchanged rows were never written (updatedAt).Reviewed by the fullstack reviewer (SHIP). Cases 33–35 (dead-code webhook-record dedup) intentionally out of scope.
Testing
pnpm typecheck✅ ·pnpm lint✅pnpm test:integration— 75/75 ✅ (12 files)🤖 Generated with Claude Code