Repository navigation
Grant signing accepts the Delegated SD-JWT layout and the newer key-binding type (#473) - #474
Conversation
…inding type (#473) The updated Multipaz wallet answers `<SD-JWT>~~<KB-JWT>~<disclosures>~`, with the key binding in the middle; the signing page read the last part and refused with "presentation carries no key-binding JWT". It now reads both layouts, checks `sd_hash` over the credential's chain, requires any disclosure behind the key binding to be one the gate asked for, and stores the presentation in the earlier shape so the chain code that spends it is unchanged. That wallet also types the key binding `kb-sd-jwt+kb`, the draft's newer spelling. The signing page and the chain verifier accept either spelling for a hop that names a further key. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Ever Morales <ever.morales@koombea.com>
Claude reviewVerdict: ⛔ Needs changes This lets the grant signing page read the newer Multipaz Wallet's answer, which puts the signature in the middle instead of at the end. I found no way to get a forged answer accepted, but one new test doesn't test what it says, and nothing shows the fix working with the real wallet. Fix before merging
Worth a look
Details for the authorScope: full, Fix before merging
Worth a look
What holds (for the record):
Coverage
|
… (review of #474) The old test set omitKeyBinding and delegatedLayout together, but the simulator handled omitKeyBinding first and never produced the new layout, so it passed through the earlier layout's refusal. The simulator now returns `<chain>~~` for that pair, the test asserts the answer is in the new layout and the exact reason, and a backend that accepts everything is still refused. Direct splitPresentation cases pin the odd shapes. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Ever Morales <ever.morales@koombea.com>
…he page's range (review of #474) The simulated wallet hashes the same bytes the page does, so no test could tell whether a real wallet agrees on what `sd_hash` covers. This commit adds one answer captured from the updated wallet on a phone and replays it: the layout, the `kb-sd-jwt+kb` type and the checksum verify, and dropping a disclosure, another nonce or another audience are refused. Changing the hashed range fails 23 tests. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Ever Morales <ever.morales@koombea.com>
…rchant (review of #474) The test for the new layout stopped at "authorized". The person has left by the time the agent spends the permission, so the stored form must also be one `verifyDelegatedPurchase` accepts. The spend-and-verify steps are now a helper, run for the Delegated layout typed `kb-sd-jwt+kb`; storing the raw answer instead of the normalized one fails it. The comment above the neighbouring test no longer claims a spend it does not do. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Ever Morales <ever.morales@koombea.com>
…else the fix changes (review of #474) The entry said "the gate still sends kb+sd-jwt+kb", true only of the simulated wallet, which could read as nothing changing for merchants. It now says the wallet picks the type, that a merchant on 0.6.0 refuses a permission this wallet signed, that intent.presentation is re-serialized, and names the new simulator options and the issue. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Ever Morales <ever.morales@koombea.com>
The key binding's signature is checked on its first three parts, and only the credential's chain now goes through the SD-JWT decoder, so `h.p.s.x` verified, was authorized and stored, and was refused only when the agent spent it. splitPresentation now requires a three-part compact JWS, the check the chain code applies, in both layouts. Without it, the replay test with a fourth part and the splitter case fail. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Ever Morales <ever.morales@koombea.com>
…iew of #474) The sd_hash comment described the earlier layout and now says what is hashed, and that the mandate disclosures behind the key binding are guarded by the delegate_payload digests. The agentHeld doc, the type comments, the IntentVerifyBackend doc, walletChain and fromWalletPresentation no longer claim one layout or one spelling. The refusal messages name the accepted spellings from DELEGABLE_KB_TYPS. The draft citation is first-hand: -00 uses both spellings (§5.1.4 and §6), and its terminal `kb-sd-jwt` in §6 step 4.2 is noted as still refused. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Ever Morales <ever.morales@koombea.com>
…be ignored (review of #474) SimulateOptions is exported, so a later rename would break callers. `kbDisclosureOverride` becomes `overrideKbDisclosure`, like `overrideNonce`, `overrideVct`, `overrideMandates` and `overrideKbTyp`. Its doc says it replaces only the first disclosure behind the key binding, and without `delegatedLayout` the simulator throws, as it does for an unknown `cardShape`, instead of silently ignoring it. The changelog line follows. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Ever Morales <ever.morales@koombea.com>
#474) Replacing the no-`cnf` arm of the chain verifier's `typ` check with `false` left every test green. An agent hop with no further key, typed with either delegable spelling or the plain `kb+jwt`, is now refused with `code: "typ"`, and the three cases fail without the arm. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Ever Morales <ever.morales@koombea.com>
|
✅ Scope check: a maintainer approved its size ( |
Claude reviewVerdict: ⛔ Needs changes Since the last review: 7 fixed, 1 partly open. This lets the grant signing page read the newer Multipaz Wallet's answer. The fixes hold up: a real phone answer is now replayed as a test, and nothing forged or unsigned gets through. Only a process step blocks merging. Fix before merging
Worth a look
Details for the authorScope: delta, 8735216..435159c: the eight new commits eb44535, 92858dd, 65383a4, c282dec, 379a8ca, 590edbf, 32dec42 and 435159c. Main changed none of this PR's files since the last review (the base is still 51d64d6). Findings C to F also have an inline comment. A and B are about the whole PR, so they have none. Since the last review (its eight findings, at 8735216)
Fix before merging A. Size · REVIEW.md §8 · CONFIRMED.
Worth a look B. PR description · REVIEW.md §5 · CONFIRMED. Three statements are out of date:
C. Signing page vs merchant · presentation.ts:89-91 and :155.
D. Test coverage · presentation.test.ts:724-728 · CONFIRMED. Replace isCompactJwt at presentation.ts:91 and :97 with a count of three parts, and every test stays green. That lets h.p.s== back in: it verifies, then walletChain refuses it at spend. E. Changelog · CHANGELOG.md:89-94 · CONFIRMED.
F. Decision pointer · ap2/delegate.ts:29-30 · CONFIRMED. It points at #473, which this PR closes. CLAUDE.md asks for decisions as an issue labelled needs-decision. What holds
Coverage
|
…build, make the terminal-hop note stand alone (review of #474) The shape check was tested only with the wrong number of parts, so a looser three-part check kept every test green; two cases with `==` now fail it. The changelog says the wallet is a development build, since multipaz#2178 is not merged. The note about the terminal `kb-sd-jwt` spelling no longer points at #473, which closes with this PR, and says why the gate refuses it. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Ever Morales <ever.morales@koombea.com>
Claude reviewVerdict: ⛔ Needs changes Since the last review: 4 fixed, 2 still open. This lets the grant signing page read the newer Multipaz Wallet's answer. The new commit and an edited description make most of the fixes the last review asked for and weaken no check; only the size sign-off still blocks. Fix before merging
Worth a look
Details for the authorScope: delta, 435159c..0e6da94: the one new commit, 0e6da94. Main changed none of this PR's files since the last review (the base is still 51d64d6). G1 and G2 also have inline comments. A and C are about the whole PR, so they have none. Since the last review (its six findings, at 435159c)
New in 0e6da94 (both worth a look) G1. presentation.test.ts:733-734 · REVIEW.md §2 (a weakened control still passes) · CONFIRMED, executed on a verbatim copy of splitPresentation.
G2. ap2/delegate.ts:29-31 · CLAUDE.md (decisions live in needs-decision issues) and docs truthfulness · CONFIRMED facts, PLAUSIBLE impact. The unproven step: that any sender uses kb-sd-jwt for the last hop.
What holds
Coverage
|
…review of #474) The two `==` cases would still pass a check that also let standard base64's `+` and `/` through, and the signature decoder reads those too: such a key binding verifies, is stored, and is refused when the agent spends it. Two cases with `H.B.S+/` fail that check. The comment above it no longer says a key binding with fewer than three parts would verify; it fails the signature check. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Ever Morales <ever.morales@koombea.com>
…rifier (review of #474) AP2's Python SDK accepts `kb+sd-jwt` and `kb-sd-jwt` for a hop that ends the chain (TYP_TERMINAL), and draft -00 writes it both ways (§5.1.4 and §6 step 4.2). The chain verifier accepted only `kb+sd-jwt`, so a merchant on this gate refused a last hop AP2's verifier accepts. It now accepts either, and the signing page lists both. A wallet hop that names a further key typed `kb-sd-jwt` is still refused. Removing the second spelling fails the new accept test. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Ever Morales <ever.morales@koombea.com>
…-bar before ready The Claude review ran on every push (`synchronize`): each fix for a note started the next review, which found the next note. #474 got 10 reviews in a day. This finishes the 2026-10-20 decision the cap alone didn't: the bot reviews once when a PR opens or is marked ready, and again only when someone adds `review:again` (the issue agent already adds it after a fix). The cap of 2 rounds stays. - claude-code-review.yml: trigger on opened/ready_for_review/reopened/labeled, not synchronize; only the review:again label runs the job; delta scope on that label; the bot removes the label after each run. Concurrency moves to the job, so adding any other label (its run is skipped) can't cancel a review in progress. - issue-agent-review.yml: assess ignores a skipped review run. With the labeled trigger, any other label starts one, and assess would read it as a verdict-less review and hand the PR to a human. - CONTRIBUTING.md, PR template: open as draft, run /review-to-the-bar, put its scorecard, cold-read packet and what you couldn't verify at the top, then mark ready. - CLAUDE.md: the review bot's description matches. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Diego Zuluaga <dfzuluaga@gmail.com>
…d the type once (review of #474) `normalized` was always `chain + kbJwt`, and both callers re-checked it as a second optional field. It is gone; verify.ts builds the stored presentation where it stores it. The guard is two checks, so a malformed answer says "not a compact SD-JWT presentation" and only a missing key binding says "presentation carries no key-binding JWT". The agent-held `typ` check reads the type from the split it already has instead of splitting again. The page's type refusal no longer says the hop "must be" the two delegable spellings when `kb+sd-jwt` also passes for a gate-held grant. The disclosure test matches the full refusal text, and the IntentVerifyBackend doc says what `sd_hash` covers in the Delegated layout and to wrap `inGateBackend`, without pointing at an unexported file. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Ever Morales <ever.morales@koombea.com>
…move the merchant change to Changed (review of #474) The README now names `IntentVerifyBackend` and says only direct callers of `verifyIntentPresentation` can plug one in; the signing route always uses the in-gate backend. The changelog's backend note is one line ("wrap `inGateBackend`"), says the page still refuses a key binding that is not three base64url parts, and the merchant's acceptance of the agent's last hop typed `kb-sd-jwt` is its own entry under Changed, not Fixed. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Ever Morales <ever.morales@koombea.com>
|
Thanks @dzuluaga. The five small items are done in b585718 and 6d03ab3: the type refusal no longer says the hop "must be" the two spellings, the agent-held check reads the type from the split it already has, the guard is two checks (a malformed answer now says "not a compact SD-JWT presentation"), and the disclosure test matches the full refusal text. One difference on the changelog item: I wrote that the page "still refuses" a key binding that is not three base64url parts, not "before: authorized, then refused at spend", because |
Claude reviewVerdict: 💬 Ready — small notes Since the last review: 1 fixed, 0 still open. This lets the grant signing page read the newer Multipaz Wallet's answer. The two new commits tidy the code without changing what it accepts or stores, and act on a maintainer's wording notes. A maintainer has approved the size, so nothing blocks merging. Worth a look
Details for the authorScope: delta, c7684d6..6d03ab3: the two new commits b585718 and 6d03ab3. Main changed none of this PR's files since the last review (the base is still 51d64d6). R1 to R3 also have inline comments. Since the last review (its one open item, at c7684d6)
New in this delta (all worth a look) R1. CHANGELOG.md:101 · REVIEW.md §5 and §6 (release text matches the code), Principle 10 · CONFIRMED.
R2. verify.ts:98 · Principle 10 · PLAUSIBLE. The unproven step: how a reader takes “up to”.
R3. verify.ts:282 · REVIEW.md §2 (test strength), optional · CONFIRMED.
What holds
Aside (outside this delta; not counted as a finding)
Coverage
|
…efore" the second `~`, and test the unreadable-answer guard (review of #474) The changelog said the page "still" refuses a key binding that is not three base64url parts. That is true for the part count and for a header or body that is not strict base64url, but 0.6.0 authorized a key binding whose signature was padded with `=` or written with `+` or `/` (the signature check reads it leniently and the library does not check it), and the merchant then refused it at the purchase. The page refuses it at signing now, and the entry says so. The IntentVerifyBackend doc said `sd_hash` covers the answer "up to the second `~`", which reads as including it; the hashed range ends before it. A test gives a backend that approves an answer the gate cannot split and expects the refusal; replacing the guard with a throw fails it. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Ever Morales <ever.morales@koombea.com>
|
@dzuluaga a correction to my earlier note on your changelog item. I wrote that the page "still refuses" a key binding that is not three base64url parts, because |
|
@dzuluaga I ran a second self-review of this PR (head
|
|
Thanks @TheBlackBit, b585718 and 6d03ab3 cover everything, and you're right about the CHANGELOG line: Two things left:
|
|
Thanks @dzuluaga.
One correction on the CHANGELOG line:
|
Claude reviewVerdict: 💬 Ready — small notes Since the last review: 3 fixed, 0 still open. This lets the grant signing page read the newer Multipaz Wallet's answer. The new commit acts on the last three notes. It rewords a changelog line and a developer note, and adds a test: if a developer's own verifier approves an answer the page can't read, the page still refuses it with a clear reason. No check changed, and nothing blocks merging. Worth a look
Details for the authorScope: delta, 6d03ab3..5758051: the one new commit, 5758051. Main changed none of this PR's files since the last review (the base is still 51d64d6). S1 has an inline comment with a suggestion, and S2 is folded into it. Since the last review (its three notes, at 6d03ab3)
New in 5758051 (both worth a look) S1. CHANGELOG.md:101-103 · REVIEW.md §5 and §6 (release text matches the code), Principle 10 · CONFIRMED by reading v0.6.0. One independent sub-agent traced it the same way.
S2. CHANGELOG.md:98-99 and the description's “What you're approving” · REVIEW.md §5 · CONFIRMED. Both say the page refuses what it refused before, except what it now accepts. Neither names the new refusal that the sub-bullet below now announces. Add it to both. Asides (outside this delta, not counted as findings)
What holds
Coverage
|
…ready (#418) * ci(review): cap the Claude review at 2 rounds per PR; issue-agent loop at 2 cycles The review bot re-reviewed every push with no limit. On #415 that ran 10 reviews since the PR was marked ready, six in one day, each answered by a 1-5 line wording fix that triggered the next review. Stripe's agents get at most two CI rounds; Anthropic's guidance warns a reviewer told to find gaps will always report some. - claude-code-review.yml: count this PR's "## Claude review" summaries since it was last marked ready for review; at CLAUDE_REVIEW_MAX_ROUNDS (default 2) skip the review and post one note that a person decides next. Draft -> ready resets it. - issue agent: ISSUE_AGENT_MAX_REVIEW_CYCLES default 3 -> 2. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Diego Zuluaga <dfzuluaga@gmail.com> * ci(review): review once, then only on review:again; run review-to-the-bar before ready The Claude review ran on every push (`synchronize`): each fix for a note started the next review, which found the next note. #474 got 10 reviews in a day. This finishes the 2026-10-20 decision the cap alone didn't: the bot reviews once when a PR opens or is marked ready, and again only when someone adds `review:again` (the issue agent already adds it after a fix). The cap of 2 rounds stays. - claude-code-review.yml: trigger on opened/ready_for_review/reopened/labeled, not synchronize; only the review:again label runs the job; delta scope on that label; the bot removes the label after each run. Concurrency moves to the job, so adding any other label (its run is skipped) can't cancel a review in progress. - issue-agent-review.yml: assess ignores a skipped review run. With the labeled trigger, any other label starts one, and assess would read it as a verdict-less review and hand the PR to a human. - CONTRIBUTING.md, PR template: open as draft, run /review-to-the-bar, put its scorecard, cold-read packet and what you couldn't verify at the top, then mark ready. - CLAUDE.md: the review bot's description matches. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Diego Zuluaga <dfzuluaga@gmail.com> * docs(issue-agent): review:again, not the push, starts the next review Three notes said the label does nothing until the review starts on it; with this PR it does. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Diego Zuluaga <dfzuluaga@gmail.com> * ci(review): a skipped review run is no review; other labels get their own concurrency group Found by review-to-the-bar on this PR: - issue-agent-review's label-started lookup took the head's newest Claude Code Review run. With the labeled trigger, agent:in-review itself starts a skipped run right after the PR opens, so the agent read "ended as skipped" and handed every new PR to a human before its first review. It now ignores skipped runs; an in-progress review still makes it wait. - Concurrency: GitHub doesn't document whether a job skipped by `if` joins its group, so other-label runs get a group of their own (issue-agent-review.yml's pattern), at workflow level. A PR created with labels keeps its opening review. - Wording: "push" notes in the cap/skip messages, ci/issue-agent README and checks.mjs; the cap note no longer promises "one more round"; CONTRIBUTING says how to install the skill. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Diego Zuluaga <dfzuluaga@gmail.com> --------- Signed-off-by: Diego Zuluaga <dfzuluaga@gmail.com> Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ssues (#477) * ci(review): cap the Claude review at 2 rounds per PR; issue-agent loop at 2 cycles The review bot re-reviewed every push with no limit. On #415 that ran 10 reviews since the PR was marked ready, six in one day, each answered by a 1-5 line wording fix that triggered the next review. Stripe's agents get at most two CI rounds; Anthropic's guidance warns a reviewer told to find gaps will always report some. - claude-code-review.yml: count this PR's "## Claude review" summaries since it was last marked ready for review; at CLAUDE_REVIEW_MAX_ROUNDS (default 2) skip the review and post one note that a person decides next. Draft -> ready resets it. - issue agent: ISSUE_AGENT_MAX_REVIEW_CYCLES default 3 -> 2. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Diego Zuluaga <dfzuluaga@gmail.com> * ci(review): review once, then only on review:again; run review-to-the-bar before ready The Claude review ran on every push (`synchronize`): each fix for a note started the next review, which found the next note. #474 got 10 reviews in a day. This finishes the 2026-10-20 decision the cap alone didn't: the bot reviews once when a PR opens or is marked ready, and again only when someone adds `review:again` (the issue agent already adds it after a fix). The cap of 2 rounds stays. - claude-code-review.yml: trigger on opened/ready_for_review/reopened/labeled, not synchronize; only the review:again label runs the job; delta scope on that label; the bot removes the label after each run. Concurrency moves to the job, so adding any other label (its run is skipped) can't cancel a review in progress. - issue-agent-review.yml: assess ignores a skipped review run. With the labeled trigger, any other label starts one, and assess would read it as a verdict-less review and hand the PR to a human. - CONTRIBUTING.md, PR template: open as draft, run /review-to-the-bar, put its scorecard, cold-read packet and what you couldn't verify at the top, then mark ready. - CLAUDE.md: the review bot's description matches. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Diego Zuluaga <dfzuluaga@gmail.com> * docs(issue-agent): review:again, not the push, starts the next review Three notes said the label does nothing until the review starts on it; with this PR it does. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Diego Zuluaga <dfzuluaga@gmail.com> * ci(review): a skipped review run is no review; other labels get their own concurrency group Found by review-to-the-bar on this PR: - issue-agent-review's label-started lookup took the head's newest Claude Code Review run. With the labeled trigger, agent:in-review itself starts a skipped run right after the PR opens, so the agent read "ended as skipped" and handed every new PR to a human before its first review. It now ignores skipped runs; an in-progress review still makes it wait. - Concurrency: GitHub doesn't document whether a job skipped by `if` joins its group, so other-label runs get a group of their own (issue-agent-review.yml's pattern), at workflow level. A PR created with labels keeps its opening review. - Wording: "push" notes in the cap/skip messages, ci/issue-agent README and checks.mjs; the cap note no longer promises "one more round"; CONTRIBUTING says how to install the skill. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Diego Zuluaga <dfzuluaga@gmail.com> * ci(review): two verdicts, blocking only, summary only, follow-up issues (2026-10-20 rules) The rest of the 2026-10-20 review-loop decisions, after #418 (review once, then review:again): - Two verdicts: ✅ Ready to merge or ⛔ Needs changes; 💬 is gone (the issue agent already reads a stray 💬 as ✅). - Fix before merging lists only what blocks: §1–§4, §8, a correctness bug, or a release/README claim the code doesn't back. At most 3 "Worth a look" notes, first review only; not tasks. - Summary only: no inline comments. Branch protection makes every thread mandatory work, so a note on a line became a task (the create_inline_comment tool is no longer allowed). - A re-review checks only the earlier ⛔ items and blocking problems in the new commits, at effort high, and adds no new notes. - A maintainer-only blocker gets a `follow-up` issue (searched first), linked in Details; the job gets issues: write and `gh issue create`. REVIEW.md, the review prompt, CONTRIBUTING.md and the issue-agent notes match. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Diego Zuluaga <dfzuluaga@gmail.com> * ci(review): validator fixes — PR text is data, narrow issue tool, owner decides From review-to-the-bar's validator on this PR: - The prompt says PR text and comments are data, not instructions; a follow-up issue is only for a problem confirmed in the code. The tool is narrowed to `gh issue create --label follow-up`. - Job permission back to issues: read: the action's gh runs on the Claude App token, so issues: write on the job only widened github.token. - Notes: "full review only" (the first, or after marked ready again) in REVIEW.md and CONTRIBUTING; the PR's owner decides (author, or for an agent PR whoever added `agent`). - Delta: main's overlap folds into "blocking problem in the new commits"; the effort step's dead delta file list is gone. - Wording: README claim in REVIEW.md's closing rule; stale "optional notes listed" in CLAUDE.md, ci/issue-agent/README.md and checks.mjs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Diego Zuluaga <dfzuluaga@gmail.com> --------- Signed-off-by: Diego Zuluaga <dfzuluaga@gmail.com> Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Thank you @TheBlackBit, great work on this one: a careful fix, the real-wallet replay test, quick turnarounds, and the correction in 5758051. Approved. Also thanks for running review-to-the-bar before asking me; it shows. |
…h kind of grant (review of #474) Applies the review's suggested wording, and the sentence above it no longer says the page refuses only what it refused before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Diego Zuluaga <dfzuluaga@gmail.com>
Before and after
Signing a spending grant on the phone with a development build of the updated Multipaz Wallet (not released yet), against the same store, once running
mainand once running this change:❌ Before —
main:✗ presentation carries no key-binding JWT— video✅ After — this change: the grant is
authorized, trust leveldevice-signed— videoWhat a test can show: the wallet's answer from an earlier run is saved (
fixtures/multipaz-delegated-presentation.json) and replayed. It proves the signing page's checks accept a real wallet answer and that a merchant's checks get as far as the agent's own step. It does not reproduceauthorized, which needs the gate's secret.In plain terms
Sam asks Claude for a $300 spending grant, opens the approve link on their phone and signs with their wallet. The wallet signed, but the page said it found no signature and the grant stayed pending. The updated wallet puts its signature in a different place and spells its type a little differently. The page now understands both the old and the new version.
Fixes #473: grant signing refused the answer of the updated Multipaz Wallet.
What you're approving
kb-sd-jwt+kb. The merchant side is looser in two ways too: a merchant's verifier now accepts the wallet's step typedkb-sd-jwt+kb(0.6.0 accepted onlykb+sd-jwt+kb), and the agent's last step typedkb-sd-jwtas well askb+sd-jwt, as AP2's own verifier does. If a check were wrong, the worst case is a bad presentation being accepted; the tests cover each way that could happen.device-signed: a key the credential names signed this. It does not say who issued the credential.sd_hashis the checksum of the credential and the parts of it that were revealed; a disclosure is one revealed part.How to test
npm testAll tests should pass. To see the controls matter, delete the
sd_hashcomparison inpresentation.ts: three tests fail ("a key binding whose sd_hash does not cover the disclosures presented", "an sd_hash that does not cover the credential's chain", and the replay's "credential's disclosure dropped"). Delete the disclosure check inverify.ts: one fails ("a disclosure behind the key binding that delegate_payload does not commit to"). All are inpresentation.test.ts.For reviewers — the detail
<SD-JWT>~~<KB-JWT>~<disclosure>~(Delegate SD-JWT draft §5.1.1); the old one ended with the KB-JWT.splitPresentationinpresentation.tsreads both.sd_hashcovers the credential chain before the extra~, as in the SDK'sbuildKbJwt, so that check is unchanged.sd_hash.verify.tsrequires each to be byte-equal to one the gate asked for, after the existing check thatdelegate_payloadholds the grant's digests.kb+sd-jwt+kbin §5.1.4 andkb-sd-jwt+kbin §6 (the review of openwallet-foundation/multipaz pull request 2178 reports that a later draft settled on the second; I could read only -00). The wallet picks the type; the gate's request names none. The signing page andap2/chain/verify.tsaccept either spelling, so a grant is not authorized and then refused at purchase. Any other spelling is refused. The merchant's chain verifier alone also accepts bothkb+sd-jwtandkb-sd-jwtfor the agent's last step, as AP2's Python SDK does; the signing page sees only the wallet's step and does not.sd_hash, nonce, audience, mandates, forged holder key, forged disclosure, nothing behind the~~, and a key binding that is not three base64url parts (including=,+and/). The real wallet answer is replayed, through the signing page's checks and through the merchant's. A grant signed in the new layout is spent and verified at the merchant. The new spelling is covered on the signing page and the chain verifier.kb+sd-jwt+kb). Update together; the changelog says so.🤖 Generated with Claude Code