Skip to content

test(scenario-eval): pre-register the line-opening probes and their gate - #2144

Merged
yyhhyyyyyy merged 25 commits into
mainfrom
hui/branch-scenario-preregister-4
Nov 25, 2026
Merged

yyhhyyyyyy merged 25 commits into
mainfrom
hui/branch-scenario-preregister-4

Conversation

@yyhhyyyyyy

@yyhhyyyyyy yyhhyyyyyy commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #2125. Refs #2139, #2140.

identity-after-compaction no longer depends on the model's decision to open a line. A calls step creates the line before the message with session.branch_create (parentBranchId main, at "session_open", the parser subsystem's prompt), a steer 0.1 seconds after the first submission tells main that a user line already builds parser/ and keeps it on cache/, and an afterIdle step settles what the model left undone: every line that did not compact on its own is compacted with session.context.compact, and each line then gets one request asking it to re-run the tests of its own subsystem. The message, the workspace and the 29,000-token window stay redone-work's, and the shared premise assertion is unchanged. The runner sends a session_open call with the sequence session.create returned, so the line starts where the Session did and carries main's configuration; a numeric at keeps its meaning. A run whose calls step fails stopped before its message, so it never sent the configured text to a model: it is recorded as setup_failed, listed apart from the runs that failed later, and entered in the failed-run rate while staying out of every probe rate. A session_open call whose Session reply carries no sequence is one such failure.

A run that the harness's own turn cap stops before the request a probe reads existed is an incomplete fixture, not a loss of identity. Every input the runner submits keeps a receipt: the scenario's message, each request the step after the first idle submits, both inputs a switch sends, and a steer the fixture submitted, with the input id the Session answers. One resolver reads what became of an input: the turn its line consumed it in, the first step/model-start after that consumption with no turn/start or turn/end in between, and that request's own model/call, or the call of a request a steer replaced it with in the same turn. A run whose turn cap stops it before the step after the first idle, or before one of those requests carries its input, carries incomplete with the reason: failed stays false, the judge is not asked, and the report lists it in its own table. A run that stopped on its wall clock is a failed run as before, and a run that ended idle keeps the scoring it had before the class existed: the class covers only the harness's own turn cap, not the run's time budget or the product's idle state. A run whose compaction or review request fails still fails as before.

An incomplete fixture is not compared. The failed-run and unjudged-run rates count the runs an arm had something to compare in, its judged, failed and unjudged runs, so an incomplete fixture lowers neither rate. attempted and incomplete are reported beside those rates and enter no comparison; setup_failed still counts in the failed-run rate; FLOOR = 20, delta = 0.05 and alpha = 0.10 are unchanged. Both languages of model-prompts.md section 8.1 state the denominator and what carries an input.

The probe reads a line's own identity: after a compaction, a line's next request still carries its own identity block. The clause about main's roster is gone, because the line the harness opens is not in the roster the model reads, and the section 12.3 row in both languages drops it as well. A flow test pins what the probe depends on: after a manual compaction the line's next request carries exactly one identity block, the one the compaction's baseline holds, with the opening input behind the cut.

The opening text gets a second gate, pre-registered in docs/design/timeline-branches.md section 12.4 in both languages before any data. The opening probes are line-opened-for-one-job in long-work-and-a-flaky-test and refactor-and-a-pasted-report, and new-default-opens-a-line in switch-then-open-lines. The three probes form one family fixed at m = 3, and no probe leaves it whatever its counts. A probe whose gain is at most delta = 0.05 enters with p = 1 and still takes its rank, so a probe at its ceiling cannot shrink the family or loosen another probe's threshold. At least one probe must gain more than delta and reject at Holm-adjusted 0.10 over the three rows, and every opening probe stays subject to gate 1's no-regression comparison. Gate 2 is inconclusive when an arm counted no run on a probe, or when no probe could gain more than delta even with a perfect candidate arm. The report judges gate 1 alone; gate 2 is computed by the change that first runs the opening text.

Gate 2 in arithmetic: a probe's gain is c1/n1 - c0/n0, where c0 of n0 counted runs passed in the current arm and c1 of n1 in the candidate arm; the arms need not count the same runs. The probe enters with p = 1 when 20(c1 n0 - c0 n1) <= n0 n1, so a gain at or under delta never rejects; otherwise its p is the one-sided mid-p Fisher exact test of "no gain" on (c0, n0) against (c1, n1). Holm ranks all three rows by p: the row at rank i rejects when p <= 0.10/(4 - i), and no row rejects after one fails. At least one rejection passes gate 2; an arm with n = 0 on a probe, or a family where no probe could gain more than delta, is inconclusive.

The judge's view renders a request's consecutive step/thinking deltas as one line with their joined text. A delta line was mostly an event id and field names, and a reasoning-heavy run could outgrow the judge's window: in a recorded floor set, 233 views came to 612.7 MB, 72.9% of it thinking, 76 runs were unjudged before a call and 45 failed on a provider window refusal. In the validation below, one run's 1,583 thinking deltas became 19 view lines and its view fell from 3.9 MB to 0.6 MB. Every other view line stays as it was, the judge still reads the whole run in one call, and the existing view-rebuild assertions are untouched; a new unit test pins the merge.

