fix: cover the FORCE exemption, read launch timestamps past 8 KB, count an unreadable parent once - #44
Merged
Conversation
…nt an unreadable parent once
…ilures on an empty report
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.
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):
belowPinhad no working coverage. The fixture (envForcewith noenv) resolved to the session model, so the guard was never reached, and the assertion looked forbelow its pin, a string the report never prints. Mutation-checked: deletingif (e.envForce) return false;did not fail any test. Now areviewerforced to haiku under an opus session must printforced=haikuand not land in the below-pin section; the mutant fails.launchedAtread 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.unreadableandparentUnreadableand printed as two files. Now a set of paths; the parent count is a clause of the same footer line.commands/stats.mdsaid only the dispatch report knows the session model at that moment and then said both sides stamp it. The exclusive clause is gone.Commit 2 (Codex pass):
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 ignoresmodeland pins; a plainCLAUDE_CODE_SUBAGENT_MODELdecides only bare unpinned dispatches).Not changed, on purpose
tokensread the dispatch log, which keeps 30 days, whiletokens --days 60reaches further. Nothing on this machine has ever carried an env dispatch.--session fableplus--session opuscount a switched session twice while their volumes reconcile exactly. Documented in the source.Exploreis excepted from the report's tier-leak line and counted in the tokens bare-inheritance line. Pre-existing.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.