Official Codebase of 3DCodeVerse
Python
Merge simplify lane L4
gaoypeng0a37bc025982
diff --cc harness/codeverse3d/addons/gallery/detail.pyindex c5e9b7d7,63b667dd..7f9d47e5--- a/harness/codeverse3d/addons/gallery/detail.py+++ b/harness/codeverse3d/addons/gallery/detail.py@@@ -241,14 -241,12 +241,11 @@@ def _renders_panel(entry: RunEntry, urlanchor="renders", extra_head=sheet)- def _cost_panel(entry: RunEntry, ws: Workspace, rec: RunRecord) -> str:- from codeverse3d.record.telemetry import load_telemetry-- tele = load_telemetry(ws, rec)- cost = tele.cost if tele is not None else None+ def _cost_panel(entry: RunEntry, rec: RunRecord) -> str:+ cost = rec.telemetry.cost if rec.telemetry is not None else Noneif cost is None:- rows = "".join(_kv(k, f"${v:.4f}") for k, v in sorted(entry.cost_by_stage.items(), key=lambda kv: -kv[1]))u = rec.total_usage- rows += "".join([_kv("total", f"${u.cost_usd:.4f}"),+ rows = "".join([_kv("total", f"${u.cost_usd:.4f}"),_kv("input tokens", f"{u.input_tokens:,}"), _kv("output tokens", f"{u.output_tokens:,}")])per_round = "".join(_kv(f"r{r.index} {r.kind}", f"${r.usage.cost_usd:.4f} · {r.minutes:.1f} min")for r in rec.rounds)diff --cc harness/codeverse3d/config.pyindex c83e0de8,15b0e061..65081ef7--- a/harness/codeverse3d/config.py+++ b/harness/codeverse3d/config.py@@@ -136,16 -145,13 +136,9 @@@ class Rate(BaseModel)max_in_flight: int = Field(default=96,ge=0, # negative is not "unlimited" (0 is); a negative would poison the slot accounting- description="machine-wide cap on concurrent model calls (0 = off): every process draws "- "from the same N slot files, so the machine never exceeds the largest N any process runs "- "with. Measured knee: a 128-call burst of 12k-token prompts ran 29.6 calls/min at 16 "- "in-flight, 43.9 at 32, 72.9 at 64 and fell back to 47.2 at 128 (docs/COST.md Part III) — with 22 "- "keys; raised 64 → 96 on 2026-10-15 for the 30-key pool after iteration 0 of the argon loop hit the "- "64 cap 172 times at launch while the keys themselves showed no 429 pressure (12 concurrent calls on "- "one key: 0 × 429; re-measure the knee when the loops run two tracks at once).")+ description="machine-wide cap on concurrent model calls (0 = off): every process draws from the same "+ "N slot files. Measured knee with 22 keys: 72.9 calls/min at 64 in flight, 47.2 at 128; 96 serves "+ "the 30-key pool.")- hedge: int = Field(- default=2, ge=1,- description="keys a retry is raced on once a call has met its first 503 (1 = off). Measured "- "2026-08-26: a failed 503 costs the 21-50 s round-trip the provider holds before rejecting, "- "storm streaks average 4.7 attempts, and a 503 bills nothing — so the hedge is free while it "- "storms and wastes one call only when both keys answer (docs/COST.md §27). "- "C3D_RATE__HEDGE=1 for the A/B.")class Judge(BaseModel):diff --cc harness/codeverse3d/contracts/run.pyindex 6c6bd73b,8e538fad..209f4ccd--- a/harness/codeverse3d/contracts/run.py+++ b/harness/codeverse3d/contracts/run.py@@@ -214,9 -190,10 +190,8 @@@ class RoleSettings(BaseModel)class SettingsSnapshot(BaseModel):"""Everything that decided how the run ran."""- schema_version: int = 1roles: list[RoleSettings] = Field(default_factory=list)budget: dict[str, Any] = Field(default_factory=dict, description="max_rounds / max_minutes / max_repair_attempts")- candidates: int | None = Field(default=None, description="best-of-N baseline width, resolved")- seed: int = 0rubric: str = ""rubric_hash: str = Field(default="", description="content hash of the judge rubric YAML")prompt_hashes: dict[str, str] = Field(default_factory=dict, description="contract / generate / refine / repair / skill:<name> / judge …")diff --cc harness/docs/INSTALL.mdindex 36ac5ebe,a64bacc9..6c71c03f--- a/harness/docs/INSTALL.md+++ b/harness/docs/INSTALL.md@@@ -379,9 -381,10 +379,9 @@@ export C3D_JUDGE__THINKING=mediu```Every knob the harness reads is a `Settings` field (`codeverse3d/config.py`, one description-each): `C3D_<FIELD>` at the top level, `C3D_<SECTION>__<FIELD>` nested, plus three flat-spellings of nested knobs — `C3D_MAX_IN_FLIGHT`, `C3D_RENDER_GPU`, `C3D_AGENT_MAX_TURNS`. An+each): `C3D_<FIELD>` at the top level, `C3D_<SECTION>__<FIELD>` nested, plus two flat+spellings of nested knobs — `C3D_MAX_IN_FLIGHT`, `C3D_RENDER_GPU`. An- on/off switch (`C3D_SKILLS`, `C3D_STREAM`, `C3D_PLAN_BRIEF`, … — every `Flag` field) takes+ on/off switch (`C3D_SKILLS`, `C3D_POST`, `C3D_PLAN_BRIEF`, … — every `Flag` field) takeson/off, 1/0, true/false or yes/no in any case; a typo warns and keeps the default, and an emptyvalue is unset. The node side also reads `C3D_RENDER_GPU` and `C3D_CACHE_DIR` itself, and onevariable only it reads: `C3D_BROWSER_REUSE=off` disables the shared headless-Chrome daemon.