Both follow-ups a move sends keep a receipt: the input on the line its message went to and the input on the line it left, the root included. The switch-note check reads each of them before it reads a note. The check reads the first request after a consumed switch input, inside the turn that consumed it, and it passes over a request a steer replaced before its model call: the request that replaces it in the same turn carries the note. A turn/start or turn/end between the consumption and that first step/model-start means the input never reached the model in its own turn, and a later turn's request does not answer for it. A request the run's own turn-budget stop ended before its model call is not a missing note either: it is named by the budget: turns interrupt that stop writes and the request the interrupt found in flight, which is the last request that started before the interrupt and had not already ended by its own non-cap model-output-end or by its turn's turn/end. A request that had already ended was not in flight, and the stop is sent to every line, idle ones included. A later request of the same line meeting the cap does not exempt an earlier one the cap did not stop, and the scan stays inside the turn that consumed the input. The note the cap stopped is not a missing note, but the run is not scored either: no request carries the switch input to the model, so the run is recorded as an incomplete fixture, unless another receipt or note of the same run confirms a failure. The check reads every receipt and every note before it reports the cap, so a request that never reached the model, or one that reached it without its note, still fails the run and enters gate 1's failed runs. A follow-up no turn consumed has the same shape: when the run stopped on its turn cap, the cap left it unobserved and the run is incomplete only when nothing else confirms a failure; when it did not, no answer of that line is scored. A start that carries no turn id joins no other start's turn and takes neither exemption, because without the turn neither the steer nor the stop can be placed; every recorded export carries a turn id on every start. Every other shape still fails the run with switch_note_missing before the judge: a consumption whose request never reached the model before the run ended, whether the session closed it after its model-start or no request started after it, and a request that reached the model without the note. The 16 recorded switch_note_missing runs are all the close shape, and this change leaves them failed; #2140 tracks that race, and this change only stops counting the shape above as a missing note.

The scoring contract: a run has one of five outcomes, and each outcome enters exactly these denominators.

outcome probe rate floor gate 1 failed rate gate 1 unjudged rate gate 2, an opening probe's n report
scored (judged) counted counted denominator denominator counted attempted + 1
unjudged not counted not counted denominator numerator and denominator not counted attempted + 1, listed with its reason
failed not counted not counted numerator and denominator denominator not counted attempted + 1, listed as a run failure
setup_failed not counted not counted numerator and denominator denominator not counted attempted + 1, listed as a setup failure
incomplete not counted not counted neither neither not counted attempted + 1, listed with its reason

Each row below is the stop a run reached, and each column is a fixture step the run had to observe; the cell is the outcome when that step is the one that did not happen. A step the stop cannot leave unobserved is n/a. A confirmed failure always wins: a cell that reads incomplete leaves the run out of the comparison only when no other receipt or note of the same run confirms a failure, and such a failure fails the run and enters gate 1's failed runs.

stop message calls after-idle step compaction after-idle request sent after-idle request carried move follow-up carried follow-up unconsumed note steer
idle scored n/a n/a n/a n/a scored n/a failed (a_consumed_switch_input_whose_request_never_reached_the_model_is_unseen) scored failed scored
turns incomplete n/a incomplete incomplete incomplete incomplete failed failed when another receipt or note confirms a failure, incomplete when the cap stopped this request, failed otherwise failed when another receipt or note confirms a failure, incomplete when the cap left this one unobserved failed when another receipt confirms a failure, incomplete when the cap stopped this request, failed otherwise incomplete (a_sent_steer_keeps_a_receipt_on_the_line_it_went_to)
seconds failed n/a failed failed failed failed failed failed failed failed failed
setup_failed n/a setup_failed n/a n/a n/a n/a n/a n/a n/a n/a n/a
switch_target_not_reached scored n/a n/a n/a n/a n/a failed n/a n/a n/a scored
switch_target_ended scored n/a n/a n/a n/a n/a failed n/a n/a n/a scored
switch_target_unknown scored n/a n/a n/a n/a n/a failed n/a n/a n/a scored
switch_note_missing scored n/a n/a n/a n/a n/a n/a failed n/a failed scored
switch_incomplete scored n/a n/a n/a n/a n/a failed n/a n/a n/a scored
error failed failed failed failed failed failed failed failed failed failed failed

The minimal validation ran 100 real-model scenarios on the configuration the evaluation uses: 80 in the first pass (identity-after-compaction 8 per arm, user-line-becomes-default and switch-continue-directly 12 per arm, long-work-and-a-flaky-test 8 per arm), then 16 user-line-becomes-default runs after a later revision of the switch-note check and 4 more after the next revision. The first pass had no judge-unfit and no judge-call failures in any group, and its identity-after-compaction group scored 8/8 in both arms; that group ran the earlier fixture, which asked the model to open the line, before this change. user-line-becomes-default recorded 10 switch_note_missing runs among the 48 switch runs of the first pass, 6 more in the 16-run check and 5 wall-clock stops whose judge calls failed, and the last 4 runs ended idle and judged. Those switch-note numbers were measured before this check changed. The 100-run cap is fully used (100/100). The only model evaluation spent on this revision is the smoke run of identity-after-compaction on the evaluation's own configuration: six runs, three per arm, ran before this change on the earlier fixture that cut the line at at 0, and five runs per arm ran on the committed fixture after it. In the six earlier runs both lines compacted and the follow-up request went out in 4 of 6; the other two failed when the line's manual compaction answered "Context is not configured; adopt a model first". main never opened another line and never edited parser/; 2 of 6 read parser/expr.py, one of them printing it in exec as well, and 3 of 6 ran the full python3 -m unittest discover -s tests on its own in exec, as the scenario message asks. In the ten runs on the committed fixture: both lines compacted and the follow-up request went out in 9 of 10; the tenth ended before the follow-up when the line's manual compaction answered that the compacted context does not reduce input. main never opened another line or edited parser/ in any of the ten, and 5 of 10 read parser/expr.py: three with the read tool and two that printed it from exec, one with cat and one with head. Both probes passed in both arms: the identity probe 4/4 and 5/5, and line-stays-a-line counted no violation; the report is inconclusive only because 4 and 5 judged runs are under the floor of 20. Replaying the delivered checks over the recorded exports keeps the 16 switch_note_missing runs failed, and every group's attempted and runs counts are equal because no recorded run stopped on the turn cap; no recorded run became incomplete. The consuming-turn rule accepts and rejects the same follow-up requests as the check this revision builds on, so failed and setup_failed are unchanged there. One run recorded as judged under an earlier revision of the check fails when the delivered check replays it, because its former line's follow-up was consumed in a turn that ended before the request reached the model. Every message and after-idle request in the ten runs on the committed fixture was carried by its consuming turn. The full family run belongs to the policy-text change.

