Repository navigation
CORE (signing sitting): tripwire for KNOWN-LIMITS 35, session id on gate receipts - #49
Merged
Merged
Conversation
…ate receipts
gatedAction() already carries an informational side-channel for exactly this
shape of field: meta.ruleId and meta.heldMs reach the receipt without ever
entering canonicalizeRequest or verifyApproval. meta.sessionId does not exist
yet, though the value is available at every call site in bin/hook-pre-tool-use.js
(parsed.sessionId is already computed and already threaded onto one receipt
type, the both-layers-permissive policy-warn case) and simply is not forwarded
to gatedAction's meta.
This ships a tripwire, not the fix: three assertions proving the gap against
the live source (two live gatedAction() calls showing sessionId dropped on
both denied and approved paths, one static-source check counting the three
bare `meta = { ruleId, heldMs }` sites in the hook). All three currently pass
against today's code. KNOWN-LIMITS 35 is amended to point at the exact
three-part fix recipe, named in the test file's own docstring, rather than
left as a paragraph nobody can act on without re-deriving the call sites.
The actual fix (src/gate/index.js, bin/hook-pre-tool-use.js) was attempted
first per Lotor rule 1 and denied unsigned by the gate (self-mod, request
0e2c4bda on the src/gate edit) -- correct outcome, not reshaped, not routed
around. It queues for Isaac's signing sitting alongside the other core items
already stacked (limit 63's parts widening, limit 34's two-part fix, limit 64's
digest-on-session-open, limit 65's pin-body coverage).
944/944 (941 baseline on main + 3 new).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.
WO
KNOWN-LIMITS 35 — a gate decision carries no session id, so a denial (or an
approval) cannot be attributed to the session that caused it. Found 2026-07-26;
narrowed today rather than fixed, because both call sites are non-delegable core.
What this ships
Not the fix — a tripwire proving the gap is real against the live source, plus
an amendment to the entry naming the exact three-part repair so a future
signing sitting can act on it without re-deriving the call sites.
test/known-limits-35-session-attribution.test.js, three assertions, allcurrently passing (i.e. proving the gap, not a fix):
gatedAction()call withmeta.sessionIdset produces areceipt where
sessionIdisundefined— while the sibling informationalfields
ruleId/heldMs(added for a different limit, same "meta carriesinformational-only fields" pattern) already do survive. That contrast is
the control.
bin/hook-pre-tool-use.js: the file alreadycomputes
sessionIdfrompayload.session_idand already threads it ontoone receipt type (
policy-warn, theboth-layers-permissivecase), butall three
gatedAction()call sites buildmetaas{ ruleId, heldMs }with no
sessionId. Counts the bare sites (3 today) rather than assertinga boolean, so a partial fix (attribution on some gate decisions, silently
not on others — worse than today's uniform gap) also fails this test, not
just a zero-vs-nonzero fix.
KNOWN-LIMITS.mdentry 35 gets a dated amendment pointing at the test filefor the fix recipe, rather than re-describing it in prose that could drift
from what the test actually checks.
944/944 (941 baseline on
main+ 3 new).The gate held
Attempted the actual fix first, per Lotor rule 1: adding
sessionId: meta.sessionId || null,to the four
gated-actionreceipt objects insrc/gate/index.js. Deniedunsigned (self-mod, request
0e2c4bda). Not reshaped, not routed around, notwaited on. The two remaining pieces of the fix (the same one-line addition to
src/gate/index.js's other three receipt sites, andconst meta = { ruleId, heldMs, sessionId: parsed.sessionId };at the three call sites inbin/hook-pre-tool-use.js) are named verbatim in the test file's docstring.What a reviewer should doubt
forward on its own — no new attribution exists after this merges, only a
named and tested path to it. Judge it as documentation-with-a-tripwire, not
as a feature.
regexes for the literal string
const meta = { ruleId, heldMs };. Arefactor that reformats those three lines without fixing the underlying gap
would make this test fail for the wrong reason (formatting, not
attribution). That is judged an acceptable cost for a test that pins three
call sites precisely rather than one — a reviewer who disagrees should say
so; a more robust version would parse the file rather than regex it, and
wasn't judged worth the complexity for a signing-sitting confession test.
partswidening,limit 34's two-part path-resolution fix, limit 64's digest-on-session-open,
limit 65's pin-body coverage). This is the fifth. None has landed since
limit 29: the pin is stale on main, and the suite is shaped so it cannot see it #41 merged on 2026-09-01 — worth Isaac's eye on whether the signing sitting
itself is now the bottleneck, separate from ordinary review.
Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com