Official Codebase of 3DCodeVerse
Python
bench: a harness run that picked a round before its judge went down is scored on that pick
gaoypengaa1ad38c9c42
diff --git a/eval/bench/compare_backends.py b/eval/bench/compare_backends.pyindex 75c59cf2..bad39f46 100644--- a/eval/bench/compare_backends.py+++ b/eval/bench/compare_backends.py@@ -285,11 +285,13 @@ def _run_harness(spec: Spec, cell: Path, eval_ws: Workspace, opts: CompareOptionres.harness_status, res.harness_rounds, res.harness_loop_score = rec.status.value, len(rec.rounds), summary.picked_scoreres.harness_stop_reason = summary.stop_reasonres.harness_aborted_rounds = len(rec.extra.get("aborted_rounds") or [])- if rec.status is RunStatus.JUDGE_UNAVAILABLE:+ if rec.status is RunStatus.JUDGE_UNAVAILABLE and summary.picked_score is None:# The run stopped because its judge never answered (p3_graphics_v2 mushroom_forest, 2026-09-23:# two 900 s pro read timeouts after round 0). Scoring what it had then would grade a one-round# run for someone else's outage — the asymmetry §7 ends for the one-shot arms — so the cell is- # dropped as infra_failed and --redo-status re-runs it.+ # dropped as infra_failed and --redo-status re-runs it. A run that had judged and picked a round+ # before the outage is scored on that pick, exactly as the same outage on its last round is+ # (owner, 2026-09-23).res.error = f"harness run stopped at {summary.stop_reason or 'judge_unavailable'}: the in-loop judge never answered"res.error_is_infra = Truereturndiff --git a/eval/tests/test_infra_failures.py b/eval/tests/test_infra_failures.pyindex ddc33bab..9af1f1dc 100644--- a/eval/tests/test_infra_failures.py+++ b/eval/tests/test_infra_failures.py@@ -350,6 +350,7 @@ def test_a_harness_run_whose_judge_never_answered_is_dropped_and_redone_fresh(tmdef judge_down(spec, ws, resume):rec = storm(spec, ws, resume)rec.status = RunStatus.JUDGE_UNAVAILABLE+ rec.rounds[0].judgment = None # no round was ever judged: nothing to pickws.write_json(ws.record_path, rec)return rec@@ -372,6 +373,29 @@ def test_a_harness_run_whose_judge_never_answered_is_dropped_and_redone_fresh(tmassert any(p.name.startswith("run.attempt") for p in (tmp_path / "cells" / battery.prompts[0].id / arm.slug).iterdir())+def test_a_harness_run_that_picked_a_round_before_its_judge_went_down_is_scored(tmp_path):+ """The same outage after a judged round is not the harness's failure either way: the run delivered+ its pick, as a last-round outage (max_rounds) does — so it is scored, not re-rolled (owner, 2026-09-23)."""+ from bench.compare_backends import CompareDeps, CompareOptions, parse_arm, run_cell+ from bench.run_bench import Battery+ from codeverse3d.contracts.run import RunStatus+ from tests.conftest import BATTERY, FakeEvaluator, fake_run_track++ run = fake_run_track()++ def judged_then_down(spec, ws, resume):+ rec = run(spec, ws, resume)+ rec.status = RunStatus.JUDGE_UNAVAILABLE+ ws.write_json(ws.record_path, rec)+ return rec++ battery = Battery.load(BATTERY)+ ev = FakeEvaluator()+ r = run_cell(battery, battery.prompts[0], parse_arm("harness:gemini-cli:gemini-3.8-flash"), tmp_path,+ CompareOptions(judge="gemini:x", loop_judge="gemini:x"), CompareDeps(ev, run_track=judged_then_down))+ assert r.status == "scored" and ev.evaluated, r++@pytest.mark.parametrize(('outage', 'reason'), [(True, 'error'), (False, 'error'), (True, 'timeout')])def test_bare_agent_provider_failure_with_a_partial_file_is_not_a_quality_zero(tmp_path, monkeypatch, outage, reason):"""A CLI can leave a placeholder before its API fails; preserve but don't grade it. A session that