The two runner fixes are tracked in #2139 and #2140.

…iew line

The judge reads a whole run in one call, and a step/thinking delta line carries mostly an event id and field names. A request with thousands of deltas inflates the view enough to leave the run unjudged, or to have the provider refuse it.

The view joins a request's consecutive thinking deltas into one line, keeping the first delta's id and position and the text of every delta in order. Every other line stays as it was, and the judge still reads the whole run in one call.

Refs #2139.
long-work-and-a-flaky-test and refactor-and-a-pasted-report each add the must_show probe line-opened-for-one-job: the run opens one line for one of the two jobs while it still has the other to do, does that other job itself, and the brief names the job the line takes.
… line

The message asked for two independent subsystems, but whether a line opens was left to the policy, so the identity probe scored the opening preference rather than the identity surviving compaction. A user steer asks for the parser line directly, and the message and workspace stay redone-work's.

Refs #2125.
The opening text now has a second gate beside no regression: over the opening probes, at least one must gain more than delta = 0.05 and reject at a Holm-adjusted alpha = 0.10. A probe leaves gate 2 when its current arm's counted runs leave no headroom: even a candidate that passed every counted run of its arm could not both gain more than delta over the current arm and reach a one-sided mid-p at or below alpha = 0.10. The excluded probe stays in gate 1, and the gate is stated in both languages.
A steer can replace the request a line began after it consumed a switch input before that request reaches the model, and the request that replaces it in the same turn carries the note. The check read the first request started, so it scored the cancelled request instead of the one that replaced it.

The check now passes over a request a steer replaced and reads the request that replaced it. A run that stopped on its turn budget ended the request before its model call, so its note is not reported as unseen. Every other request that never reached the model is still reported as a missing note, so the run still fails before the judge: a session close that ends the run and a consumption with no request started after it are not skipped.

The opening scenarios' committed-set assertions move to a test of their own, so the pre-existing committed-set test stays as it was.

Refs #2140.

@eric8810 eric8810 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] Keep the opening-test family fixed or calibrate the selection step (docs/design/timeline-branches.md, §12.4, and the Chinese counterpart). Eligibility uses the observed current-arm pass count, which also drives the directional p-value. A low current result both makes an apparent improvement more likely and admits the probe into a possibly smaller Holm family. Preregistering this rule does not make the filter independent. I enumerated both arms’ binomial counts under a null with three independent opening probes, 48 judged runs per arm, and identical 95% pass probabilities. With the documented filter, mid-p and δ > 0.05, Gate 2 alone claims at least one gain 11.70% of the time; keeping all three slots and assigning excluded probes p=1 gives 7.62% in this example. Please keep the three-probe family fixed (headroom can still make the round inconclusive), or calibrate the full selection procedure. Also spell out unequal counted sample sizes: 5/8 current versus a perfect 8/8 candidate has mid-p .050, but versus a perfect 3/3 candidate it is .170. Different judge exclusions can flip eligibility.

[P2] Only exempt the request actually stopped by the turn cap (xtask/src/scenario_eval.rs:6192–6223). stopped_on_turns is run-wide. A switch follow-up on one line can start but never reach a model call for an unrelated reason; if another line later hits the turn cap, the same missing follow-up is silently exempted, even though the cap did not stop it. This also lets the scan advance past a steer-replaced request into another turn on that line: candidates are filtered by branch and sequence, not turn. Track the consumed input/replacement turn and the specific request(s) cut by the cap, and keep earlier missing calls as switch_note_missing. Please add a regression case with an earlier no-call follow-up and a later unrelated cap.

Non-blocking performance note: merging thinking deltas with format!("{text}{delta}") copies the entire prefix on every delta. Appending to a String and writing it into the JSON at flush keeps the reduction linear for long traces.

Static review of bd214e32; Linux CI was running. I did not rerun live scenarios.

@zerob13 zerob13 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep line creation out of the compaction identity verdict. The fixture now explicitly asks the model to open a line. That improves the chance that the probe has something to observe, but the model still decides whether the fixture exists. A missing line therefore produces the same absent verdict as loss of identity after compaction. This is the confound #2125 asks the change to remove; the reported 8/8 opening in both arms does not remove it for future policy comparisons.

Have the harness establish the line as a shared prerequisite, or add a separate identity probe on a harness-opened line. Report failed setup separately from loss of identity. The Linux evaluation tests passed on this head; they do not establish that the identity fixture is independent of the model's line-opening decision. The peer review already covers the statistical family and turn-cap checks, so I am not duplicating them here.

