Official Codebase of 3DCodeVerse
Python
cleanup: A2 — Delete six dead track/orchestrator helpers
gaoypeng37f6750f4bbf
diff --git a/harness/codeverse/orchestrator/runner.py b/harness/codeverse/orchestrator/runner.pyindex aad24e4b..a16c264e 100644--- a/harness/codeverse/orchestrator/runner.py+++ b/harness/codeverse/orchestrator/runner.py@@ -94,7 +94,7 @@ class StageRunner:# invalidates nothing either. Both used to escape as ValidationError /# JSONDecodeError through BaseTrack.run, which marks the run FAILED and# re-raises, so every later `3dcv resume <slug>` died the same way with no way- # out (StageRunner.invalidate has no caller and no flag). Re-run instead and+ # out (there is no flag to drop a cached stage). Re-run instead and# overwrite the file — the same tolerance load_ledger and _read_jsonl apply.try:result = _revive(json.loads(path.read_text()), model, list_of)@@ -126,13 +126,6 @@ class StageRunner:prior = self.state.stages.get(name)return prior is not None and prior.inputs_hash == hash_inputs(inputs) and self.result_path(name).is_file()- def invalidate(self, name: str) -> None:- self.state.stages.pop(name, None)- p = self.result_path(name)- if p.exists():- p.unlink()- self.state.save(self.ws)-def _revive(data: dict[str, Any], model: type[BaseModel] | None, list_of: type[BaseModel] | None) -> Any:result = data.get("result")diff --git a/harness/codeverse/tracks/graphics_steps.py b/harness/codeverse/tracks/graphics_steps.pyindex d385c403..7c210b1a 100644--- a/harness/codeverse/tracks/graphics_steps.py+++ b/harness/codeverse/tracks/graphics_steps.py@@ -11,7 +11,6 @@ from __future__ import annotationsimport loggingimport shutil-from collections.abc import Sequencefrom pathlib import Pathfrom typing import Any@@ -175,7 +174,3 @@ def frame_stats_text(ws: Workspace) -> str:for f in gate.findings:lines.append(f"- GATE gl_frames {f.as_line(with_severity=True, with_hint=f.severity is not Severity.INFO)}")return "\n".join(lines)---def refine_lines(tasks: Sequence[Any]) -> list[str]:- return [t.line() for t in tasks]diff --git a/harness/codeverse/tracks/lifecycle.py b/harness/codeverse/tracks/lifecycle.pyindex dd673a80..59e98995 100644--- a/harness/codeverse/tracks/lifecycle.py+++ b/harness/codeverse/tracks/lifecycle.py@@ -51,7 +51,7 @@ from codeverse.tracks.common import (language_contract,load_prompt_or,)-from codeverse.tracks.generation import GenerationTask, is_single_shot, single_shot_model_id+from codeverse.tracks.generation import GenerationTask, single_shot_model_idfrom codeverse.tracks.planner import default_event_stats, ensure_acceptance, normalise_namesfrom codeverse.tracks.planner import plan as run_plannerfrom codeverse.tracks.planner import plan_example as default_plan_example@@ -708,7 +708,3 @@ def rewrite_task(last: RoundRecord, best: float | None) -> RefineTask:"way forward. Do NOT repeat them part by part: re-read the plan and the failures below, then ""rewrite the whole artifact coherently, keeping only what the evidence shows was already right."),)---def generator_label(agent_id: str) -> str:- return "single-shot" if is_single_shot(agent_id) else agent_id.split(":", 1)[0]diff --git a/harness/codeverse/tracks/scene_asset_gen.py b/harness/codeverse/tracks/scene_asset_gen.pyindex 4c111bbd..0e189db6 100644--- a/harness/codeverse/tracks/scene_asset_gen.py+++ b/harness/codeverse/tracks/scene_asset_gen.py@@ -325,8 +325,3 @@ def write_variant_shims(ws: Workspace, alias: dict[str, str], available: set[strf" return build{to_pascal(kept)}(THREE, {{ variant: {variant_index(alias, dropped)}, ...opts }});\n}}\n")written.append(rel)return written---def asset_variant_call(kept: str, index: int) -> str:- """The call a zone should emit for a merged asset."""- return f"build{to_pascal(kept)}(THREE, {{ variant: {index} }})"diff --git a/harness/codeverse/tracks/static_object.py b/harness/codeverse/tracks/static_object.pyindex c9b2805c..d2cb0e75 100644--- a/harness/codeverse/tracks/static_object.py+++ b/harness/codeverse/tracks/static_object.py@@ -443,8 +443,3 @@ class StaticObjectTrack(BaseTrack):f"compares every part's bounding box against the previous round and fails the round if one moved. "f"Everything you add lives inside or on an existing part's surface.")---# ----------------------------------------------------------------------------- helpers-def refine_task_lines(tasks: Sequence[RefineTask]) -> list[str]:- return [t.line() for t in tasks]diff --git a/harness/codeverse/tracks/steps.py b/harness/codeverse/tracks/steps.pyindex f0b8f3a5..32c449e5 100644--- a/harness/codeverse/tracks/steps.py+++ b/harness/codeverse/tracks/steps.py@@ -25,7 +25,7 @@ import timefrom collections.abc import Sequencefrom datetime import UTC, datetimefrom pathlib import Path-from typing import Any, Protocol+from typing import Protocolfrom codeverse.contracts.artifacts import BuildResult, GateReport, Measurement, RenderSetfrom codeverse.contracts.common import Usage@@ -479,8 +479,3 @@ def sum_usage(rounds: Sequence[RoundRecord], *extra: Usage) -> Usage:for u in extra:total = total + ureturn total---def describe_round(rec: RoundRecord) -> dict[str, Any]:- return {"index": rec.index, "kind": rec.kind, "score": rec.score, "build_ok": bool(rec.build and rec.build.ok),- "gate_errors": sum(len(g.errors) for g in rec.gates), "commit": rec.commit[:10]}