Skip to content

Fix capability-door denials from the closure-denial stamp's signal handler - #22

Merged
josephschorr merged 1 commit into
mainfrom
fix-closure-denial-stamp-approval
Oct 6, 2026
Merged

josephschorr merged 1 commit into
mainfrom
fix-closure-denial-stamp-approval

Conversation

@josephschorr

Copy link
Copy Markdown
Member

Summary

The operator logged "capability door denied — caller lacks a required approval (likely a missing-mint bug)" hundreds of times, one per turn, for active sessions. The closure-denial stamp (the §2.8 "a denial must be consulted by every member of the delegation closure" mechanism) was silently not running for those signals.

Cause

ClosureDenialStamper.OnSignal reads memory through its injected Denied dependency (infoleakagedecision.List, a memory:read), but it passed along the raw context the signal arrived on. A signal carries only the approval of whoever raised it — for a turn.completed that is the sender's memory:write, never a read — so the facade's capability door refused the lookup on every such signal.

Its two sibling signal handlers (kg_ingestion, lifecycle, and the denial-streak tripper) all mint their own system approval first; this one didn't. The existing tests used a Denied stub that ignores the context, so none of them exercised the approval path — which is how the gap shipped.

Fix

Mint a system approval in OnSignal before the lookup, matching the established pattern. Added a regression test that feeds a write-only context (what the signal dispatcher hands a hook for a turn.completed) and asserts the read is permitted and the stamp runs.

Testing

unit, integration, and e2e suites pass.

ClosureDenialStamper.OnSignal reads memory through its injected Denied dep
(infoleakagedecision.List, a memory:read) but passed the raw signal ctx, which
for a turn.completed carries only the sender's memory:write approval. The
facade's capability door then refused the read on every such signal — hundreds
of "capability door denied — likely a missing-mint bug" entries in the operator
log — and the closure-denial stamp silently never ran for those signals.

Mint a system approval first, exactly as kg_ingestion's, lifecycle's and
DenialStreak's signal handlers already do. The existing stamper tests passed a
Denied that ignores ctx, so none exercised the approval path; add one that feeds
a write-only ctx (what SendSignal hands a hook for a turn.completed) and asserts
the read is permitted.
@vercel

vercel Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
openagentprimitives Ready Ready Preview Oct 6, 2026 12:34am UTC

Request Review

@josephschorr
josephschorr merged commit 7edd5d0 into main Oct 6, 2026
9 checks passed

This branch was successfully deployed

1 active deployment
Preview — 0963e64a Deployed Oct 6, 2026 by vercel[bot]
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.

2 participants