The note check exempts any request without a model call when the run stopped on its turn budget, so a request that never reached the model for another reason is exempted as soon as any line meets the cap. The check now names the cap from the export: a request is exempt when its own end carries the reason that stop sends, or when it was the request its line had in flight at the stop's interrupt, and nothing else is.

The scan also stays inside the turn that consumed the input. A steer's replacement starts in that turn, so a request of a later turn no longer stands in for a request that never reached the model.

The regression test has an earlier follow-up whose request the run closed before the model and, later in the same run, a request of that line the cap stops. The earlier follow-up still fails the run.
The cap's interrupt is written to every line, including idle ones, so the last step/model-start before it is not always a request the cap stopped: a request that had already ended on its own was not in flight. The interrupt now names the last request that started before it and had not already ended by its own non-cap model-output-end or by its turn's end.

The regression test covers both end shapes with no later request on the line: the earlier request still fails the run with switch_note_missing, and it failed the same way at the previous head.
The judge view joined each delta with format!("{text}{delta}"), copying the whole prefix on every delta of a reasoning-heavy request. The open line now keeps a String that each delta appends to, and the joined text is written into the line when it is flushed. The rendered view is unchanged.
…family

Gate 2 left a probe out when its current arm's counts left no headroom, so the observed pass count both admitted the probe into a smaller family and drove its p-value. The three opening probes are now one family fixed at m = 3 before any data: a probe whose gain is at most delta enters with p = 1 and still takes its rank, and Holm adjusts all three rows. A gain and its one-sided mid-p use each arm's own counted runs, so unequal judge exclusions change the p-value rather than eligibility; an arm with no counted run on a probe, or a family where no probe could gain more than delta, is inconclusive.

The report applies the gate when the branch tool description is the evaluated text and the scenario set carries the three opening probes. A test pins the family at the three committed probes whatever the counts, and another pins that other texts and sets without those probes are not judged. The design text is updated in both languages.
The report judged gate 2 whenever the branch tool description was the evaluated text and the scenario set carried the three opening probes. No evaluation configured that text, so nothing but the new tests reached the code, and the verdict line at the top of the report still judged gate 1 alone. The design text in §12.4 stays: the three probes are one family fixed at m = 3, a probe at or under delta enters with p = 1 and keeps its rank, Holm at alpha = 0.10 runs over all three rows, and an arm with no counted run or a family with no headroom is inconclusive. The report prints gate 1 only, as it did before, and the implementation follows in the change that runs the opening text.
A `step/model-start` without a turn id took the empty string, so every such start fell into one turn: a note check that means to read only the turn that consumed the input fell back to a scan of the branch, and a request a later turn started could stand in for one that never reached the model. A start without a turn id now joins no other start's turn and takes neither exemption: neither the steer that replaced it nor the stop that ended it can be placed without the turn. The test with a replaced request states the turn it ran in, as every recorded export does. A start without one that has no model call is still reported.
The turn-budget fixtures wrote `stop/interrupt` with scope `branch`, which is the scope a Timeline closes with, not the one `session.stop` writes: the cap stops the turn it found in flight, so its interrupt carries scope `turn`. The check reads the reason and not the scope, so the fixtures passed either way; they now record the event the runtime writes, so a later check that reads the scope sees the real one.
…rst idle

The identity probe read whether the model opened a line, so a run whose model kept to itself reported the same absent verdict as a run that lost its identity after a compaction. The scenario now opens the line itself: a `calls` step creates it on `parser/` before the message, a 0.1s steer keeps `main` on `cache/`, and a new `afterIdle` step compacts every line that did not compact on its own with `session.context.compact` and then asks each line one request that re-runs its own tests. The probe reads a line's own identity block; `main` no longer has a roster to carry, so the phrase about it and the §12.3 row that named both are gone.

A run whose `calls` step fails stopped before its message, so no request of it saw the configured text: it is recorded as `setup_failed`, still a failed run for the gate-1 rate, out of every probe rate, and listed in the report beside the runs that failed later. A compaction that does not complete in the step after the idle fails the run there, so a request is only judged as one after a compaction when a compaction happened. The line the `calls` step opened is known before its `branch/create` notice arrives, so a run that stops early does not go idle with that line still starting.
The compact scenario now settles its lines with `session.context.compact`, so the identity probe reads a request that follows a manual compaction rather than an automatic one. A flow test compacts a line by hand and checks that the compaction completed, that its baseline carries the line's identity block, and that the request after it carries that block once: the opening input that first carried the identity is behind the cut, so the identity the request shows comes from the compaction's baseline. The compaction model keeps the last turn inside the retention bound at a 29,000-token window, and the line adopts a model, which the manual step reads from the branch rather than from the request.
…on did

A `session.branch_create` call in a scenario could only name a numeric sequence, so the compact scenario cut its line at 0. A line cut before `main`'s `context/configured` carries no configuration of its own, and `session.context.compact` on it fails with "Context is not configured; adopt a model first"; the fixture's smoke runs failed there before any compaction.

A call may now write `"at": "session_open"`, and only a `session.branch_create` whose `parentBranchId` is `main` may do so. The runner sends it with the sequence `session.create` returned, so the line starts where the Session did without the scenario naming a number; a Session reply that carries no sequence fails the run in its calls step, before the message. A numeric `at` keeps its meaning, and a call that omits it is sent as written.

