Skip to content

test(client): expect a stable operation ID across same-key sync_accounts retries - #3820

Merged
bokelley merged 2 commits into
mainfrom
fix/prepared-dispatch-webhook-digest
Nov 27, 2026
Merged

bokelley merged 2 commits into
mainfrom
fix/prepared-dispatch-webhook-digest

Conversation

@bokelley

Copy link
Copy Markdown
Contributor

Summary

main has 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). main was green at ffa5aad just before.

#3760 was green on its own branch, whose base was 21 Nov. In between, #3796 landed on main: the default operation_id is now derived from the idempotency key, so a same-key retry sends the same push_notification_config and 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:

  • a same-key retry keeps the operation_id and the digest;
  • a different idempotency key changes both;
  • every digest passed to beforePreparedDispatch matches the dispatched arguments.

No library change, so no changeset.

Tests

This unblocks the 17.0.0-rc.2 release PR (#3819), which inherits the failure.

🤖 Generated with Claude Code

…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>
aao-secretariat[bot]
aao-secretariat Bot previously approved these changes Nov 27, 2026

@aao-secretariat aao-secretariat Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_id is derived from the idempotency key (idempotentOperationId in src/lib/core/task-deadline.ts:62), so a same-key sync_accounts retry preserves both operation_id and the complete request digest, while a different key changes both. Reviewer verified retry === 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>

@aao-secretariat aao-secretariat Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@bokelley
bokelley merged commit 3b7aeac into main Nov 27, 2026
45 checks passed
@bokelley
bokelley deleted the fix/prepared-dispatch-webhook-digest branch November 27, 2026 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant