Skip to content

journeymetrics: fold dispatched-ensign transcript into --read adoption#448

Merged
clkao merged 1 commit into
mainfrom
spacedock-ensign/journeymetrics-ensign-read-adoption
Jun 30, 2026
Merged

journeymetrics: fold dispatched-ensign transcript into --read adoption#448
clkao merged 1 commit into
mainfrom
spacedock-ensign/journeymetrics-ensign-read-adoption

Conversation

@clkao

@clkao clkao commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

Make the journeymetrics --read adoption metric measure the dispatched ensign's reads — the surface the contract sites actually steer — so the before/after stops being a vacuous 0==0.

What changed

  • Fold each dispatched-ensign sub-agent transcript's status --read + scoped-Read counts into the per-journey adoption counters (parse-per-transcript-then-sum).
  • Normalize the launcher token (strip quotes, canonicalize the SPACEDOCK_BIN family) so the contract-canonical quoted launcher counts; keep $SPACEDOCK out.
  • Wire the ensign-transcript disk-glob into the live harness's emitClaudeScenarioMetrics.
  • Add fold + launcher-table unit tests, with a no-op-fold perturbation guard.

Evidence

  • go test ./internal/journeymetrics/ ./internal/ensigncycle/ — all passed; go vet -tags live ./internal/ensigncycle/ clean.
  • Real ensign transcript folds to status_read_calls=2 (was 0), scoped_read_calls=6.

f5

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>
@clkao
clkao merged commit a97ed24 into main Jun 30, 2026
4 checks passed
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.

1 participant