The fake daemon in the runner's tests still answers `session.create` with no sequence, so the reply's sequence is optional until a `session_open` call needs it. A parser test covers the placeholder's validation, and two driver tests cover the fill and the missing-sequence setup failure.
a_parent_read_carries_the_effects_its_tool_results_declared asserts what a branch page carries from its parent's tool results; it needs no system prompt. The line was a stray edit beside the manual-compaction test and is removed, leaving the test as it is on main.
`--rejudge` and `--pool` read a runner-written `runs.jsonl` through `stop_name`, which did not know the `setup_failed` stop the runner writes when a calls step fails, so the whole read was refused with "the saved run has an unknown stop setup_failed". The stop maps to itself, and a test writes such a record and reads it back through the pool's reader.
@yyhhyyyyyy

Copy link
Copy Markdown
Collaborator Author

Fixed in 0390f0d.

Gate 2 now keeps the three opening probes as one family fixed at m = 3. No probe leaves it: one whose gain is at most delta = 0.05 enters with p = 1 and still takes its rank, so a probe at its ceiling cannot shrink the family or loosen another probe's threshold. The gate is at least one probe gaining more than delta over the current arm and rejecting at Holm-adjusted 0.10 over all three rows, and every opening probe stays subject to gate 1's no-regression comparison. The gain and its one-sided mid-p use each arm's own counted runs, (c0, n0) against (c1, n1), so unequal judge exclusions change the p-value rather than eligibility; an arm with no counted run on a probe makes the gate inconclusive, and so does a family where no probe could gain more than delta. The pre-registration in docs/design/timeline-branches.md section 12.4 is updated in both languages; the report keeps judging gate 1 alone until the change that evaluates the opening text.

The switch-note check no longer exempts every request of a run that stopped on its turn budget. A request is exempt only when that stop ended it: either its step/model-output-end carries the budget: turns reason the stop sends, or it was the last request that started before the stop's stop/interrupt and had not already ended by its own non-cap model-output-end or by its turn's turn/end. A request that had already ended was not in flight, and the stop is sent to every line, idle ones included. A later request of the same line meeting the cap does not exempt an earlier one the cap did not stop, and a request on another line is exempt on its own line alone. The scan also stays inside the turn that consumed the input, so a steer's replacement cannot be found in a later turn.

The regression tests cover both sides. One has a follow-up whose request the run closed before the model and, later in the same run, a request of that line the cap stops; the closed follow-up is still reported as a missing note. The other has a request that ended normally before the cap's interrupt reached its line and no later request at all; it is still reported, which it was not at the previous head. The 16 recorded switch_note_missing runs keep failing under the tightened check: none of them was stopped by the cap.

The judge view now appends each thinking delta to a String buffer and writes the joined text into the line when it is flushed, so the reduction is linear in the trace length. The rendered view is unchanged.

@yyhhyyyyyy

Copy link
Copy Markdown
Collaborator Author

Fixed in 0390f0d.

The line is now the harness's, not the model's. identity-after-compaction creates it before the message through a calls step: session.branch_create with parentBranchId main and at "session_open", carrying the parser subsystem's prompt; the runner sends it with the sequence session.create returned, so the line starts where the Session did and carries main's configuration. A numeric at still names a sequence. A steer 0.1 seconds after the first submission tells main that a user line already builds parser/ and to stay on cache/: it does not open another line and does not edit parser/ files. The message, the workspace and the 29,000-token window stay as they were, and the shared premise assertion against redone-work is unchanged.

A missing line no longer produces an absent verdict, and neither does a missing compaction. After both lines first go idle, the runner compacts every line that did not compact on its own with session.context.compact and then submits one request to each line, asking it to re-run the tests of the subsystem it is building. That request does not ask which line the model is on: the probe reads the identity block the next request carries, not the model's answer. A compaction that does not complete ends the run there instead of scoring a request that never followed one.

Setup failures are reported apart from loss of identity. A run whose calls step fails stopped before its message, so no request of it saw the text being evaluated: the record carries setup_failed, the report lists it in its own column beside the runs that failed later, and it enters no probe rate while still counting as a failed run for gate 1. No model request of such a run exists, so the policy's text cannot cause that failure. A session_open call whose Session reply carries no sequence is one such failure.

The probe reads a line's own identity now: after a compaction, a line's next request still carries its own identity block. The half about main's roster is gone, because a line the harness opens is not in the roster the model reads, and the row in section 12.3 in both languages drops it too. A flow test pins the property the probe depends on: after a manual compaction the line's next request carries exactly one identity block, the one the compaction's baseline holds, with the opening input behind the cut.

The smoke run used the committed scenario on the evaluation's own configuration: six runs, three per arm, on an earlier fixture that cut the line at at 0 before this change, and five runs per arm on the committed fixture after it. In the ten runs on the committed fixture, both lines compacted and the follow-up request went out in 9 of 10; the tenth ended before it when the line's manual compaction answered that the compacted context does not reduce input. main never opened another line or edited parser/, and both probes passed in both arms.

@eric8810 eric8810 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fixed three-probe Holm family, unequal denominators and request-specific switch-note checks resolve my earlier findings. Having the runner create the line also removes the model's decision to open it from the fixture.

[P2] Do not score the compaction identity probe when the turn cap prevents its observation (xtask/src/scenario_eval.rs:6865–6884, failed at 6064). The turn-cap check runs before the first-idle step. If the initial work reaches the cap, the runner exits with stop = "turns" and no error, bypassing the required compaction and follow-up. failed() does not treat turns as failed, so a judge can score absence even though no post-compaction request ever existed. The step also treats successful submission as completion; a cap immediately after submission can end the run before the follow-up reaches the model. Track whether the required post-compaction request was actually observed, and report incomplete fixtures separately from loss of identity without including them in the probe denominator. Please cover a turn cap before the first idle and one after submit but before the relevant model call.

