Repository navigation
test(client): expect a stable operation ID across same-key sync_accounts retries - #3820
Conversation
…nts retries #3760 asserted that a default SDK webhook operation_id changes the complete request digest on a same-key retry. #3796, merged to main after #3760's base, derives the default operation_id from the idempotency key, so a same-key retry now sends the same push_notification_config and the same digest. main has been red on this test since #3760 merged. The test now checks the #3796 contract through the prepared-dispatch digest: a same-key retry keeps the operation_id and digest, a different key changes both, and every digest matches the dispatched arguments. Test-only; no library change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Ladon verdict: Approve
Approve — test-only fix for a red main.
Checked:
- Single file changed:
test/lib/sync-accounts-prepared-dispatch.test.js(+16/-12), a test-only update. - The revised assertions correctly mirror #3796's shipping contract: the default webhook
operation_idis derived from the idempotency key (idempotentOperationIdinsrc/lib/core/task-deadline.ts:62), so a same-keysync_accountsretry preserves bothoperation_idand the complete request digest, while a different key changes both. Reviewer verifiedretry === first,other !== first,digests[1] === digests[0],digests[2] !== digests[0]against the implementation. - Stale test fixed to match canon code (correct direction under DR-0008).
- No
src/lib/**,bin/**, or published-path changes, so no changeset is required. - No reviewer findings.
Gate checks: no no-auto-approve team match; gated_paths: false; high_risk: false. No blocking or medium findings. Falls through to row 9.
…geset Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Ladon verdict: Approve
Approve — test-only change, no blocking or medium findings.
This PR touches 2 files (+22/-11): an empty "no release" changeset and a rewritten test case in test/lib/sync-accounts-prepared-dispatch.test.js. The test case was updated to match #3796's idempotency-key-derived default operation_id: same key preserves the digest, a different key diverges. Assertions are coherent (retry===first, other!==first, digests deepEqual calls.map(canonicalJsonSha256) with explicit index checks).
Checks:
- No
src/lib/**,bin/**, or build-affecting code touched — empty changeset is correct per repo rules for test-only changes. - No wire-shape, version-translation, or transport-client concerns implicated.
- high_risk: false; gated_paths: false. Although review_decision is REVIEW_REQUIRED, the gated-paths gate (row 2) only fires when gated_paths is true — it is false here.
- No no-auto-approve team match.
- Prior decision was approve with no findings; this run also surfaces no findings.
No rows 1–8 fire; falls through to row 9 → approve.
Summary
mainhas been red since #3760 merged this morning:test/lib/sync-accounts-prepared-dispatch.test.js› "a default SDK webhook operation ID changes the complete same-key digest" fails on every CI run (e661722, 0f1e67c, ebf05d5).mainwas green at ffa5aad just before.#3760 was green on its own branch, whose base was 21 Nov. In between, #3796 landed on
main: the defaultoperation_idis now derived from the idempotency key, so a same-key retry sends the samepush_notification_configand therefore the same complete request digest. #3760's test still expected the digest to change. The code is right; the test is out of date.Change
Test-only. The test now checks #3796's contract through #3760's prepared-dispatch digest:
operation_idand the digest;beforePreparedDispatchmatches the dispatched arguments.No library change, so no changeset.
Tests
node --test test/lib/sync-accounts-prepared-dispatch.test.js: 12/12 pass on currentmainplus this change.node --test test/lib/stable-operation-id-idempotency.test.js(fix(client): keep push_notification_config stable across same-key retries (#3693) #3796's suite): 12/12 pass.This unblocks the 17.0.0-rc.2 release PR (#3819), which inherits the failure.
🤖 Generated with Claude Code