Repository navigation
Fix capability-door denials from the closure-denial stamp's signal handler - #22
Merged
Merged
Conversation
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.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
samkim
approved these changes
Oct 6, 2026
This branch was successfully 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.
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.OnSignalreads memory through its injectedDenieddependency (infoleakagedecision.List, amemory:read), but it passed along the raw context the signal arrived on. A signal carries only the approval of whoever raised it — for aturn.completedthat is the sender'smemory: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 aDeniedstub that ignores the context, so none of them exercised the approval path — which is how the gap shipped.Fix
Mint a system approval in
OnSignalbefore the lookup, matching the established pattern. Added a regression test that feeds a write-only context (what the signal dispatcher hands a hook for aturn.completed) and asserts the read is permitted and the stamp runs.Testing
unit, integration, and e2e suites pass.