Static review at 0390f0d5; Linux CI was still running. I did not rerun live scenarios.

A run the harness stopped before the request a probe reads existed is an incomplete fixture, not a loss of identity. The runner records the scenario's message and every request the step after the first idle submits, with the input id the Session answered, and the export must show each input consumed and followed by a model call on its line. A run the turn budget stopped before that step, or between a submission and the request on its line, carries `incomplete`: it is not failed, is not judged, enters no probe rate, does not count toward the floor, and the report lists it apart from failed and unjudged runs. A run that fails at the compaction or the review request still fails.
The same rule covers a switch follow-up whose request the turn cap stopped: the note check reports that shape as the cap's, not as a missing note, and the run is incomplete instead of scored. A request that never reached the model for another reason still fails as `switch_note_missing`.
Tests: `a_run_that_reaches_the_turn_budget_before_the_after_idle_step_is_incomplete` fails on the previous revision with the run judged and the probe counted; `a_turn_budget_after_the_after_idle_submit_leaves_the_request_unobserved`, `a_fixture_its_budget_stopped_before_its_requests_is_incomplete`, `a_turn_budget_stop_makes_a_note_its_stop_ended_incomplete` and `a_cap_cut_switch_follow_up_makes_the_run_incomplete` cover the two shapes and the switch follow-up.
A run that stopped on its wall clock is a failed run: the harness did not stop it before a request its probes read existed, its own budget did. The incomplete class covers only the harness's turn cap: before the step after the first idle, before a submitted input's request, or before the request a switch follow-up needed.

A run that ended idle is scored as it was before the class existed: the stop is the product's state, not the harness's budget, so an input the run left unrun is the candidate's outcome, not a fixture set aside. The failed count, the failed-run rate and the report's classes are what they were before the class existed, and no record carries a failure and an incomplete reason at once. Section 8.1 says the same in both languages.

Tests: a_run_that_stopped_on_its_wall_clock_is_failed_not_incomplete and an_idle_run_is_scored_rather_than_incomplete fail on the previous revision, where the run is recorded as an incomplete fixture.
The switch note check answers with a reason or with none: the three classes a run can end in live in switch_note_check, which reads the notes once with the turn cap's exemption and, when nothing is missing, once more without it. A note only that exemption hid was kept from the model by the cap, not by a missing note, so the incomplete class stays the cap's and every other missing note still fails the run.

The test a_request_that_consumed_a_follow_up_without_its_note_is_unseen asserts the check's own answer again, as its text reads on main, and the tests added here read the three classes from switch_note_check.
@yyhhyyyyyy

Copy link
Copy Markdown
Collaborator Author

Fixed in c3d480a.

identity-after-compaction is no longer scored when the harness's own turn cap ended the run before the request the probe reads existed. The runner records the scenario's message and every request the step after the first idle submits, with the input id the Session answers, and after the export it requires each input to be consumed and followed by a model call on its line. A run whose turn cap fires before that step, or between a submission and the request on its line, is recorded as an incomplete fixture: incomplete carries the reason, failed stays false, the judge is not asked, the run enters no probe rate, and it does not count toward the floor. The report lists incomplete runs in their own table, apart from failed and unjudged runs, so no probe reads a loss of identity from a request that never existed. A run that stopped on its wall clock is a failed run as before, and a run that ended idle keeps the scoring it had before the class existed: the incomplete class covers only the harness's own turn cap, before the step after the first idle or between a submission and the request on its line, not the run's time budget or the product's idle state. A run that fails at the compaction or at the review request is still a failed run, as before.

The same rule covers the other place a turn cap could hide the request: a switch follow-up whose request the cap stopped. The note check reports that shape as the cap's (CapCut), not as a missing note, and the run is incomplete instead of scored; a request that never reached the model for another reason still fails as switch_note_missing.

Seven tests pin the class and its boundary. a_run_that_reaches_the_turn_budget_before_the_after_idle_step_is_incomplete runs the whole evaluation on a one-turn scenario with an afterIdle step: the run stops on turns before the step, the record is incomplete, the judge is never asked, the probe counts no run, and the failed-run rate stays 0/1. It fails on the previous revision, where the record is judged and the probe is counted present. a_turn_budget_after_the_after_idle_submit_leaves_the_request_unobserved drives a scripted peer that submits the request after the first idle and writes the next turn's end before the request can start: the run stops on turns, keeps the submission, and no request follows it. Its classification is pinned by a_fixture_its_budget_stopped_before_its_requests_is_incomplete, and the switch shape by a_turn_budget_stop_makes_a_note_its_stop_ended_incomplete and a_cap_cut_switch_follow_up_makes_the_run_incomplete. a_run_that_stopped_on_its_wall_clock_is_failed_not_incomplete pins one side of the boundary: a wall-clock stop with no request after the first idle stays a failed run and carries no incomplete reason. an_idle_run_is_scored_rather_than_incomplete pins the other: neither an input the run never consumed nor one it consumed without a request after it makes the run incomplete, and the run keeps the scoring it had before the class existed.

Replaying the delivered scoring over the ten recorded runs on the committed fixture found no incomplete run: nine submitted both follow-ups and both requests reached the model, and the tenth stayed a failed run at the line's manual compaction. The smoke numbers in the description are unchanged, and the description now states the incomplete class and that replay.

@yyhhyyyyyy
yyhhyyyyyy requested a review from eric8810 November 24, 2026 20:26

