fix(review): verification-run nits — terminal zero-usage guards, TOCTOU re-emit, honest scale caveat

main

Commit

peyton-alt2mo ago

The post-fix verification crew run (approve with nits) left four lows:

  • Claude's terminal result emission was unconditional, so a usage-less result envelope emitted Tokens{0,0} and erased the mid-run cumulative total — the same clobber class fixed on the codex side; now gated on non-zero usage.
  • The rollout tailer re-emits its last totals on stop (bypassing dedup), closing the nanosecond TOCTOU where a per-turn stdout emission races past the parser's tailerEmitted check and would otherwise stand as the final recorded value.
  • The parser comment claimed turn.completed usage is per-turn scale while the test fixture comment called it running usage; both now state the honest position — unverified for real multi-turn output, identical either way for single-turn exec reviews, tailer wins whenever present.
  • Two parser tests fed thread.started without the codex session-dir override, sending the tailer globbing the real ~/.codex/sessions and exposing exact-count assertions to nondeterministic injection.

Co-Authored-By: Claude Fable 5 noreply@anthropic.com Entire-Checkpoint: 01KWYP9YXJ19MGHWQ2RWFA4EDR

Checkpoints

test(review): pin that codex $name skills survive the legacy repair + native invocation

Claude Code
View session
Checkpoint 1