Skip to content

Require owner decisions and honor ACP permission cancellation - #7797

Open
samrik246 wants to merge 4 commits into
block:mainfrom
samrik246:bobby/approval-integration-repair
Open

samrik246 wants to merge 4 commits into
block:mainfrom
samrik246:bobby/approval-integration-repair

Conversation

@samrik246

@samrik246 samrik246 commented Sep 22, 2026

Copy link
Copy Markdown

Summary

Managed ACP permission requests previously advanced through an automatically selected option. This PR holds both ACP read loops at the exact pending request until the authenticated owner selects an offered option. The Desktop card shows the action and target, and the response is bound to the channel, runtime generation, session, turn, typed request ID, action digest, and selected option. Duplicate, mismatched, expired, and replayed decisions fail closed.

When an ACP adapter sends $/cancel_request for that pending permission request, the host now persists Cancelled, writes a JSON-RPC cancelled outcome using the original typed ID, and only then clears its in-memory pending state. If the response write fails, the ledger records DeliveryUnknown and the owner card remains inert. Unmatched, late, wrong-typed, and cross-session cancellations cannot cancel another request. The cancelled response terminalizes an open Desktop card, while the durable ledger keeps a replayed or reconnected card inert.

Native Guardian denial retry requires a compatible adapter and is reviewed separately; this PR does not publish or install that adapter.

Related issue

None found.

Validation

  • cargo test -p buzz-acp: 953 unit tests passed, 1 ignored; 9 lifecycle integration tests passed.
  • Focused cancellation fixtures: 3 passed across both read loops and the failed-response-write path.
  • Full Desktop package: 6,520 tests passed across 85 suites.
  • Focused Desktop permission/reconnect suite: 64 passed.
  • CHECK_FILE_SIZES_BASE=4107b16e714407e166c596a97f91bf2f346bee86 just file-size-check: passed.
  • Repository just ci: passed locally on the unchanged candidate with the explicit file-size base, process-local Xcode 26.5 SDK, and external Cargo/TMPDIR staging.
  • git diff 4107b16e714407e166c596a97f91bf2f346bee86 HEAD --check: passed; commit is DCO-signed.

The source candidate is 6a51ecba9a10b9ecf837887a3d69d1bc94f9ba63. A side-by-side local app artifact was reviewed separately. Installed live acceptance remains pending; this draft PR does not claim deployment or a passing remote security review.

Bobby added 3 commits September 22, 2026 06:38
Signed-off-by: Bobby <fa3b487e7f5e37cdc997b0529186cacf1433136b69f4da3827c48c84e22b5744@nostr.invalid>
Signed-off-by: Bobby <fa3b487e7f5e37cdc997b0529186cacf1433136b69f4da3827c48c84e22b5744@nostr.invalid>
Signed-off-by: Bobby <fa3b487e7f5e37cdc997b0529186cacf1433136b69f4da3827c48c84e22b5744@nostr.invalid>
@github-actions

github-actions Bot commented Sep 22, 2026

Copy link
Copy Markdown

🔐 Codex Security Review

Status: review required for the current range.

The current range is 7e96f9122961d58159e6c6e6838b2026caaec3cd...6a51ecba9a10b9ecf837887a3d69d1bc94f9ba63.
A new review must complete for this exact range. When manual authorization
is required, a Block organization member must comment exactly
@buzz-security-review 6a51ecba9a10b9ecf837887a3d69d1bc94f9ba63 to authorize a new review.
Any previous review applies only to its recorded range.

Signed-off-by: Bobby <fa3b487e7f5e37cdc997b0529186cacf1433136b69f4da3827c48c84e22b5744@nostr.invalid>
@samrik246 samrik246 changed the title Require owner decisions for managed ACP permissions Require owner decisions and honor ACP permission cancellation Sep 22, 2026
@samrik246
samrik246 marked this pull request as ready for review September 22, 2026 22:55
@samrik246
samrik246 requested a review from a team as a code owner September 22, 2026 22:55

This branch has not been deployed

No deployments
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