Repository navigation
Conversation
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Every served request carries digest, a sha256 over what the client is shown (id, tool, description, arguments view, created/expiry, critical), never in a push. The REST approve of a critical request needs it: none is 409 digest_required, another 409 digest_mismatch, nothing approved. It is the last check, after every refusal about who may answer. 'all' is refused while a critical request it would approve is pending. Two tests send the served digest on purpose (a desktop prompt and a hold lift are critical), so they still prove the person checks with a valid digest. server_capabilities lists approval_digest. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The 409 shape, all's own code, a digest that never raises and cannot be rebuilt without fetching, no digest in the stored frame; the full-tools hold test sends the served digest so the person check is what refuses. Co-Authored-By: Claude Opus 5.5 <[email protected]>
- The digest never raises (ASCII JSON, a repr fallback for keys that cannot be sorted), so an odd argument no longer leaves a request stuck in the queue until restart. - It is an HMAC under a key minted per daemon process, and the stored copy of the frame drops it, so a client holds it only by fetching. - The 409s use the route's shape (prose in error, the word in code); all gets its own code, critical_pending (no digest satisfies it). - The comment says where the hold lift's person check runs; REST only. - CHANGELOG and API guide: the default critical kinds, that a client which does not send the digest can no longer approve them over REST, chat gateways unchanged, and the subscribed capabilities. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…n process's own Co-Authored-By: Claude Opus 5.5 <[email protected]>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Beacon iOS item 3: approving a critical request needs its digest. Stacked on #917 (the
criticalflag); retarget as it merges. Next release, held with it.What changes.
digest: an HMAC, under a key minted per daemon process, over what the client is shown (request id, tool, description, arguments view, created and expiry times, the critical flag). It's served wherever the request is (GET /api/approvals, theapproval_pendingframe, and the by-id route once feat(approvals): one request by id, and a request that ends takes its notification back #913 lands, since all of these use the one serializer). It is never in a push, because the push builds its own narrow body, and the stored copy of the frame (signal_events) drops it. So a client holds it only by fetching the request. It never raises: ASCII JSON, with a repr fallback for keys that can't be sorted.POST /api/approvals/{id}/approveon a critical request needs{"digest": <that value>}:409withcode: digest_required(prose inerror, the route's 409 shape);code: digest_mismatch;/approveare the owner typing in chat, and are unchanged.allis refused (409,code: critical_pending) while a critical request it would approve is pending.allalready leaves desktop, worker and hold requests alone. A separate change makes the REST route take single ids only.server_capabilitieslistsapproval_digest.What it proves, stated plainly. The client fetched this exact request. It doesn't prove a person read it in the app: a notification extension that fetches the request holds the digest too. Keeping critical requests off the lock screen still rests on the client not offering Approve there, which Beacon already does from
critical. The PR description, the docs and the code all say this.Choices noted:
extentsare left out. They can change with the grants while a request waits, which would make a correct digest mismatch.409saying why. Telegram and the CLI are unaffected. Gating the check on a client capability would let any client skip it by not advertising one.Clients:
digestfrom the request they fetched and send it in the approve body.Reviews: two (approvals).
all's own code, the order comment, and the docs.Tests: red first,
tests/test_critical_approve_needs_digest.py. Local Mac suite at c90d1a9, with the venv on PATH: 16,157 passed, 0 failed. Ruff and the mypy gate are clean.🤖 Generated with Claude Code