Repository navigation
CORE (signing sitting): wire transcriptPath into the session-end hook (WO-TRACE-BRIDGE-01 last mile) - #48
Merged
githubscum merged 1 commit intoSep 7, 2026
Conversation
ingestSession already reads opts.transcriptPath and binds a subagents summary onto the receipt when a sibling <basename>/subagents/ directory exists (test/subagent-ingest-wiring.test.js, PR #47). The session-end hook -- the only caller that matters in production -- does not pass transcriptPath through, so the reader never fires outside a test. This adds one fail-first test that runs the real hook binary against a real transcript with a real subagents sidecar and asserts today's dark result: no `subagents` field on the receipt. It is meant to flip, not pass forever. The core file (bin/hook-session-end.js) is gated and this lane cannot land the one-line fix unsigned (self-mod denial on attempt). The fix, for the signing sitting: bin/hook-session-end.js, ~line 127 - const result = ingestSession(text, { transcriptBytes: bytes }); + const result = ingestSession(text, { transcriptBytes: bytes, transcriptPath }); Suite: 953/953 (952 baseline on this branch + 1 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.
CORE (signing sitting). Stacked on #47 (base branch:
lotor-lane/subagent-receipts) — this diff is one new test file; everything else in the compare view is #47's, already reviewed there.What this closes
WO-TRACE-BRIDGE-01's write half landed the reader (
src/ingest/subagents.js) and the wiring intoingestSession(opts.transcriptPath -> a bound subagents summary), both non-core and both in #47. The one remaining piece is the production caller: the session-end hook, which is the only caller that runs in real use. As ofmainplus #47, it still callsingestSessionwithouttranscriptPath, so the reader that PR #47 proves works never actually fires outside a test.What's in this PR
One fail-first test (
test/hook-session-end-subagents.test.js) that runs the real hook binary against a real transcript with a real, non-empty subagents sidecar directory, and asserts today's dark result: the receipt the hook writes carries nosubagentsfield. It is written to flip, not to pass forever — the assertion message says so and names what to do instead of deleting it when the fix lands.The fix itself, for the signing sitting
bin/hook-session-end.jsis core (bin/hook-*) and the self-mod gate denied this lane's attempt to edit it unsigned (request logged, denial receipted). The change is one word:transcriptPathis already in scope inmain()two lines above — no new variable, no new import.What was tested
Full suite on this branch: 953/953 (952 from #47 + 1 new). The new test passes today because it asserts the absence of the field; it should be re-run and flipped to assert presence plus the expected count/totals (shape mirrors the second case in
test/subagent-ingest-wiring.test.js) once the one-line fix lands in the same signing sitting.What a reviewer should doubt
lotor-lane/subagent-receipts(WO-TRACE-BRIDGE-01: wire the subagent summary into ingestSession (write half, non-core) #47), notmain. If WO-TRACE-BRIDGE-01: wire the subagent summary into ingestSession (write half, non-core) #47 merges first, this should retarget tomaincleanly (git will show it as already-applied); if this lane's charter means anything by "one WO at a time," reviewing WO-TRACE-BRIDGE-01: wire the subagent summary into ingestSession (write half, non-core) #47 first is the natural order anyway.🤖 Generated with Claude Code