Skip to content

Crashed Custom runner Trials with unrecorded provider traffic count as $0 failed Trials #2241

Open

Description

@JacobStephens2

This was generated by AI during the Spec review of #1468.

What the finding is

A Custom runner that crashes, times out or never writes result.json after sending provider traffic that no recorded session accounts for keeps its failed outcome, with no accounting_gap Void and no gap session. Failed Trials are not Void, so they enter paired cost ratios. That Trial then counts as a cheap $0.00 run for the Custom-runner Arm.

Evidence

  • src/evals/experiment/execution/custom.rs collect checks for accounting gaps only when reported is true, meaning the runner wrote a valid result.json. The comment above it states this on purpose: "outer supervision (a timeout, a runner that could not start) and broken runner protocol keep their failed classification". Without a valid result, evidence errors are dropped (Err(_) => {}).
  • src/evals/experiment/accounting.rs puts non-Void Trials, failed ones included, into paired cost ratios.
  • The existing test timed_out_runner_after_provider_traffic_stays_failed asserts this behaviour.
  • The review ran this test in src/evals/experiment/execution/custom/tests.rs. It fails, because the outcome stays failed with no Void cause:
#[test]
fn crashed_runner_after_unrecorded_provider_traffic_is_an_accounting_gap() {
    let root = attempt();
    let mut recorder = Recorder::start(root.path()).unwrap();
    let runner = runner(root.path(), json!({"command": ["runner"], "providers": ["openai"]}));
    let traffic = Accounting { provider_connections: 1, harness_invocations: Vec::new() };
    let mut output = Output::failed(1_000, "missing or unreadable Custom runner result.json; exit status: 7; stderr: ");
    collect(&mut recorder, &runner, &traffic, &mut output, false, &root.path().join("signal")).unwrap();
    assert_eq!(output.void_cause, Some(VoidCause::AccountingGap), "{:?}", output.cause);
}

Raised by

The Spec review of pull request #2203, which delivers Spec #1468.

Why the review did not decide it

Spec #1468 sets two rules that disagree here:

  • "Outer supervision (interrupted, sandbox_unavailable, memory_cap, host_killed, live usage_limit, timeout -> failed) keeps precedence", and "runner crashes or missing result.json without outer Void evidence record that Trial as failed".
  • "if provider traffic occurred … with zero recorded sessions … the Trial is voided as accounting_gap", and User Story 22: "omitted or deleted sub-agent sessions never produce artificially cheap $0.00 Trials".

The implementation gives precedence to the first rule. There are three ways to settle it, and each changes how Scores and costs read:

  1. Void such Trials as accounting_gap. The Bar would then retry them, and a broken runner's failures would stop counting against its Score.
  2. Keep them failed for the Score, but record their cost as unknown. Paired cost ratios would then exclude them.
  3. Keep today's behaviour.

The Spec and the Day shift own that trade-off, so this pull request does not change it.

Activity

  1. added
    needs-triage
    in-progress
    and removed
    needs-triage
    on Nov 15, 2026
  2. JacobStephens2 commented on Nov 15, 2026

    @JacobStephens2
    OwnerAuthor

    This was generated by AI during triage.

    Investigation Summary

    Current state against main

    Confirmed findings

    1. Why unrecorded crashed/timed-out Custom runner Trials keep failed on PR Spec: Custom-runner Arms for process Experiments #2203: custom::result marks reported = true only when process.status.success() is true and output/result.json is valid version-1 JSON. Timeouts, crashes/nonzero exits (even if result.json exists), non-OOM SIGKILL, and missing/invalid result.json leave reported = false and Outcome::Failed. custom::collect checks accounting_gap (unrecorded provider_connections, harness_sessions < crossed.len(), and recorder.collect() errors) only when reported && output.outcome != Outcome::Void, dropping evidence errors via Err(_) => {} when !reported. (Commit fe577acb also documented this rule in docs/eval-tasks.md, docs/experiment-results.md, docs/guide.md, and site/docs/index.html, and added reported to timed_out_runner_after_provider_traffic_stays_failed.)
    2. Asymmetry on PR Spec: Custom-runner Arms for process Experiments #2203: execution.rs (trace.grade) still runs accounting::capture and voids any non-Void Trial whose accounting.gap() is Some. Thus a record_command session that times out before emitting usage still becomes Void(AccountingGap) via accounting::capture, whereas unrecorded provider calls (without record_command), failed sessions.json imports, or extra unrecorded calls after an earlier completed record_command session skip the gap check when !reported.
    3. How $0.00 enters paired cost ratios and estimates (main): When Outcome::Failed has no .spans.jsonl files in attempt/session/, accounting::capture (src/evals/experiment/accounting.rs:112-129) emits no gap session, trial_total (accounting.rs:200-219) folds empty sessions to Some(0.0), paired_ratios (accounting.rs:334-366) includes all result.outcome != Outcome::Void pairs, efficiency::Comparison::of (src/evals/experiment/efficiency.rs:114) accepts 0.0 ratios (*ratio >= 0.0), and cost::history (src/evals/experiment/cost.rs:112) counts Some(0.0) toward priced_trials in pre-run estimates.

    Trade-offs for the Day shift to decide

    1. Void as accounting_gap: Note a correction to the original issue body—VoidCause::AccountingGap is not in Bar::default().void_rules.causes (src/evals/experiment.rs:120-133), so Writer::can_continue (src/evals/experiment/trial.rs:180-201) does not retry it under the default Bar. Instead, grading::evaluate (src/evals/experiment/grading.rs:482-486, 555-589, 645) drops the task from both Arms and makes the Experiment Inconclusive if dropped > total / 10. Either way, crashed/timed-out runner failures after provider traffic would stop counting against the Arm's Score.
    2. Keep failed for Score, mark cost as unknown (cost_usd: None): Preserves the failure against the Arm's Score and excludes the pair from paired_median_ratios.cost and efficiency.cost ratios. Note that under existing efficiency.rs, accounting.rs, and cost.rs semantics, a None Trial cost sets efficiency.cost.complete = false (omitting the bootstrap interval and causing --cost-ceiling to return Inconclusive), sets Arm.total.cost_usd = None (unknown), and withholds the Arm's pre-run mean cost estimate. Because execution.rs:355-361 currently voids any non-Void Trial that has a session gap, implementing this requires representing unpriced/incomplete failed accounting without triggering the Void(AccountingGap) conversion (and updating docs/experiment-results.md and tests/experiments/result_format.rs). Also decide whether record_command timeouts without usage (and native Trials that crash/time out before creating session files) should follow the same rule.
    3. Keep PR Spec: Custom-runner Arms for process Experiments #2203's current behaviour: Retains $0.00 (or partial) costs for unrecorded crashed/timed-out Trials in paired cost ratios and pre-run cost history.

    Next step for the Day shift

    Decide between options 1, 2, or 3 (and whether to apply the decision directly to PR #2203 before merge or track it as a follow-up Ticket after #2203 lands), then shape the implementation or move back to needs-triage once the decision and target branch state are settled.

  3. added
    bug
    ready-for-human
    and removed
    in-progress
    on Nov 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugready-for-human

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions