journeymetrics: fold dispatched-ensign transcript into --read adoption#448
Merged
Merged
Conversation
The --read adoption counters (status_read_calls/scoped_read_calls) parsed
only the FO front-door stream, but `status --read` adoption is principally
an ENSIGN behavior — the ensign runs as a separate sub-agent session whose
transcript lands on disk, never in the FO stream. So four real FO captures
all measured 0/0.
- FoldEnsignReadAdoption sums each ensign transcript's two adoption counters
onto the FO observation (parse-per-transcript-then-sum, so per-session tool
IDs never cross-count). turns/tokens/tool_calls keep FO-front-door semantics.
- commandInvokesStatusRead now normalizes the launcher token preceding
`status` (strip surrounding quotes, then accept a literal launcher name or
the SPACEDOCK_BIN variable family), so the dominant real forms
(spacedock_launcher, ./spacedock) and the contract-canonical quoted
"${SPACEDOCK_BIN:-spacedock}" all count. $SPACEDOCK stays unrecognized.
- The live harness globs the ensign subagents/agent-*.jsonl under the FO
session's subagents dir and folds them in emitClaudeScenarioMetrics.
Re-parsing the spike's real ensign transcript now yields status_read_calls=2
(was 0) and scoped_read_calls=6.
Co-Authored-By: Claude Opus 4.8 <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.
Make the journeymetrics
--readadoption metric measure the dispatched ensign's reads — the surface the contract sites actually steer — so the before/after stops being a vacuous0==0.What changed
status --read+ scoped-Readcounts into the per-journey adoption counters (parse-per-transcript-then-sum).SPACEDOCK_BINfamily) so the contract-canonical quoted launcher counts; keep$SPACEDOCKout.emitClaudeScenarioMetrics.Evidence
go test ./internal/journeymetrics/ ./internal/ensigncycle/— all passed;go vet -tags live ./internal/ensigncycle/clean.status_read_calls=2(was 0),scoped_read_calls=6.f5