You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
createA2AHandshakeMessage() returns the wrong nonce when creating a response handshake with requestNonce.
When requestNonce is provided, createA2AHandshakePayload() correctly puts the initiator's nonce in payload.nonce and the newly generated nonce in payload.replyNonce. However, createA2AHandshakeMessage() always returns nonce: payload.nonce, so callers receive the peer's old request nonce instead of the fresh reply nonce they need to correlate the next handshake leg.
Minimal reproduction and steps
In packages/ack-id/src/a2a/sign-message.test.ts, add a regression test that calls createA2AHandshakeMessage() with requestNonce.
Mock generateRandomNonce() to return fresh-reply-nonce.
pnpm run build
pnpm --filter @agentcommercekit/ack-id test -- src/a2a/sign-message.test.ts
Expected behavior
When requestNonce is provided, createA2AHandshakeMessage() should return the freshly generated replyNonce so callers can store and correlate the next handshake leg.
Actual behavior
createA2AHandshakeMessage() returns payload.nonce, which is the peer's original requestNonce. The fresh nonce is only present in payload.replyNonce and is not returned to the caller.
Activity
kutluhaneth46 commentedon Sep 7, 2026
Taking this — investigating and will open a PR with a focused fix + regression test.
kutluhaneth46 commentedon Sep 27, 2026
Opened #233 for this.