Repository navigation
evals: split transcripts at header pairs, not bare $ lines - #5
Merged
angel291592 merged 2 commits intoNov 6, 2026
Merged
Conversation
… one Follow-up to the header-pair split: a zero-byte transcript (a run killed mid-write, a copy truncated in transit) still parsed to [], so --rescore reached turns[-1] and raised IndexError without naming the file. The guard only fired when the text was non-empty. Raise whenever no turn parses, and cover the empty case in --selftest.
Owner
|
Added one commit to this branch while reviewing (
Nothing else changed: the header-pair splitter and its shared use in |
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.
Summary
Fixes #4.
parse_transcript()treated any line starting with$as a turn boundary. Command output can legitimately contain that shape (a test runner echoing the command it ran, a script printing a prompt, agit logmessage quoting a command), and when it does, the turn is cut in half: the prefix no longer matchesTRANSCRIPT_BLOCKand is silently discarded, along with everything after the false boundary.--rescorethen re-judges the run without the turn that may have carried the emitted spec or the reply under assertion.The same in-band assumption appeared in
delivery_spec()and in theaux.intent_checkderivation, which both split on"\n\n$ ".Change
[exit N]line (TRANSCRIPT_HEADER). A lone$line is output, not a separator.split_transcript_blocks()is used byparse_transcript(),delivery_spec(), andscore_user_api_caching()'sintent_check, so the three copies cannot drift.DELIVERY_SESSION_SEPis removed (it had no other references).SystemExitnaming the file, instead of returning[]and lettingrescore()fail later withIndexError: list index out of rangeonturns[-1]["status"].intent_checkstill finds the final session when its body contains a$line before the marker.The two behavioural regression cases fail under the previous logic — verified directly against the old splitter:
Verification
All offline gates pass on the Linux host:
selftest passedOK(493 lines, 491 chars)OK(37 links; version, README evals, skill references and install command all 0 problems)No live suite was run: this change touches offline parsing only (
--rescore, delivery scoring, selftests), and the offline gates exercise every modified path.Compatibility
Existing transcripts parse identically: every genuine boundary written by
run_case_once()andpersist_snapshot()already satisfies the header-pair rule. The change only stops treating output lines as boundaries. One residual ambiguity remains by construction — output that itself contains a full$ <cmd>+[exit N]pair is indistinguishable from a real header in the current human-readable format; a length-prefixed or JSON-lines record format would remove it entirely, but that is a persistence-format change and is out of scope here.Risk
Low. Parsing-only change, no scoring semantics, case data, or reports touched. The failure mode it replaces is silent evidence loss.