@zerob13 zerob13 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The harness now owns line creation and the incomplete outcome fixes the basic cap-before-idle case. Two gaps can still change the evaluation's conclusion:

[P2] Exclude incomplete fixtures from Gate 1's comparison population. Metrics::add and comparisons include every incomplete run in runs before returning, and use that total as the denominator of both failed-run and unjudged-run comparisons. An arm with more unobservable fixtures can therefore appear more reliable. Keep attempted totals for reporting and use a separate counted denominator for comparisons.

[P2] Require an observation of the specific request the fixture is testing. fixture_incomplete matches the exact input consumption but accepts any later model call on that line, not necessarily the consuming turn. It also omits a switch follow-up receipt if the cap stops it before consumption. Retain required receipts and tie each call to the consuming request or a verified same-turn replacement. Otherwise a fixture without the required observation can still be judged.

Static review; macOS and Linux build and lint had passed, and workspace CI was still running. No live eval.

@eric8810 eric8810 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed at head c3d480a.

This is the measurement fix I asked for on #2013, and it takes the harder of the two routes: instead of asserting that a model's line-opening decision was neutral, the scenario stops depending on that decision. A calls step creates the line through session.branch_create with parentBranchId main and at "session_open", the steer tells main a user line already builds parser/, and the afterIdle step compacts every line that did not compact itself and asks each one to re-run its own subsystem's tests. The message, the workspace and the token window stay redone-work's, so the arms still differ only in what the case is about.

Two things make that a real pre-registration rather than a reshaped test. The probes are declared in the scenario file, so the same steps run for both arms and a reader can see what each arm was given without reading the runner. And the step vocabulary (calls, afterIdle, the session_open sequence the runner now sends) lives in scenario_eval.rs as runner mechanism rather than as branches keyed to this scenario's name, which is what keeps the next case from growing its own private path.

Blocking: none.

Checks are green at this head. Scope of what I read: the PR body and the file list. I did not read the 2068 added lines in scenario_eval.rs, the 176 lines in branch_flow.rs, the three scenario JSON deltas, or the design changes, and ran nothing.

Non-blocking: none.

…ch fixture input in its turn

An incomplete fixture no longer enters the failed-run or unjudged-run denominator. The rates count the runs an arm had something to compare in — its judged, failed and unjudged runs — and the report states the arm's attempts and its incomplete fixtures beside them. FLOOR, delta and alpha stay as they were.

Every input the runner submits keeps a receipt: the message, every request the step after the first idle submits, a switch's follow-up on either line, and a steer. One resolver reads what became of it: the turn its line consumed it in, the first model start after that consumption with no turn boundary in between, and that request's own model call or the call of a request that replaced it in the same turn. The fixture check and the switch-note check share it, so a later turn's request no longer answers for an input, and a switch follow-up the turn cap stopped before any consumption leaves an incomplete fixture.

Both languages of model-prompts §8.1 state the denominator and what carries an input. New tests pin the resolver, the switch receipt and the report's denominator.
The timed steer and the tool-triggered steer each keep a receipt: a test reads the input id the Session answers and the line the runner sent it from through the same fake the switch tests use, so the reading needs no live Session.

A consumed switch input whose request never reached the model is unseen on the root line too, which owes no note: a test reads that outcome from the check before the judge.
@yyhhyyyyyy

Copy link
Copy Markdown
Collaborator Author

Fixed in e8bcde4.

Both points are in.

Gate 1's comparison population. Metrics now counts its runs over the judged, failed and unjudged runs only, and the failed-run and unjudged-run rates use that denominator. attempted and incomplete are reported beside those rates and enter no comparison; setup_failed still counts in the failed-run rate. FLOOR = 20, delta = 0.05 and alpha = 0.10 are unchanged. Both languages of model-prompts.md §8.1 state the denominator and the observation rule, and the PR body carries the scoring contract table.

Fixture receipts. Every input the runner submits keeps a receipt: the scenario's message, every request the step after the first idle submits, both switch follow-ups (switch.message, including a branchId of main, and former_message), and a steer the fixture submitted. The fixture check and the switch-note check share one resolver: the input's request must be the first step/model-start after its consumption with no turn/start or turn/end in between, and carry the input through its own model/call or the call of a request a steer replaced it with in the same turn. A switch follow-up the turn cap stops before any consumption leaves an incomplete fixture instead of a scored run, and a request of a later turn no longer answers for it.

Tests: a_fixture_input_is_carried_only_by_the_request_of_its_turn, a_later_turn_does_not_answer_for_a_switch_input, a_move_keeps_a_receipt_for_each_follow_up_it_sends, a_sent_steer_keeps_a_receipt_on_the_line_it_went_to, a_switch_follow_up_no_turn_consumed_is_an_incomplete_fixture, a_consumed_switch_input_whose_request_never_reached_the_model_is_unseen, the_report_counts_an_incomplete_fixture_apart_from_the_compared_runs, and the updated a_run_that_reaches_the_turn_budget_before_the_after_idle_step_is_incomplete.

@zerob13 zerob13 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comparison now excludes incomplete fixtures from its denominators, and the receipt resolver ties observed calls to the correct turn. One remaining precedence issue can hide an observed failure from Gate 1. This is a static finding; macOS checks passed and the Linux scenario tests are still pending in run 45543658067.

