Repository navigation
chore(gateway): verify per-account hook replay isolation - #116121
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 29, 2026, 7:20 PM ET / 23:20 UTC. ClawSweeper reviewWhat this changesThis PR adds a Gateway regression test that sends two otherwise identical agent-hook requests with different Merge readinessKeep this PR open for normal maintainer review. It is a narrow regression test for the multi-account hook-delivery fix merged in #116095, and the supplied diff appears to verify the intended replay-isolation invariant without changing runtime behavior. Priority: P3 Review scores
Verification
How this fits togetherAgent-hook HTTP requests enter the Gateway, where idempotency/replay handling decides whether to schedule a run. The resulting job carries its selected channel account into downstream channel delivery, so account identity must remain part of the dispatch boundary. flowchart LR
A[Webhook caller] --> B[Gateway agent hook]
B --> C[Replay identity]
C --> D[Scheduled agent job]
D --> E[Selected channel account]
E --> F[Outbound channel delivery]
Before merge
Agent review detailsSecurityNone. PR surfaceTests +34. Total +34 across 1 file. View PR surface stats
Review metricsNone. Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the focused regression test beside the existing hook replay coverage, refresh it against current Do we have a high-confidence way to reproduce the issue? Not applicable: this PR adds regression coverage rather than reporting a separate current failure. Its stated focused test path directly exercises the intended replay boundary. Is this the best way to solve the issue? Yes. A focused test at the Gateway hook/replay boundary is the narrowest maintainable way to prevent the merged multi-account delivery behavior from regressing. AGENTS.md: unclear because the file could not be read completely. Codex review notes: model internal, reasoning high; reviewed against 1f56e2da21a2. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
ClawSweeper rank-up move addressed: I am intentionally not rebasing this test-only PR solely because
Rebasing would only replace the proven SHA and rerun identical gates. Proceeding through repo-native merge verification. |
|
Merged via squash.
|
Related: #116095
What Problem This Solves
Prevents the multi-account agent-hook delivery contract from losing focused replay coverage. Requests that reuse an idempotency key but target different configured accounts must remain separate dispatches.
Why This Change Was Made
Adds one Gateway regression test beside the existing session-mode replay-scope test. The test proves
accountIdparticipates in replay identity and that each scheduled job retains its selected account.User Impact
No runtime behavior changes. This protects per-account hook delivery from future idempotency regressions.
Evidence
node scripts/run-vitest.mjs src/gateway/server.hooks-session-mode.test.ts(4 tests passed)./node_modules/.bin/oxfmt --check src/gateway/server.hooks-session-mode.test.tsgit diff --check