Official Codebase of 3DCodeVerse
Python
budget: stop testing and documenting the thing that is gone
gaoypeng71dff4f2ba5e
diff --git a/harness/CLAUDE.md b/harness/CLAUDE.mdindex c24fadab..8bafe6ea 100644--- a/harness/CLAUDE.md+++ b/harness/CLAUDE.md@@ -86,9 +86,6 @@ cd /home/yipeng/3dcodeverse/harness3dcodeverse make "..." --track static_object --language threejs --generator gemini-cli:gemini-3.7-flash3dcodeverse make "..." --track articulated_object --language urdf_blender3dcodeverse make "..." --track scene --language scene_threejs --rounds 2 --max-minutes 60-# There is NO cost ceiling and no --max-usd (owner, 2026-08-28: run first, count later).-# Cost is still priced onto every call — 3dcv cost, the ledger and the run record are-# untouched; --max-minutes / --rounds are what bound a run.3dcodeverse make "neon rain on a window" --track graphics --language glsl_shader3dcodeverse make "..." --image ref.png --candidates 3 --rounds 2 --dim height=0.45 --must "three legs" --texture --no-run3dcv resume <slug> · 3dcv status <slug> · 3dcv render <slug> [--mode wire] · 3dcv judge <slug> [--model ... --n 3]diff --git a/harness/bench/_infra.py b/harness/bench/_infra.pyindex 6da1e984..eac7ccbe 100644--- a/harness/bench/_infra.py+++ b/harness/bench/_infra.py@@ -118,9 +118,8 @@ def is_infra_failure(err: object) -> bool:#: a run that hit its ceiling before producing anything. Distinct from an outage: we DID-#: ask the model, it just never delivered inside the budget. ``max_usd`` stays in the-#: list although the money ceiling was removed on 2026-08-28 — recorded runs from before-#: then still carry that wording, and this classifier reads history.+#: ask the model, it just never delivered inside the budget. These match RECORDED runs,+#: so the list keeps wordings the harness no longer emits.BUDGET_MARKERS: tuple[str, ...] = ("exceeds max_minutes","exceeds max_usd", # historical runs onlydiff --git a/harness/bench/compare_backends.py b/harness/bench/compare_backends.pyindex 38c8646b..065834f7 100644--- a/harness/bench/compare_backends.py+++ b/harness/bench/compare_backends.py@@ -338,9 +338,6 @@ def flag_degraded(res: CellResult, opts: CompareOptions) -> None:"""if res.kind != "harness" or res.status not in ("scored", "build_failed"):return- # There is no money ceiling any more (2026-08-28), so a "budget" stop is always the- # clock — which is exactly the case this flag was written for. The old money_stop- # test is gone with the ceiling it read.if (res.harness_stop_reason == "budget" and res.harness_rounds <= opts.degraded_max_roundsand res.wall_s >= opts.degraded_min_wall_s):res.degraded = Truediff --git a/harness/codeverse/contracts/common.py b/harness/codeverse/contracts/common.pyindex 5a690e1f..d838dd5e 100644--- a/harness/codeverse/contracts/common.py+++ b/harness/codeverse/contracts/common.py@@ -136,11 +136,8 @@ class Budget(BaseModel):token is spent and ``grant_grace`` cannot lift a hard ceiling back above zero —so the workspace and the git-committed spec are created for a run that can only die.- There is NO money ceiling and no way to set one (owner, 2026-08-28: run first, count- later). Cost is still measured on every call — the ledger, ``3dcv cost``, the run- record and the bench economics are untouched — it simply cannot end a run. What- bounds a run is ``max_rounds`` and ``max_minutes``; a spec.json written before the- removal still loads, its money ceiling ignored (pydantic drops the unknown field).+ A run is bounded by ``max_rounds`` and ``max_minutes``. Cost is accumulated per call+ for the ledger and the run record, and never gates anything."""max_rounds: int = Field(default=4, ge=0)diff --git a/harness/codeverse/orchestrator.py b/harness/codeverse/orchestrator.pyindex 34dcf15a..b1581b9b 100644--- a/harness/codeverse/orchestrator.py+++ b/harness/codeverse/orchestrator.py@@ -817,8 +817,8 @@ class BudgetGuard:"""Thread-safe accumulator of ``Usage`` against a ``Budget``.``charge`` adds usage and then calls ``check``; ``check`` raises- ``BudgetExceeded`` when ``max_minutes`` is exceeded. Money is measured, never- enforced (2026-08-28): there is no cost ceiling.+ ``BudgetExceeded`` when ``max_minutes`` is exceeded. Cost is accumulated for the+ ledger and the run record; the wall clock is the ceiling."""def __init__(@@ -1003,7 +1003,6 @@ class BudgetGuard:"""Raise ``BudgetExceeded`` if any hard ceiling has been crossed."""spent = self.billed_usdelapsed = self.elapsed_minutes()- # money is measured, never enforced (2026-08-28). The clock is the only ceiling.if elapsed > self.hard_minutes:raise BudgetExceeded(f"elapsed {elapsed:.1f} min exceeds max_minutes {self.hard_minutes:.1f}",diff --git a/harness/docs/COST.md b/harness/docs/COST.mdindex caf61306..f8031815 100644--- a/harness/docs/COST.md+++ b/harness/docs/COST.md@@ -1157,19 +1157,12 @@ What did work, in production, on those two lost cells: they were recordedretry deadline (§22) stopped each at ~15 min instead of the 56-87 min the same cellsburned earlier the same morning.-## 25. `max_usd` guards money, and a subscription costs none--> **Since 2026-08-28 the money guard is OFF by default** (`max_usd = 0` in `Budget` and-> in every profile, owner's call: run first, count later). Nothing below stops being-> true — every call is still priced into `telemetry/cost.jsonl`, `3dcv cost` and the-> run record — but money can no longer END a run. `--max-usd <n>` puts the ceiling-> back, and everything in this section then applies exactly as written. What still-> bounds a run is `max_minutes`.+## 25. List price is not the bill, and a subscription costs none`Usage.cost_usd` answers *"what would these tokens cost at list price?"*. That is theright number for a report, a $/complexity point, or a flywheel record — it is comparable-across backends and independent of who is paying. It is the wrong number to hand a-spend guard, because a backend on a flat-rate local subscription bills no dollars.+across backends and independent of who is paying. It is the wrong number to call a bill,+because a backend on a flat-rate local subscription bills no dollars.The harness had exactly one number and used it for both.@@ -1193,22 +1186,16 @@ with it, and the guard is the half that changes what the run does.only what is billed. `cost/billing.py` names the flat-rate backends(`SUBSCRIPTION_BACKENDS` = codex, claude-code, agy, antigravity — `CLAUDE.md`"Environment" is the source of that list), and `BudgetGuard` accumulates a second-counter, `billed_usd`, which every ceiling now reads instead of `spent.cost_usd`.-`summary()` reports both: `spent_usd` (billed, what the ceilings saw) and `notional_usd`-(list price, what the reports want).+counter, `billed_usd`, alongside `spent.cost_usd`. `summary()` reports both:+`spent_usd` (billed, real dollars) and `notional_usd` (list price, what the reports want).`gemini-cli` is deliberately **not** exempt: it authenticates with an API key, so itstokens draw on a real per-token quota even when that quota is free. Unknown backendsbill by default — a new provider nobody classified must be enforced, not exempted.-Wrong in that direction costs a degraded run; wrong in the other spends real money with-no ceiling.--**What still bounds a subscription run:** `max_minutes`, which `BudgetGuard.timeout_s()`-also clips individual sessions against. When the money is flat-rate, wall clock is the-scarce resource — the runaway is still stopped, by the ceiling that actually applies to-it. Note the corollary for benchmarking: an arm on a subscription backend and an arm on-an API backend are not being held to the same ceiling, so compare them on-`notional_usd`, never on `spent_usd`.+Getting it wrong the other way reports a run as free when someone was billed for it.++The corollary for benchmarking: an arm on a subscription backend and an arm on an API+backend do not bill comparably, so compare them on `notional_usd`, never on `spent_usd`.## 27. A 503 is per key at any instant — rotate before you wait (2026-08-26)diff --git a/harness/docs/DECISIONS.md b/harness/docs/DECISIONS.mdindex b5b886f1..0359df23 100644--- a/harness/docs/DECISIONS.md+++ b/harness/docs/DECISIONS.md@@ -51,7 +51,7 @@ written) that were accepted because the code works that way and the tests pin itrestored from `run_state.extra.budget_snapshot` (`BudgetSnapshot`: spent usage, billedUSD, call count, per-stage/per-round buckets, cumulative ACTIVE seconds — grace isdeliberately NOT persisted). Prior spend and active minutes still count after a- resume, so a raised `--max-usd` grants only the difference; `spent_usage` is mirrored+ resume, so a raised `--max-minutes` grants only the difference; `spent_usage` is mirroredfor one release, and old run dirs without a snapshot fall back to it (spent only).* **D8 Events carry `event`, not `kind` (Δ).** `EventLog.emit(event, **data)` so payloadsmay include `kind=` (round kind). `3dcv status` and tests follow.diff --git a/harness/docs/EVAL.md b/harness/docs/EVAL.mdindex 88aec291..56704ebc 100644--- a/harness/docs/EVAL.md+++ b/harness/docs/EVAL.md@@ -55,7 +55,7 @@ deterministic contract check.```bash3dcv bench run bench/prompts/static_objects_v1.yaml \--generator gemini-cli:gemini-3.6-flash --judge gemini:gemini-3.1-pro-preview \- --rounds 2 --max-usd 2.5 --parallel 4 --out bench/out/static_v1_apiagent+ --rounds 2 --parallel 4 --out bench/out/static_v1_apiagent3dcv bench run bench/prompts/static_objects_v1.yaml --generator gemini-cli:gemini-3.7-flash --judge gemini:gemini-3.1-pro-preview --out bench/out/static_v1_gemcli3dcv bench report bench/out/static_v1_apiagent```@@ -82,11 +82,11 @@ cheaply.python bench/compare_backends.py --prompts bench/prompts/compare_v1.yaml \--arms harness:gemini-cli:gemini-3.6-flash,harness:gemini-cli:gemini-3.7-flash,oneshot:claude-code,oneshot:codex,oneshot:gemini:gemini-3.7-flash,oneshot+repair:gemini:gemini-3.7-flash \--judge gemini:gemini-3.1-pro-preview --out bench/out/compare_v1 [--parallel 3] [--limit N] [--ids a,b]- [--rounds 3] [--max-usd 2.5] [--loop-judge gemini:gemini-3.7-flash] [--repair-attempts 2] [--gen-timeout 900]+ [--rounds 3] [--loop-judge gemini:gemini-3.7-flash] [--repair-attempts 2] [--gen-timeout 900][--no-pairwise] [--no-resume] [--report-only]```Arms:-* `harness:<generator-id>` — the full static_object track (rounds ≤ `--rounds`, ≤ `--max-usd`);+* `harness:<generator-id>` — the full static_object track (rounds ≤ `--rounds`);its in-loop judge is `--loop-judge` (default: settings default); the loop's own scoreis **not** the reported score.* `oneshot:<x>` — ONE raw generation from prompt + minimal contract (no tools, cookbook,diff --git a/harness/docs/INTERFACES.md b/harness/docs/INTERFACES.mdindex f91ce5ef..f1c6f5e1 100644--- a/harness/docs/INTERFACES.md+++ b/harness/docs/INTERFACES.md@@ -127,10 +127,10 @@ get_settings().apply_profile(name, *, force=False) -> Profile# (max_px/montages/detail_crops/samples) and limits.agent_max_turns; a value the user stated in# config.yaml / CV3D_* survives unless force (3dcv make --profile forces).from codeverse.cli._common import resolve_dial, ResolvedDial # THE resolver, one per `3dcv make`-resolve_dial(settings, profile_flag=None, *, rounds=None, candidates=None, max_usd=None,+resolve_dial(settings, profile_flag=None, *, rounds=None, candidates=None,max_minutes=None, texture=False) -> ResolvedDial# profile/generator/planner/judge/captioner, judge_samples/judge_max_px/judge_montages/- # judge_detail_crops, agent_max_turns, rounds, candidates, texture, max_usd, max_minutes.+ # judge_detail_crops, agent_max_turns, rounds, candidates, texture, max_minutes.# `--profile X` and `CV3D_PROFILE=X` resolve to the SAME dial (they used to disagree on# candidates + texture); an explicit flag beats both. Spec.options.profile always records the# resolved name so `3dcv resume` re-applies it.diff --git a/harness/docs/RUNBOOK.md b/harness/docs/RUNBOOK.mdindex 7ef39932..22ea6986 100644--- a/harness/docs/RUNBOOK.md+++ b/harness/docs/RUNBOOK.md@@ -60,7 +60,7 @@ silhouette gate + IoU refine tasks), `--rounds N` (refine rounds after the basel`--candidates N` (best-of-N baseline: N parallel candidates in `<ws>/_cand/`,quick-judged, pairwise tie-break, winner kept; multiplies baseline cost ≈ N;default from `settings.default_candidates`), `--texture` (run the texture pass after-finalise; see §6), `--max-minutes` (there is no cost ceiling), `--dim height=0.45`, `--must`,+finalise; see §6), `--max-minutes`, `--dim height=0.45`, `--must`,`--must-not`, `--style`, `--tag`, `--seed`, `--slug`, `--runs-dir`, `--force`,`--no-run` (workspace + spec.json only — except that `--reference` still runs itspaid grounding pass first, since the grounded spec is what it writes).diff --git a/harness/docs/SKILLS_LEDGER.md b/harness/docs/SKILLS_LEDGER.mdindex e2291863..63dc9dd1 100644--- a/harness/docs/SKILLS_LEDGER.md+++ b/harness/docs/SKILLS_LEDGER.md@@ -242,7 +242,7 @@ it lands these four rows stay `mixed`, not `measured`.admitted a `passed` run with no gated round as a clean 0.* **A budget cap tuned for the judged score starves the gate readout.** The `bbox-contract`A/B's variant produced a *scored* artefact with **zero gated rounds**, so the primary- metric lost the cell while the secondary kept it. Raise `--max-usd`/`--max-minutes` for+ metric lost the cell while the secondary kept it. Raise `--max-minutes` forany A/B whose readout is a gate.* **The A/B rig scored four of seven languages 0.0.** `compare_backends._run_harness` gatedthe harness arm on `src/model.py`; a glsl run that finished `passed` having writtendiff --git a/harness/docs/TEASER.md b/harness/docs/TEASER.mdindex ae9fe788..6222483f 100644--- a/harness/docs/TEASER.md+++ b/harness/docs/TEASER.md@@ -125,7 +125,7 @@ suffixed `_v2` / `_v3`, with the CLI flags that are not expressible in `BenchProThe three hero pieces used `--generator codex:gpt-5.6-sol` instead (penny-farthing, radialengine, temple courtyard). Note that `--profile quality` prices codex subscription usage as-API dollars and self-throttles the scene track (`DEFECTS.md` D5) — raise `--max-usd` well+API dollars and self-throttles the scene track (`DEFECTS.md` D5) — raise `--max-minutes` wellabove the profile default for a codex scene run.Per-artefact extras used here:diff --git a/harness/tests/compare_bench/test_bench_shared.py b/harness/tests/compare_bench/test_bench_shared.pyindex 622b463a..8fc01a59 100644--- a/harness/tests/compare_bench/test_bench_shared.py+++ b/harness/tests/compare_bench/test_bench_shared.py@@ -37,7 +37,7 @@ def test_build_spec_tags_and_budget():spec = build_spec(b, item, backends=rb.get_settings().backends(), rounds=2,max_minutes=10, tag0="compare", extra_tags=("harness",))assert spec.tags[:4] == ["compare", b.name, item.tier, item.category] and "harness" in spec.tags- assert spec.budget.max_rounds == 2 and not hasattr(spec.budget, "max_usd")+ assert spec.budget.max_rounds == 2 and spec.budget.max_minutes == 10.0assert spec.id == f"{b.name}/{item.id}"diff --git a/harness/tests/compare_bench/test_compare_matrix.py b/harness/tests/compare_bench/test_compare_matrix.pyindex 09864f28..c8f02fff 100644--- a/harness/tests/compare_bench/test_compare_matrix.py+++ b/harness/tests/compare_bench/test_compare_matrix.py@@ -69,7 +69,7 @@ def test_spec_for_and_acceptance():harness = spec_for(b, b.prompts[0], parse_arm("harness:gemini-cli:gemini-3.7-flash"), opts)one = spec_for(b, b.prompts[0], parse_arm("oneshot:codex"), opts)assert harness.backends.generator == "gemini-cli:gemini-3.7-flash" and harness.backends.judge == "gemini:gemini-3.7-flash"- assert harness.budget.max_rounds == 3 and not hasattr(harness.budget, "max_usd")+ assert harness.budget.max_rounds == 3assert one.backends.generator == "single-shot:codex" and one.constraints.must_have == b.prompts[0].must_haveacc = acceptance_from_spec(one)assert [a.id for a in acc] == ["must_1", "must_2", "must_3"] and all(a.priority == "must" for a in acc)diff --git a/harness/tests/compare_bench/test_degraded.py b/harness/tests/compare_bench/test_degraded.pyindex e99daa9e..a735583b 100644--- a/harness/tests/compare_bench/test_degraded.py+++ b/harness/tests/compare_bench/test_degraded.py@@ -47,8 +47,7 @@ def _track(status: RunStatus, stop_reason: str, rounds: int, cost: float, aborte(RunStatus.BUDGET, "budget", 1, 1.2, 1, True), # the storm case: clock stop after 1 round(RunStatus.BUDGET, "budget", 0, 0.9, 1, True), # never completed a round(RunStatus.BUDGET, "budget", 2, 1.5, 1, False), # iterated twice: cut, but not degraded- # the money-stop row is gone with the money ceiling (2026-08-28): a "budget" stop is- # now always the clock, which is exactly the case this flag exists for+(RunStatus.PASSED, "pass", 1, 0.8, 0, False), # passed after one round: fine(RunStatus.PLATEAU, "plateau", 1, 0.7, 0, False),])diff --git a/harness/tests/compare_bench/test_infra_failures.py b/harness/tests/compare_bench/test_infra_failures.pyindex d250f217..362a1cf4 100644--- a/harness/tests/compare_bench/test_infra_failures.py+++ b/harness/tests/compare_bench/test_infra_failures.py@@ -382,8 +382,7 @@ def test_the_ab_viewer_refuses_to_call_a_winner_it_cannot_support():def test_a_clock_stopped_cell_is_flagged_degraded():"""compare_v4 (2026-08-25): under a day-long 503 storm 37 of 40 harness runs stoppedon the WALL CLOCK with 0-2 rounds while the 3 that met a calm window scored- 0.92-0.95, so a paired mean over them measures the weather. With the money ceiling- removed (2026-08-28) a "budget" stop is always the clock, and this is the whole test.+ 0.92-0.95, so a paired mean over them measures the weather."""from bench.compare_backends import CompareOptions, flag_degradeddiff --git a/harness/tests/cost/test_profiles.py b/harness/tests/cost/test_profiles.pyindex 369ab5ed..f668b589 100644--- a/harness/tests/cost/test_profiles.py+++ b/harness/tests/cost/test_profiles.py@@ -46,8 +46,7 @@ def test_balanced_is_todays_defaults():s = Settings()assert (p.generator, p.planner, p.judge) == (s.default_generator, s.default_planner, s.default_judge)assert p.rounds == 4 and p.candidates == s.default_candidates and p.judge_samples == 1- # a profile has no money dial at all: the ceiling was removed on 2026-08-28- assert not hasattr(p, "max_usd") and p.max_minutes == 60.0 and p.judge_max_px == 1024+ assert p.max_minutes == 60.0 and p.judge_max_px == 1024def test_economy_is_single_shot_flash_and_two_rounds_with_no_turn_cap_of_its_own():@@ -157,7 +156,7 @@ def test_make_profile_writes_the_whole_shape_onto_the_spec(tmp_path: Path):assert r.exit_code == 0, r.outputspec = json.loads((runs / "pot" / "spec.json").read_text())assert spec["options"] == {"candidates": 2, "texture": True, "profile": "quality"}- assert spec["budget"]["max_rounds"] == 4 and "max_usd" not in spec["budget"]+ assert spec["budget"]["max_rounds"] == 4 and spec["budget"]["max_minutes"] > 0assert spec["backends"]["judge"] == "gemini:gemini-3.1-pro-preview"@@ -168,7 +167,7 @@ def test_an_explicit_flag_beats_the_profile(tmp_path: Path):"--generator", "gemini-cli:gemini-3.6-flash"])assert r.exit_code == 0, r.outputspec = json.loads((runs / "pot" / "spec.json").read_text())- assert spec["budget"]["max_rounds"] == 4 and "max_usd" not in spec["budget"]+ assert spec["budget"]["max_rounds"] == 4 and spec["budget"]["max_minutes"] > 0assert spec["backends"]["generator"] == "gemini-cli:gemini-3.6-flash"assert spec["backends"]["judge"] == "gemini:gemini-3.7-flash" # unstated → still the profile's@@ -181,7 +180,7 @@ def test_no_profile_flag_leaves_the_defaults_alone(tmp_path: Path):# the resolved dial is recorded whichever way it was named, so `3dcv resume`# reproduces it; with no flag and no env that dial is the default, balancedassert spec["options"]["profile"] == "balanced" and spec["options"]["texture"] is False- assert spec["budget"]["max_rounds"] == 4 and "max_usd" not in spec["budget"]+ assert spec["budget"]["max_rounds"] == 4 and spec["budget"]["max_minutes"] > 0def test_judge_samples_reach_the_round_policy_only_when_a_profile_asks(tmp_path: Path):diff --git a/harness/tests/flywheel_cli/test_cli.py b/harness/tests/flywheel_cli/test_cli.pyindex beb529f7..2cbe6378 100644--- a/harness/tests/flywheel_cli/test_cli.py+++ b/harness/tests/flywheel_cli/test_cli.py@@ -438,8 +438,7 @@ def test_a_negative_budget_is_rejected_before_the_workspace_exists(tmp_path: Pat"""SM-11: a ceiling flag took any float. A negative ceiling is not a small budget,it is an unrunnable one — BudgetGuard.ok() is False before a single token is spentand grant_grace cannot lift a hard ceiling back above zero — yet `3dcv make` printed- it, created the workspace and git-committed the spec. The money ceiling is gone- (2026-08-28); the rule holds for the one that remains."""+ it, created the workspace and git-committed the spec."""runs = tmp_path / "runs"for flag, value in (("--max-minutes", "-10"),):r = runner.invoke(app, ["make", "a chair", flag, value, "--no-run",@@ -461,8 +460,6 @@ def test_a_negative_budget_is_rejected_before_the_workspace_exists(tmp_path: Patwith _pytest.raises(ValidationError):Budget(max_minutes=-3.0)assert Budget(max_minutes=0.0).max_minutes == 0.0- # and there is no money ceiling to reject: the field is gone- assert "max_usd" not in Budget().model_dump()def test_texture_is_not_offered_on_tracks_that_have_no_glb(tmp_path: Path):diff --git a/harness/tests/flywheel_cli/test_run_layout_cli.py b/harness/tests/flywheel_cli/test_run_layout_cli.pyindex 9eb1d985..b7ac3708 100644--- a/harness/tests/flywheel_cli/test_run_layout_cli.py+++ b/harness/tests/flywheel_cli/test_run_layout_cli.py@@ -72,7 +72,7 @@ def test_package_run_builds_deliverable_and_telemetry(fake_run):assert ws.settings_path.is_file() and ws.cost_path.is_file() and ws.usage_path.is_file()cost = json.loads(ws.cost_path.read_text())assert cost["total_usd"] == rec.total_usage.cost_usd- assert cost["by_round"] and "budget_usd" not in cost # no money ceiling to report+ assert cost["by_round"]settings = json.loads(ws.settings_path.read_text())assert {r["role"] for r in settings["roles"]} == {"planner", "generator", "judge", "captioner"}assert settings["rubric"] and settings["rubric_hash"] and settings["price_table_version"]@@ -111,7 +111,6 @@ def test_cost_summary_reconciles_with_the_record_total(fake_run):assert abs(cost.ledger_usd - cost.total_usd) < 1e-9assert cost.by_role["judge"] > 0 and cost.unattributed_usd > 0 # judge verdicts + the residualassert {s.stage for s in cost.by_stage} <= set(stage_order())- assert not hasattr(cost, "budget_usd") # the money ceiling and its report are gonedef test_usage_rows_alias_a_live_ledger_instead_of_copying_it(fake_run):diff --git a/harness/tests/orchestrator_tracks/conftest.py b/harness/tests/orchestrator_tracks/conftest.pyindex 3078dad6..e97922f9 100644--- a/harness/tests/orchestrator_tracks/conftest.py+++ b/harness/tests/orchestrator_tracks/conftest.py@@ -49,8 +49,6 @@ def chair_plan() -> StaticPlan:def make_spec(track: Track = Track.STATIC_OBJECT, language: Language = Language.THREEJS, *, generator: str = "fake:fake-model",max_rounds: int = 3, max_minutes: float = 10.0, prompt: str = "a mid-century wooden dining chair", **kw) -> Spec:- """``max_minutes`` is how a test makes a run run out: money stopped being a ceiling- on 2026-08-28, so a scenario that needs a budget stop sets a tight CLOCK."""return Spec(id="t1", track=track, language=language, prompt=prompt,constraints=Constraints(dimensions_m={"height": 0.82}, must_have=["armrests"]),budget=Budget(max_rounds=max_rounds, max_minutes=max_minutes, max_repair_attempts=2),@@ -62,34 +60,20 @@ def spec() -> Spec:return make_spec()+#: minutes the fakes have "spent". A fake answers instantly, so a scenario that needs a+#: run to stop mid-way gives its fakes a duration: FakeAgent(..., minutes=8).+FAKE_CLOCK = {"minutes": 0.0}++@contextlib.contextmanager-def clock_trips_after(n_reads: int):- """Make the wall-clock ceiling be crossed after ``n_reads`` elapsed-time reads.-- Money stopped being a ceiling on 2026-08-28, so a scenario that needs a run to stop- MID-RUN drives the clock. It has to be driven rather than waited for: a fake model- answers instantly, so real wall time never moves and `max_minutes` alone either stops- the run before round 0 or never. This lets a test say "stop after the work I care- about has happened" without sleeping.- """+def fake_clock():+ """Point BudgetGuard's wall clock at FAKE_CLOCK for the duration of a test."""from codeverse.orchestrator import BudgetGuardreal = BudgetGuard.elapsed_minutes- state = {"n": 0}-- def fake(self: BudgetGuard) -> float:- state["n"] += 1- if state["n"] <= n_reads:- return 0.0- # LOCK the reading at the moment it first trips. Salvage answers a stop by- # granting wall-clock grace, so a clock recomputed against the raised ceiling- # would stay past it for ever and the salvaged round could never run — which is- # the behaviour these scenarios exist to check.- state.setdefault("at", self.hard_minutes + 0.001)- return state["at"]-- BudgetGuard.elapsed_minutes = fake # type: ignore[method-assign]+ FAKE_CLOCK["minutes"] = 0.0+ BudgetGuard.elapsed_minutes = lambda self: FAKE_CLOCK["minutes"] # type: ignore[method-assign]try:- yield state+ yield FAKE_CLOCKfinally:- BudgetGuard.elapsed_minutes = real # type: ignore[method-assign]+ BudgetGuard.elapsed_minutes = real # type: ignore[method-assign]diff --git a/harness/tests/orchestrator_tracks/fakes.py b/harness/tests/orchestrator_tracks/fakes.pyindex 4582a509..5ea16e7e 100644--- a/harness/tests/orchestrator_tracks/fakes.py+++ b/harness/tests/orchestrator_tracks/fakes.py@@ -140,9 +140,11 @@ class FakeAgent:kind = "fake"model = "fake-model"- def __init__(self, writer: Callable[[AgentJob, Workspace], dict[str, str] | None], cost: float = 0.01):+ def __init__(self, writer: Callable[[AgentJob, Workspace], dict[str, str] | None], cost: float = 0.01,+ minutes: float = 0.0):self.writer = writerself.cost = cost+ self.minutes = minutes # wall clock this session burns (see conftest.fake_clock)self.jobs: list[AgentJob] = []@property@@ -164,6 +166,9 @@ class FakeAgent:p.write_text(content)traj = ws.trajectory_dir(job.label or "job", 0)(traj / "transcript.jsonl").write_text(json.dumps({"prompt": job.prompt[:200]}) + "\n")+ from tests.orchestrator_tracks.conftest import FAKE_CLOCK++ FAKE_CLOCK["minutes"] += self.minutesreturn AgentResult(ok=bool(files), exit_reason="completed" if files else "no_changes", files_changed=ws.changed_files(before),transcript_path=str(traj / "transcript.jsonl"), usage=Usage(backend="fake", cost_usd=self.cost, input_tokens=100))@@ -174,9 +179,10 @@ class FakeChatModel:provider = "fake"model = "fake-model"- def __init__(self, responder: Callable[[ChatRequest], Any], cost: float = 0.002):+ def __init__(self, responder: Callable[[ChatRequest], Any], cost: float = 0.002, minutes: float = 0.0):self.responder = responderself.cost = cost+ self.minutes = minutes # wall clock each call burns (see conftest.fake_clock)self.requests: list[ChatRequest] = []@property@@ -187,7 +193,10 @@ class FakeChatModel:return Truedef generate(self, request: ChatRequest) -> ChatResponse:+ from tests.orchestrator_tracks.conftest import FAKE_CLOCK+self.requests.append(request)+ FAKE_CLOCK["minutes"] += self.minutesout = self.responder(request)usage = Usage(backend="fake", model="fake-model", cost_usd=self.cost, input_tokens=500, output_tokens=200)if isinstance(out, (dict, list)):@@ -201,14 +210,18 @@ class FakeJudge:prompt_hash = "fakejudge001" # D37: BaseTrack.after_plan records it as prompt_hashes["judge"]def __init__(self, scores: Sequence[float] = (0.55, 0.7, 0.85), *, targets: Sequence[str] = ("Seat", "FrontLeg", "Backrest", "Armrest"),- acceptance_fail: Sequence[str] = (), cost: float = 0.003):+ acceptance_fail: Sequence[str] = (), cost: float = 0.003, minutes: float = 0.0):self.scores = list(scores)self.targets = list(targets)self.acceptance_fail = list(acceptance_fail)self.cost = cost+ self.minutes = minutesself.calls: list[Any] = []def judge(self, inp: Any) -> Judgment:+ from tests.orchestrator_tracks.conftest import FAKE_CLOCK++ FAKE_CLOCK["minutes"] += self.minutesi = min(len(self.calls), len(self.scores) - 1)self.calls.append(inp)s = self.scores[i]diff --git a/harness/tests/orchestrator_tracks/test_budget_snapshot.py b/harness/tests/orchestrator_tracks/test_budget_snapshot.pyindex 770ea33e..392655a7 100644--- a/harness/tests/orchestrator_tracks/test_budget_snapshot.py+++ b/harness/tests/orchestrator_tracks/test_budget_snapshot.py@@ -57,7 +57,6 @@ def test_resume_restores_money_calls_and_active_time_but_not_downtime():assert g2.elapsed_minutes() == pytest.approx(2.0, abs=0.1)g2.start_time -= 60 # one more ACTIVE minute in THIS session accumulates on topassert g2.elapsed_minutes() == pytest.approx(3.0, abs=0.1)- # prior spend is still restored and still accumulates — it just is not a ceilingg2.charge(Usage(backend="gemini", cost_usd=0.5), stage="refine")assert g2.billed_usd == pytest.approx(1.15) and g2.calls == 3@@ -69,9 +68,7 @@ def test_resume_restores_money_calls_and_active_time_but_not_downtime():def test_a_raised_cap_grants_only_the_difference_and_grace_never_persists():- """A resumed run gets the raised ceiling MINUS what it already used, not a fresh one.- The ceiling is the wall clock (money stopped being one on 2026-08-28); the money the- snapshot carries is still restored, it just cannot end the run."""+ """A resumed run gets the raised ceiling MINUS what it already used, not a fresh one."""import time as _tg1 = BudgetGuard(Budget(max_minutes=10.0), start_time=_t.time())@@ -84,7 +81,7 @@ def test_a_raised_cap_grants_only_the_difference_and_grace_never_persists():g2 = BudgetGuard(Budget(max_minutes=15.0)) # --max-minutes raised 10 → 15g2.restore(snap)assert g2.grace_minutes == 0.0- assert g2.billed_usd == pytest.approx(0.9), "the money is restored, it just is not a ceiling"+ assert g2.billed_usd == pytest.approx(0.9), "the spend is restored, not reset"assert g2.remaining()["minutes"] == pytest.approx(7.0, abs=0.1) # 15 − 8, never a fresh 15@@ -111,8 +108,6 @@ def test_build_context_restores_the_snapshot_and_falls_back_to_legacy_spent(tmp_# --------------------------------------------------------------- ordering: single-shotdef test_a_paid_single_shot_response_is_persisted_when_the_budget_trips(tmp_path):ws = Workspace(tmp_path / "ws").create()- # a wall-clock ceiling already crossed: the phase boundary turns this into the stop,- # and the point of the test is that the PAID response is on disk before it doesguard = BudgetGuard(Budget(max_minutes=1.0))guard._active_s = 120.0 # noqa: SLF001 — already past 1 minanswer = ("=== FILE: src/object.js ===\n"diff --git a/harness/tests/orchestrator_tracks/test_cost_accounting.py b/harness/tests/orchestrator_tracks/test_cost_accounting.pyindex 94b3ce9c..abb73282 100644--- a/harness/tests/orchestrator_tracks/test_cost_accounting.py+++ b/harness/tests/orchestrator_tracks/test_cost_accounting.py@@ -13,7 +13,6 @@ from __future__ import annotationsimport jsonimport time-from functools import partialfrom pathlib import Pathimport pytest@@ -118,10 +117,6 @@ def test_post_hoc_texture_passes_are_inside_the_total_now():# ----------------------------------------------------------------------------- guard mechanicsdef test_spend_buckets_by_stage_and_round_and_only_charge_enforces():- # the ceiling is the clock (money stopped being one on 2026-08-28); what this test- # pins is unchanged — the buckets, and that only `charge` enforces while `add` books- g = BudgetGuard(Budget(max_minutes=1.0), start_time=time.time() - 600)- g.charge = partial(BudgetGuard.charge, g) # keep the bound method after the clock trickg0 = BudgetGuard(Budget(max_minutes=60))g0.charge(Usage(cost_usd=0.4), stage="baseline", round_index=0, label="baseline")g0.add(Usage(cost_usd=0.05), stage="judge", role="judge", round_index=0)@@ -189,11 +184,10 @@ def test_the_guard_still_enforces_backends_that_really_bill():g.spend(Usage(backend="codex", cost_usd=99.0), enforce=False) # subscription: notionalg.spend(Usage(backend="gemini", cost_usd=5.0), enforce=False) # API: real dollarsassert g.billed_usd == pytest.approx(5.0), "a subscription must not bill"- assert g.ok() and not g.soft_exceeded() # neither ceiling is money any more+ assert g.ok() and not g.soft_exceeded()g.spend(Usage(backend="some-new-provider", cost_usd=4.0), enforce=False)assert g.billed_usd == pytest.approx(9.0), "an unknown backend must bill, not be exempt"- # ...and the clock is what can still end itg._active_s = 3600.0 # noqa: SLF001with pytest.raises(BudgetExceeded):g.check()diff --git a/harness/tests/orchestrator_tracks/test_cost_latency.py b/harness/tests/orchestrator_tracks/test_cost_latency.pyindex 3799e8aa..8e529840 100644--- a/harness/tests/orchestrator_tracks/test_cost_latency.py+++ b/harness/tests/orchestrator_tracks/test_cost_latency.py@@ -29,7 +29,7 @@ from codeverse.tracks.scene_assets import (variant_index,)from codeverse.workspace import Workspace-from tests.orchestrator_tracks.conftest import clock_trips_after, make_spec+from tests.orchestrator_tracks.conftest import fake_clock, make_specfrom tests.orchestrator_tracks.fakes import (FakeAgent,FakeChatModel,@@ -46,8 +46,6 @@ needs_node = pytest.mark.skipif(# ----------------------------------------------------------------------------- soft budgetdef test_soft_budget_degrades_before_the_hard_cap_and_grace_reopens_it():- """The sub-budget is the WALL CLOCK: money stopped being a ceiling on 2026-08-28,- so the baseline's share, the degrade-do-not-die step and grace are all in minutes."""clock = {"t": 0.0}g = BudgetGuard(Budget(max_minutes=10.0), soft_fraction=0.55)g.start_time = 0.0@@ -307,11 +305,10 @@ def test_a_budget_stop_before_round_zero_still_delivers_a_judged_round(tmp_path,# the greenhouse hole: 2 asset sessions + env stay under $5; the zone session's own# (real, guard-enforced) charge crosses the ceiling mid-stage: $1.30 × 4 = $5.20- track = SceneTrack(services=services, judge=FakeJudge(scores=(0.58,)), agent=FakeAgent(writer, cost=1.3),+ track = SceneTrack(services=services, judge=FakeJudge(scores=(0.58,)), agent=FakeAgent(writer, cost=1.3, minutes=3.0),planner_model=_planner(plan.model_dump(mode="json")), settings=settings,runtime=FakeRuntime(Language.SCENE_THREEJS))- # the clock runs out mid-run: what this pins never depended on money- with clock_trips_after(20):+ with fake_clock():rec = track.run(spec, ws)assert rec.status is RunStatus.BUDGET and rec.extra["stop_reason"] == "budget"# …and, unlike the greenhouse run, it has a score@@ -322,7 +319,7 @@ def test_a_budget_stop_before_round_zero_still_delivers_a_judged_round(tmp_path,names = [e["event"] for e in ev]assert "budget.salvage" in names and names.count("best.updated") == 1salvage = next(e for e in ev if e["event"] == "budget.salvage")- assert salvage["grace_minutes"] > 0 and "grace_usd" not in salvage # wall clock only now+ assert salvage["grace_minutes"] > 0def test_soft_budget_notes_land_in_the_round_record(tmp_path, settings):@@ -331,12 +328,11 @@ def test_soft_budget_notes_land_in_the_round_record(tmp_path, settings):ws = Workspace(tmp_path / "runs" / "degraded")services = FakeServices(assemble=True)# an expensive agent: the soft cap (55 % of $5) is crossed during the asset stage- agent = FakeAgent(_writer, cost=1.1)+ agent = FakeAgent(_writer, cost=1.1, minutes=2.0)track = SceneTrack(services=services, judge=FakeJudge(scores=(0.5,)), agent=agent,planner_model=_planner(plan.model_dump(mode="json")), settings=settings,runtime=FakeRuntime(Language.SCENE_THREEJS))- # the clock runs out mid-run: what this pins never depended on money- with clock_trips_after(12):+ with fake_clock():rec = track.run(spec, ws)ev = [json.loads(x) for x in (ws.root / "events.jsonl").read_text().splitlines() if x.strip()]degraded = [e for e in ev if e["event"] == "budget.degraded"]@@ -446,12 +442,11 @@ def test_a_scene_round_judged_at_the_ceiling_is_still_promoted(tmp_path, settingplan = _threejs_scene_plan()spec = make_spec(Track.SCENE, Language.SCENE_THREEJS, max_rounds=2)ws = Workspace(tmp_path / "runs" / "ceiling")- judge = FakeJudge(scores=(0.61,), cost=0.5)+ judge = FakeJudge(scores=(0.61,), cost=0.5, minutes=12.0)track = SceneTrack(services=FakeServices(assemble=True), judge=judge, agent=FakeAgent(_writer, cost=0.001),planner_model=_planner(plan.model_dump(mode="json")), settings=settings,runtime=FakeRuntime(Language.SCENE_THREEJS))- # the clock runs out mid-run: what this pins never depended on money- with clock_trips_after(26):+ with fake_clock():rec = track.run(spec, ws)assert rec.status is RunStatus.BUDGET and rec.best_round == 0 and rec.final_score == pytest.approx(0.61)assert len(rec.rounds) == 1 and rec.rounds[0].judgment is not Nonediff --git a/harness/tests/orchestrator_tracks/test_fix_batch2.py b/harness/tests/orchestrator_tracks/test_fix_batch2.pyindex 67e841ec..d357e127 100644--- a/harness/tests/orchestrator_tracks/test_fix_batch2.py+++ b/harness/tests/orchestrator_tracks/test_fix_batch2.py@@ -18,7 +18,7 @@ from codeverse.tracks.planner import plan_examplefrom codeverse.tracks.scene import SceneTrackfrom codeverse.tracks.static_object import ObjectPipeline, StaticObjectTrackfrom codeverse.workspace import Workspace-from tests.orchestrator_tracks.conftest import clock_trips_after, make_spec+from tests.orchestrator_tracks.conftest import fake_clock, make_specfrom tests.orchestrator_tracks.fakes import (FakeAgent,FakeChatModel,@@ -68,12 +68,11 @@ def test_judged_round_survives_budget_ceiling_crossed_by_judge(tmp_path, chair_pwas committed/recorded, throwing away a complete judged round (scene r2 case)."""spec = make_spec(max_rounds=3)ws = Workspace(tmp_path / "runs" / "r")- judge = FakeJudge(scores=(0.55,), cost=0.05) # this single verdict crosses max_usd+ judge = FakeJudge(scores=(0.55,), cost=0.05, minutes=12.0) # this single verdict crosses max_usdtrack = StaticObjectTrack(services=FakeServices(), judge=judge, agent=FakeAgent(_writer),planner_model=_planner(chair_plan.model_dump(mode="json")), settings=settings,runtime=FakeRuntime(Language.THREEJS))- # the clock runs out mid-run: what this pins never depended on money- with clock_trips_after(8):+ with fake_clock():rec = track.run(spec, ws)assert rec.status is RunStatus.BUDGET and rec.extra["stop_reason"] == "budget"assert len(rec.rounds) == 1 and rec.rounds[0].judgment is not None@@ -93,11 +92,10 @@ def test_finalise_restores_best_when_aborted_round_dirtied_src(tmp_path, chair_pws = Workspace(tmp_path / "runs" / "r")# planner 0.002 + baseline agent 0.01 + judge 0.003 = 0.015 < 0.02; the refine agent's# 0.01 charge crosses the ceiling AFTER its files hit the disk.- track = StaticObjectTrack(services=FakeServices(), judge=FakeJudge(scores=(0.55, 0.7), targets=("Seat",)), agent=FakeAgent(_writer),+ track = StaticObjectTrack(services=FakeServices(), judge=FakeJudge(scores=(0.55, 0.7), targets=("Seat",)), agent=FakeAgent(_writer, minutes=6.0),planner_model=_planner(chair_plan.model_dump(mode="json")), settings=settings,runtime=FakeRuntime(Language.THREEJS))- # the clock runs out mid-run: what this pins never depended on money- with clock_trips_after(10):+ with fake_clock():rec = track.run(spec, ws)assert rec.status is RunStatus.BUDGET and rec.best_round == 0 and len(rec.rounds) == 1text = (ws.src / "object.js").read_text()diff --git a/harness/tests/orchestrator_tracks/test_orchestrator.py b/harness/tests/orchestrator_tracks/test_orchestrator.pyindex 1912eb07..c28971d7 100644--- a/harness/tests/orchestrator_tracks/test_orchestrator.py+++ b/harness/tests/orchestrator_tracks/test_orchestrator.py@@ -39,11 +39,10 @@ def test_budget_guard_charges_and_raises():g = BudgetGuard(Budget(max_minutes=10.0))g.charge(Usage(cost_usd=0.02))g.charge(Usage(cost_usd=0.02))- assert g.ok() and "usd" not in g.remaining() # headroom is wall clock only+ assert g.ok()g._active_s = 11 * 60 # noqa: SLF001 — past the ceilingwith pytest.raises(BudgetExceeded) as ei:g.charge(Usage(cost_usd=0.02))- # the money is still counted on the call that raises; it just is not what raisedassert "max_minutes" in ei.value.reason and g.spent.cost_usd == pytest.approx(0.06)diff --git a/harness/tests/orchestrator_tracks/test_round_economics.py b/harness/tests/orchestrator_tracks/test_round_economics.pyindex ddd272d8..b8e9c4d9 100644--- a/harness/tests/orchestrator_tracks/test_round_economics.py+++ b/harness/tests/orchestrator_tracks/test_round_economics.py@@ -41,7 +41,7 @@ from codeverse.tracks.generation import ()from codeverse.tracks.static_object import StaticObjectTrackfrom codeverse.workspace import Workspace-from tests.orchestrator_tracks.conftest import clock_trips_after, make_spec+from tests.orchestrator_tracks.conftest import fake_clock, make_specfrom tests.orchestrator_tracks.fakes import (FakeAgent,FakeChatModel,@@ -332,8 +332,8 @@ def test_skip_judge_reasons_are_only_states_where_the_verdict_is_never_bought(tmassert skip_judge_reason(strict, gates=_gates(0), renders=_renders()) == ""# ... the budget/clock stop: the loop's next budget_ok check ends the run, so this# verdict cannot promote anything (audit: 2 verdicts / $0.09 bought past the clock)- ctx.budget.add(Usage(cost_usd=99.0), stage="refine") # booked, but money is not a ceiling- ctx.budget._active_s = (ctx.budget.budget.max_minutes + 1) * 60 # noqa: SLF001 — the clock is+ ctx.budget.add(Usage(cost_usd=99.0), stage="refine")+ ctx.budget._active_s = (ctx.budget.budget.max_minutes + 1) * 60 # noqa: SLF001assert skip_judge_reason(ctx, gates=_gates(), renders=_renders()) == "budget already exceeded"assert StopPolicy(ctx.policy).evaluate([_round(0, 0.5)], budget_ok=ctx.budget.ok()).reason == "budget"ctx.judge = None@@ -487,19 +487,20 @@ def test_a_lint_stuck_run_keeps_every_score_instead_of_deferring_the_verdict(tmpdef test_a_round_that_raises_still_reports_what_it_burned(tmp_path, chair_plan, settings):- spec = make_spec(max_rounds=2, max_minutes=0.0)+ spec = make_spec(max_rounds=2, max_minutes=10.0)ws = Workspace(tmp_path / "runs" / "cut")class _Expensive(FakeAgent):+ """A session that burns the run's clock — the round after it has none left."""+def run(self, job):res = super().run(job)return res.model_copy(update={"usage": Usage(backend="fake", cost_usd=0.04, input_tokens=1000)})- track = StaticObjectTrack(services=FakeServices(), judge=FakeJudge(scores=(0.5, 0.6)), agent=_Expensive(_writer),+ track = StaticObjectTrack(services=FakeServices(), judge=FakeJudge(scores=(0.5, 0.6)), agent=_Expensive(_writer, minutes=8.0),planner_model=_planner(chair_plan.model_dump(mode="json")), settings=settings,runtime=FakeRuntime(Language.THREEJS), policy=RoundPolicy(max_rounds=2, target=0.9))- # the clock runs out mid-run: what this pins never depended on money- with clock_trips_after(10):+ with fake_clock():rec = track.run(spec, ws)assert rec.status is RunStatus.BUDGETaborted = json.loads((ws.root / "rounds" / "aborted_r01.json").read_text())diff --git a/harness/tests/orchestrator_tracks/test_tracks.py b/harness/tests/orchestrator_tracks/test_tracks.pyindex 6fc29a5f..dd1c7830 100644--- a/harness/tests/orchestrator_tracks/test_tracks.py+++ b/harness/tests/orchestrator_tracks/test_tracks.py@@ -17,7 +17,7 @@ from codeverse.tracks.planner import plan_examplefrom codeverse.tracks.scene import SceneTrackfrom codeverse.tracks.static_object import StaticObjectTrackfrom codeverse.workspace import Workspace-from tests.orchestrator_tracks.conftest import clock_trips_after, make_spec+from tests.orchestrator_tracks.conftest import fake_clock, make_specfrom tests.orchestrator_tracks.fakes import (FAIL_MARK,FakeAgent,@@ -86,7 +86,7 @@ def test_static_track_end_to_end_agent_path(tmp_path, chair_plan, settings):def test_static_track_single_shot_with_repair_and_budget_stop(tmp_path, chair_plan, settings):- spec = make_spec(generator="single-shot:gemini:fake", max_rounds=4, max_minutes=0.0)+ spec = make_spec(generator="single-shot:gemini:fake", max_rounds=4, max_minutes=6.0)ws = Workspace(tmp_path / "runs" / "chair2")n = {"gen": 0}@@ -96,11 +96,10 @@ def test_static_track_single_shot_with_repair_and_budget_stop(tmp_path, chair_plreturn f"=== FILE: src/object.js ===\n// {FAIL_MARK}\nexport function build(){{}}\n=== END FILE ==="return "=== FILE: src/object.js ===\nexport function build(THREE) { return new THREE.Group(); }\n=== END FILE ==="- model = FakeChatModel(responder, cost=0.004)+ model = FakeChatModel(responder, cost=0.004, minutes=0.5)track = StaticObjectTrack(services=FakeServices(), judge=FakeJudge(scores=(0.5, 0.55, 0.6, 0.62)), model=model,planner_model=_planner(chair_plan.model_dump(mode="json")), settings=settings, runtime=FakeRuntime(Language.THREEJS))- # the clock runs out mid-run: what this pins never depended on money- with clock_trips_after(8):+ with fake_clock():rec = track.run(spec, ws)assert rec.status is RunStatus.BUDGET and rec.rounds[0].build.ok and "repair attempts: 1/2 (fixed)" in rec.rounds[0].notesassert rec.rounds[0].score == pytest.approx(0.5)