Comment thread xtask/src/scenario_eval.rs Outdated
// An input no turn consumed is not checked: no answer of its line
// is scored. When the run stopped on its turn cap, that cap is
// what left it unobserved.
Carried::Unconsumed if cap_stop.is_some() => return NotesCheck::CapCut,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] Preserve observed switch-note failures when another receipt is cut by the cap. switch_note_check returns CapCut before checking later receipts or any observable note. This fixture submits follow-ups to different lines; one can be cut while another reaches the model without its required note. Returning incomplete excludes that confirmed failure from Gate 1's reliability denominators. Record whether any receipt was cut, still inspect all receipts and observable notes, and return incomplete only if there is no confirmed failure.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 646b3e5.

switch_note_check now records a receipt the turn cap cut instead of returning CapCut there. It marks Carried::CapCut, or Carried::Unconsumed while the run stopped on turns, then keeps reading the other receipts, so a receipt whose request never reached the model still fails the run. Only after every receipt and every note is read does it return CapCut, and only when nothing confirms a failure. A confirmed failure therefore fails the run with switch_note_missing and enters gate 1's failed runs; a run whose only anomaly is the cap stays an incomplete fixture.

Two regression tests pin this. a_cap_cut_receipt_does_not_hide_a_request_that_reached_the_model_without_its_note covers a cap-cut receipt before and after a request that reached the model without its note, and a receipt the cap left unconsumed before and after one. a_cap_cut_receipt_does_not_hide_a_later_request_that_never_reached_the_model covers a cap-cut receipt followed by a later request on another line and on the root whose consuming turn never reached the model, plus a first receipt the cap left unconsumed. Each case asserts Unseen, no incomplete reason and attempted/runs/failed/incomplete = 1/1/1/0.

Both tests fail on e8bcde4's switch_note_check at the assertion that the cap-cut receipt hid the confirmed failure, reading CapCut where Unseen is expected, so they pin this change and not the previous behaviour. a_cap_cut_switch_follow_up_makes_the_run_incomplete still pins the run whose only anomaly is the cap: CapCut, incomplete, failed false.

Replaying the recorded exports gives the same counts as before in every group: no recorded run stopped on the turn cap, so no receipt was cut by it, and no run changed outcome.

The tests read a run's record through the note check, the incomplete reason and the metrics: a receipt the turn cap cut must not hide another receipt that reached the model without its note, or a later receipt whose request never reached the model. Both cases assert the run is a failed run in gate 1, not an incomplete fixture.
… turn cap

A run can carry one receipt the turn cap cut and another that reached the model without its note, or one whose request never reached the model. The check reads every receipt and the notes before it reports the cap, so a confirmed failure fails the run and enters gate 1's failed runs instead of leaving the report as an incomplete fixture. Only a run with no confirmed failure is an incomplete fixture.
The turn cap can leave an earlier receipt unconsumed and a later one consumed, its request at the model without the note. The note check reads every receipt before it reports the cap, so that missing note still fails the run.
@yyhhyyyyyy

Copy link
Copy Markdown
Collaborator Author

Fixed in 646b3e5.

switch_note_check no longer returns CapCut as soon as it meets a cut receipt. It records that a receipt was cut (Carried::CapCut, or Carried::Unconsumed while the run stopped on turns) and reads every remaining receipt, so a request that never reached the model still fails the run at that receipt. After all receipts are read, it reads switch_notes_unseen over the notes, and it returns CapCut only when no receipt or note confirms a failure. A run with a confirmed failure is a switch_note_missing failure and enters gate 1's failed runs; only a run whose one anomaly is the cap stays an incomplete fixture. This is the precedence the scoring table in the PR body states, a confirmed failure always wins over a cell that reads incomplete.

The new tests: a_cap_cut_receipt_does_not_hide_a_request_that_reached_the_model_without_its_note pins a cap-cut receipt and a receipt the cap left unconsumed, each before and after a request that reached the model without its note; a_cap_cut_receipt_does_not_hide_a_later_request_that_never_reached_the_model pins a cap-cut receipt followed by a request on another line and on the root whose consuming turn never reached the model, and a first receipt the cap left unconsumed. Both read the run through the note check, the incomplete reason and the metrics, and assert Unseen, no incomplete reason and attempted/runs/failed/incomplete = 1/1/1/0. On e8bcde4 both fail at that assertion, with CapCut where the confirmed failure is expected. a_cap_cut_switch_follow_up_makes_the_run_incomplete still covers the run the cap alone left unobserved.

The offline replay over the recorded exports is unchanged: every group reports the same attempted, runs, failed, setup_failed and incomplete counts as before, no recorded run stopped on the turn cap and no run changed outcome.

The source comment on switch_note_check and the PR body's notes and fixture-step table state the same precedence.

@yyhhyyyyyy
yyhhyyyyyy requested a review from zerob13 November 25, 2026 06:31

@eric8810 eric8810 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-reviewed the fixture and Gate 1 changes at 646b3e5b. switch_note_check now records cap-cut or unconsumed receipts without returning early; a later unreached request or an observed request missing its note still yields Unseen. The caller records that as switch_note_missing before checking incompleteness. A cap-only run still stays out of the comparison denominator.

The exact-head Linux verification passed both new mixed-outcome regression tests and the existing cap-only case; ci-ok is green. I did not rerun live model evaluations.

@zerob13 zerob13 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The prior Gate 1 blocker is fixed. A cap cut no longer hides a confirmed missing switch request or note; the runner records that failure before checking fixture incompleteness. Cap-only runs still stay outside the comparison population. Both mixed-outcome regressions passed on the exact hosted Linux head, and macOS native and ci-ok passed. I did not rerun live model evaluations.

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.

The compaction identity probe depends on a line being opened

3 participants