You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
_choose_summarizer_provider reads one None for two facts, so a Codex session with a vanished transcript is silently billed to Anthropic #477
Found by the v0.24.0 gate 3 round-2 release audit (strategy A, ranked misreports). Not blocking; carried forward.
pipeline/host.py:341-347 -- transcript_path() returns None for two different facts: the var was
never set, and the var was set but os.path.isfile says the file is gone. pipeline/haiku.py:238-240
reads that single None and returns "claude" silently.
Its own docstring (haiku.py:228-233) promises the opposite for the second case:
A transcript that WAS exported but could not be sniffed (deleted between export and this read...)
logs why it fell to 'claude' -- an operator debugging a wrongly-billed session must be able to tell
'genuinely Claude Code' from 'could not tell'.
Measured, four probes through haiku._choose_summarizer_provider() with stderr captured:
A unset : provider='claude' stderr=''
B set-but-file-deleted : provider='claude' stderr=''
C set + real codex transcript : provider='codex' stderr=''
D set + unrecognised shape : provider='claude' stderr="[haiku] WARNING: could not identify the host..."
D fired, so the probe is sound. B is indistinguishable from A.
What it costs. A Codex session whose exported transcript went away between export and read is
routed to claude -- billed to Anthropic, the exact outcome 60837af (#462) exists to prevent --
with no receipt at all.
Why no single diff contains it. The two-Nones-in-one arrived in b909b8f/6a5f5ca (#407/#431).
The consumer that reads the None as "unset" arrived weeks later in 5080cfc (#465). This is a
composition defect, which is what the release-level pass exists to find.
The one fact that would settle the fix: whether transcript_path() is meant to be the place that
distinguishes the two, or whether the caller should re-read os.environ[TRANSCRIPT_PATH_VAR] itself.
Fix that removes the defect: split the two Nones, or warn at haiku.py:239 when the var was set
and the file was not there. Fixing only the docstring leaves the operator blind -- which is why this
ranks misreports and not a documentation nit.
Activity
chore(release): 0.24.0
fix: three misreports in pipeline/ -- a fault silently reads as the o…