Skip to content

fix: cover the FORCE exemption, read launch timestamps past 8 KB, count an unreadable parent once - #44

Merged
AqueGen merged 2 commits into
mainfrom
fix/post-merge-integration
Sep 10, 2026
Merged

AqueGen merged 2 commits into
mainfrom
fix/post-merge-integration

Conversation

@AqueGen

@AqueGen AqueGen commented Sep 10, 2026

Copy link
Copy Markdown
Owner

What

Follow-up to #38-#42 after an integration review of the merged main (Opus), then a Codex gpt-6 pass over main plus this branch.

Commit 1 (integration review):

  • Test: the FORCE exemption in belowPin had no working coverage. The fixture (envForce with no env) resolved to the session model, so the guard was never reached, and the assertion looked for below its pin, a string the report never prints. Mutation-checked: deleting if (e.envForce) return false; did not fail any test. Now a reviewer forced to haiku under an opus session must print forced=haiku and not land in the below-pin section; the mutant fails.
  • launchedAt read 8 KB and only the first line. Real first lines carry the prompt before the timestamp; 42 of 1250 agent transcripts on this machine exceed 8 KB before it and silently fell through to the transcript head. Now a 64 KB slice, first timestamp in it. Test with a 20 KB first line, head and timeline naming different models; mutation-checked.
  • One unreadable parent transcript was counted in both unreadable and parentUnreadable and printed as two files. Now a set of paths; the parent count is a clause of the same footer line.
  • commands/stats.md said only the dispatch report knows the session model at that moment and then said both sides stamp it. The exclusive clause is gone.
  • The "12.5x cheaper" cache-read ratio in README, SKILL and evals README is 50x on Fable 5.1 and Mythos 5.1 after fix: price Fable 5.1 cache reads at 0.025x and keep Sonnet 5 at $2/$10 #38; said so where the ratio is quoted.

Commit 2 (Codex pass):

  • "Ran on a cheaper model" was a priced claim the tier statistic cannot make. Measured: five opus agents dispatched from a Fable 5.1 session moved 258.5M input/cache tokens and cost $169.43 on opus against $148.56 had they stayed on Fable 5.1, because Fable 5.1 cache reads are 0.025x of $10 and opus cache reads are 0.1x of $5, twice the rate per token. Both headlines now say "lower tier"; the tokens headline and the cache-read footer say lower tier is not always cheaper and point at the dollar rows; SKILL's "sticker 2x" claim is scoped to base input and output.
  • Empty tokens report: read failures were swallowed by the "No subagent transcripts found" exit; they are declared there now.
  • Eval per-model means divided partial usage from unpriced runs by every run; they now use the same priced population as the total.
  • commands/stats.md: absent volume for a warned role is "could not be reconciled", not proof the count overstated.
  • hooks/routing-anchor.md: the pin-ceiling rule names the two env exceptions (FORCE ignores model and pins; a plain CLAUDE_CODE_SUBAGENT_MODEL decides only bare unpinned dispatches).

Not changed, on purpose

  • The FORCE/env caveats in tokens read the dispatch log, which keeps 30 days, while tokens --days 60 reaches further. Nothing on this machine has ever carried an env dispatch.
  • "N agents" in the per-model rows counts agent-model pairs while "By session model" counts transcripts; --session fable plus --session opus count a switched session twice while their volumes reconcile exactly. Documented in the source.
  • Explore is excepted from the report's tier-leak line and counted in the tokens bare-inheritance line. Pre-existing.
  • Section labels "Ran cheaper (routed down)" and "of the cheaper ones" keep their short form; the headline above them now carries the qualification.

Verification

node --test hooks/dispatch-counter.test.mjs hooks/update-check.test.mjs: 105 pass, 0 fail. The two commit-1 tests fail against the reverted code.

@AqueGen
AqueGen merged commit f4ca263 into main Sep 10, 2026
2 checks passed
@AqueGen
AqueGen deleted the fix/post-merge-integration branch September 10, 2026 11:06
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