Skip to content

fix(ack-id): return reply nonce for response handshakes - #204

Closed
kutluhaneth46 wants to merge 2 commits into
agentcommercekit:mainfrom
kutluhaneth46:cursor/fix-a2a-response-nonce-88c1
Closed

fix(ack-id): return reply nonce for response handshakes#204
kutluhaneth46 wants to merge 2 commits into
agentcommercekit:mainfrom
kutluhaneth46:cursor/fix-a2a-response-nonce-88c1

Conversation

@kutluhaneth46

@kutluhaneth46 kutluhaneth46 commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Return payload.replyNonce from response handshakes while preserving initiator behavior.
  • Add a regression test using a distinct generated reply nonce.
  • Add an ack-id patch changeset.

Verification

  • pnpm run build
  • pnpm --filter @agentcommercekit/ack-id exec vitest run src/a2a/sign-message.test.ts
  • pnpm --filter @agentcommercekit/ack-id test -- --run
  • pnpm run lint
  • pnpm run check:format
  • pnpm run check:packages

Fixes #174

Summary by CodeRabbit

  • Bug Fixes

    • A2A response handshakes now return the fresh reply nonce, ensuring callers receive the correct nonce when responding to a prior handshake.
  • Documentation

    • Added a patch release note for the acknowledgment ID package.

@coderabbitai

coderabbitai Bot commented Sep 7, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: 56552f45-5c16-4635-a8ec-88281239dfe0

📥 Commits

Reviewing files that changed from the base of the PR and between 7d23f83 and bc3fa5d.

📒 Files selected for processing (3)
  • .changeset/a2a-response-reply-nonce.md
  • packages/ack-id/src/a2a/sign-message.test.ts
  • packages/ack-id/src/a2a/sign-message.ts

Included review availability: Your plan provides up to 2 included reviews per hour; 0 remain after this review.


Walkthrough

createA2AHandshakeMessage now returns the fresh reply nonce for response handshakes. A regression test verifies this behavior, and a patch changeset documents the release.

Changes

A2A reply nonce correction

Layer / File(s) Summary
Reply nonce selection
packages/ack-id/src/a2a/sign-message.ts, .changeset/a2a-response-reply-nonce.md
The message now returns payload.replyNonce when present and otherwise returns payload.nonce. The changeset records a patch release.
Reply nonce regression test
packages/ack-id/src/a2a/sign-message.test.ts
The test mocks nonce generation and verifies that a response handshake returns the fresh reply nonce.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to bc3fa

A2A response handshakes now return the fresh reply nonce needed for the next handshake leg while initiator behavior remains unchanged. The targeted regression coverage supports merge readiness.

Suggested reviewers: venables

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: returning the reply nonce for A2A response handshakes.
Linked Issues check ✅ Passed The implementation returns the fresh reply nonce for response handshakes and preserves the existing initiator behavior. The regression test verifies this behavior, and the changeset documents the patc…
Out of Scope Changes check ✅ Passed All changes support issue #174: the implementation fix, regression test, and package changeset. No unrelated changes are present.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. (1 skipped: 1 …
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@venables

venables commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Thank you for the fix. This duplicates #175, which was opened first and has already addressed review feedback. Closing as a duplicate of #175.

@venables venables closed this Sep 9, 2026
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.

[Bug]: A2A response handshakes return request nonce instead of fresh reply nonce

2 participants