Skip to content

Official Codebase of 3DCodeVerse

Python

core: one copy of five rules that were written two to seven times

gaoypengf9261fa4f2b3
diff --git a/harness/codeverse/agents/backends.py b/harness/codeverse/agents/backends.py
index 106f3fde..8f5544b0 100644
--- a/harness/codeverse/agents/backends.py
+++ b/harness/codeverse/agents/backends.py
@@ -164,12 +164,20 @@ def _retry_key(pool: KeyPool, used: set[str]) -> str | None:
return None
-class GeminiCliAgent:
- kind = "gemini-cli"
+class _CliAgent:
+ """What all four vendor backends share.
+
+ Everything that MATTERS about a CLI backend differs — argv vocabulary, JSON wire
+ format, usage/pricing shape, key handling — and stays in the subclass. What they
+ share is their id and "is the binary there?", which was four and three verbatim
+ copies until 2026-08-28. Subclasses set ``kind`` / ``cli_label`` and assign
+ ``model`` / ``binary`` in __init__.
+ """
- def __init__(self, model: str, binary: str | None = None):
- self.model = model
- self.binary = binary or get_settings().binaries.gemini_cli
+ kind: str
+ cli_label: str
+ model: str
+ binary: str
@property
def id(self) -> str:
@@ -177,9 +185,24 @@ class GeminiCliAgent:
def available(self) -> tuple[bool, str]:
if not exists_on_path(self.binary):
- return False, f"gemini CLI not found: {self.binary!r}"
+ return False, f"{self.cli_label} CLI not found: {self.binary!r}"
+ return True, "ok"
+
+
+class GeminiCliAgent(_CliAgent):
+ kind = "gemini-cli"
+ cli_label = "gemini"
+
+ def __init__(self, model: str, binary: str | None = None):
+ self.model = model
+ self.binary = binary or get_settings().binaries.gemini_cli
+
+ def available(self) -> tuple[bool, str]:
+ ok, why = super().available()
+ if not ok:
+ return ok, why
if not get_settings().gemini_api_keys:
- return False, "no Gemini API keys configured"
+ return False, "no Gemini API keys configured" # the only backend with a key pool
return True, "ok"
# ------------------------------------------------------------------ build
@@ -371,22 +394,14 @@ def primary_served_model(env: dict[str, Any], model: str) -> str:
return max(served, key=lambda n: float((served[n] or {}).get("costUSD") or 0.0))
-class ClaudeCodeAgent:
+class ClaudeCodeAgent(_CliAgent):
kind = "claude-code"
+ cli_label = "claude"
def __init__(self, model: str, binary: str | None = None):
self.model = model
self.binary = binary or get_settings().binaries.claude_cli
- @property
- def id(self) -> str:
- return f"{self.kind}:{self.model}"
-
- def available(self) -> tuple[bool, str]:
- if not exists_on_path(self.binary):
- return False, f"claude CLI not found: {self.binary!r}"
- return True, "ok"
-
def build_argv(self, s: Session, prompt: str) -> list[str]:
job = s.job
argv = [self.binary, "-p", prompt, "--output-format", "json", "--dangerously-skip-permissions",
@@ -549,22 +564,14 @@ def parse_codex_jsonl(stdout: str) -> CodexEvents:
return ev
-class CodexAgent:
+class CodexAgent(_CliAgent):
kind = "codex"
+ cli_label = "codex"
def __init__(self, model: str, binary: str | None = None, reasoning_effort: str | None = None):
self.model, self.reasoning_effort = split_model_effort(model, reasoning_effort)
self.binary = binary or get_settings().binaries.codex_cli
- @property
- def id(self) -> str:
- return f"{self.kind}:{self.model}"
-
- def available(self) -> tuple[bool, str]:
- if not exists_on_path(self.binary):
- return False, f"codex CLI not found: {self.binary!r}"
- return True, "ok"
-
def build_argv(self, s: Session, prompt: str | None) -> list[str]:
"""``prompt=None`` means 'read it from stdin' (``-`` positional)."""
job = s.job
@@ -698,26 +705,18 @@ def usage_from_agy(env: dict[str, Any], model: str) -> Usage:
)
-class AntigravityAgent:
+class AntigravityAgent(_CliAgent):
kind = "agy"
+ cli_label = "agy"
def __init__(self, model: str, binary: str | None = None):
self.model = model
self.binary = binary or get_settings().binaries.agy_cli
- @property
- def id(self) -> str:
- return f"{self.kind}:{self.model}"
-
def served_model(self) -> str:
"""The id actually sent to agy (a bare one gains its effort suffix)."""
return resolve_model(self.model, self.binary)
- def available(self) -> tuple[bool, str]:
- if not exists_on_path(self.binary):
- return False, f"agy CLI not found: {self.binary!r}"
- return True, "ok"
-
def build_argv(self, s: Session, prompt: str) -> list[str]:
minutes = max(1, int(s.job.timeout_s // 60) + 1)
argv = [self.binary, "--print", prompt, "--dangerously-skip-permissions",
diff --git a/harness/codeverse/gallery/detail.py b/harness/codeverse/gallery/detail.py
index 590b6da8..a56dc1e7 100644
--- a/harness/codeverse/gallery/detail.py
+++ b/harness/codeverse/gallery/detail.py
@@ -16,7 +16,7 @@ from codeverse.contracts.run import RunRecord
from codeverse.flywheel.record import effective_judgment
from codeverse.gallery.cards import gallery_figure, tier_tag, verdict_tag
from codeverse.gallery.code import CODE_CSS, numbered, read_text, src_files
-from codeverse.gallery.index import best_sheet, hero_view
+from codeverse.gallery.index import _rel, best_sheet, hero_view
from codeverse.gallery.model import RunEntry
from codeverse.gallery.theme import esc, footer, page_shell, top_bar
from codeverse.gallery.urls import UrlMaker
@@ -75,17 +75,6 @@ def _panel(title: str, inner: str, *, anchor: str = "", extra_head: str = "") ->
return f"<div class='panel'{ident}><h2>{esc(title)}{extra_head}</h2>{inner}</div>"
-def _rel(run: Path, path: str | None) -> str:
- if not path:
- return ""
- p = Path(path)
- p = p if p.is_absolute() else run / p
- try:
- return p.resolve().relative_to(run.resolve()).as_posix()
- except (ValueError, OSError):
- return ""
-
-
# --------------------------------------------------------------------------- sections
def _hero(entry: RunEntry, urls: UrlMaker, rec: RunRecord) -> str:
"""One big legible view + the facts. Every other angle is in ``renders`` below,
diff --git a/harness/codeverse/languages/base.py b/harness/codeverse/languages/base.py
index 95273359..d355f0eb 100644
--- a/harness/codeverse/languages/base.py
+++ b/harness/codeverse/languages/base.py
@@ -8,6 +8,7 @@ prompts. Runtimes never import agent code into the harness process.
from __future__ import annotations
+from importlib import import_module
from pathlib import Path
from typing import Protocol, runtime_checkable
@@ -42,32 +43,19 @@ class LanguageRuntime(Protocol):
def cookbook_path(self) -> Path: ...
-def get_runtime(language: Language | str) -> LanguageRuntime:
- lang = Language(language)
- if lang is Language.BLENDER:
- from codeverse.languages.blender import BlenderRuntime
-
- return BlenderRuntime()
- if lang is Language.CADQUERY:
- from codeverse.languages.cadquery import CadQueryRuntime
-
- return CadQueryRuntime()
- if lang is Language.THREEJS:
- from codeverse.languages.threejs import ThreeJsRuntime
-
- return ThreeJsRuntime()
- if lang is Language.URDF_BLENDER:
- from codeverse.languages.urdf import UrdfBlenderRuntime
+#: Language → (module, class). Adding a language is a row, and the import stays lazy
+#: (a runtime pulls in bpy / moderngl / node bindings the other six do not need).
+_RUNTIMES: dict[Language, tuple[str, str]] = {
+ Language.BLENDER: ("codeverse.languages.blender", "BlenderRuntime"),
+ Language.CADQUERY: ("codeverse.languages.cadquery", "CadQueryRuntime"),
+ Language.THREEJS: ("codeverse.languages.threejs", "ThreeJsRuntime"),
+ Language.URDF_BLENDER: ("codeverse.languages.urdf", "UrdfBlenderRuntime"),
+ Language.SCENE_THREEJS: ("codeverse.languages.scene_threejs", "SceneThreeJsRuntime"),
+ Language.GLSL_SHADER: ("codeverse.languages.glsl_shader", "GlslShaderRuntime"),
+ Language.OPENGL_PYTHON: ("codeverse.languages.opengl_python", "OpenGLPythonRuntime"),
+}
- return UrdfBlenderRuntime()
- if lang is Language.GLSL_SHADER:
- from codeverse.languages.glsl_shader import GlslShaderRuntime
- return GlslShaderRuntime()
- if lang is Language.OPENGL_PYTHON:
- from codeverse.languages.opengl_python import OpenGLPythonRuntime
-
- return OpenGLPythonRuntime()
- from codeverse.languages.scene_threejs import SceneThreeJsRuntime
-
- return SceneThreeJsRuntime()
+def get_runtime(language: Language | str) -> LanguageRuntime:
+ module, cls = _RUNTIMES[Language(language)]
+ return getattr(import_module(module), cls)()
diff --git a/harness/codeverse/orchestrator.py b/harness/codeverse/orchestrator.py
index 715aa593..b32287c4 100644
--- a/harness/codeverse/orchestrator.py
+++ b/harness/codeverse/orchestrator.py
@@ -761,12 +761,9 @@ def best_index(rounds: Sequence[tuple[float, int]]) -> int:
"""Index of the best round: higher score, tie → fewer errors, tie → later round."""
if not rounds:
raise ValueError("best_index needs at least one round")
- best = 0
- for i, (score, n_err) in enumerate(rounds):
- bs, be = rounds[best]
- if score > bs or (score == bs and n_err < be) or (score == bs and n_err == be):
- best = i
- return best
+ # the three-clause running max WAS this key: greater score, then fewer errors,
+ # then later index (the third clause `score == bs and n_err == be` is the tie-break)
+ return max(range(len(rounds)), key=lambda i: (rounds[i][0], -rounds[i][1], i))
class BestSelector:
diff --git a/harness/codeverse/reference.py b/harness/codeverse/reference.py
index e868ee2e..8c26231f 100644
--- a/harness/codeverse/reference.py
+++ b/harness/codeverse/reference.py
@@ -564,6 +564,31 @@ def decide(ans: GateAnswer, *, model_id: str = "") -> PlausibilityVerdict:
)
+def _ask(model: Any, schema: type[BaseModel], *, system: str, text: str,
+ images: list[ImagePart] | None = None, temperature: float,
+ label: str) -> tuple[Any, Usage, str]:
+ """One structured call → ``(validated object | None, usage, error)``.
+
+ The three callers below built the same ChatRequest (thinking="low", the 65 536
+ ceiling, the 900 s wait), caught the same two failure families and parsed the same
+ two ways — each was a copy carried in from its own pre-merge file. They differ only
+ in what they RETURN on failure, which is why this hands the error back rather than
+ raising or deciding.
+ """
+ req = ChatRequest(messages=[ChatMessage.user(text, images=images)], system=system,
+ response_schema=schema.model_json_schema(), temperature=temperature,
+ thinking="low", max_output_tokens=65_536, max_wait_s=900.0, label=label)
+ try:
+ resp = model.generate(req)
+ except ModelError as e:
+ return None, Usage(), f"call failed: {e}"
+ payload = resp.parsed if resp.parsed is not None else parse_json_lenient(resp.text)
+ try:
+ return schema.model_validate(payload), resp.usage, ""
+ except (ValidationError, TypeError) as e:
+ return None, resp.usage, f"answer unparsable: {e}"
+
+
def check_plausible(
image: Path | str,
spec: Spec,
@@ -578,28 +603,13 @@ def check_plausible(
if not path.is_file():
return PlausibilityVerdict(reason=f"image missing: {path.name}", model_id=model_id), Usage()
text = GATE_USER.format(brief=brief_text(spec), constraints=visual_constraints(spec))
- req = ChatRequest(
- messages=[ChatMessage.user(text, images=[ImagePart(path=str(path), label="CANDIDATE REFERENCE")])],
- system=GATE_SYSTEM,
- response_schema=GateAnswer.model_json_schema(),
- temperature=temperature,
- thinking="low",
- max_output_tokens=65_536,
- max_wait_s=900.0,
- label="reference_gate",
- )
- try:
- resp = model.generate(req)
- except ModelError as e:
- log.warning("reference gate: model error on %s: %s", path.name, e)
- return PlausibilityVerdict(reason=f"gate call failed: {e}", model_id=model_id), Usage()
- payload = resp.parsed if resp.parsed is not None else parse_json_lenient(resp.text)
- try:
- ans = GateAnswer.model_validate(payload)
- except (ValidationError, TypeError) as e:
- log.warning("reference gate: unparsable answer for %s: %s", path.name, e)
- return PlausibilityVerdict(reason=f"gate answer unparsable: {e}", model_id=model_id), resp.usage
- return decide(ans, model_id=model_id or getattr(model, "id", "")), resp.usage
+ ans, usage, err = _ask(model, GateAnswer, system=GATE_SYSTEM, text=text,
+ images=[ImagePart(path=str(path), label="CANDIDATE REFERENCE")],
+ temperature=temperature, label="reference_gate")
+ if err:
+ log.warning("reference gate on %s: %s", path.name, err)
+ return PlausibilityVerdict(reason=f"gate {err}", model_id=model_id), usage
+ return decide(ans, model_id=model_id or getattr(model, "id", "")), usage
# ===================================================================== attach
@@ -696,27 +706,18 @@ def image_prompt_plan(spec: Spec, view_names: list[str], *, model: Any, temperat
if model is None:
return _fallback_plan(spec, view_names), Usage()
text = IMAGE_PROMPT_USER.format(brief=brief_text(spec), n_views=len(view_names), views=", ".join(view_names))
- req = ChatRequest(messages=[ChatMessage.user(text)], system=IMAGE_PROMPT_SYSTEM,
- response_schema=ImagePromptPlan.model_json_schema(), temperature=temperature,
- thinking="low", max_output_tokens=65_536, max_wait_s=900.0, label="reference_prompt")
- try:
- resp = model.generate(req)
- except ModelError as e:
- log.warning("reference prompt writer failed (%s); using the brief verbatim", e)
- return _fallback_plan(spec, view_names), Usage()
- payload = resp.parsed if resp.parsed is not None else parse_json_lenient(resp.text)
- try:
- plan = ImagePromptPlan.model_validate(payload)
- except (ValidationError, TypeError) as e:
- log.warning("reference prompt writer returned invalid JSON (%s); using the brief verbatim", e)
- return _fallback_plan(spec, view_names), resp.usage
+ plan, usage, err = _ask(model, ImagePromptPlan, system=IMAGE_PROMPT_SYSTEM, text=text,
+ temperature=temperature, label="reference_prompt")
+ if err:
+ log.warning("reference prompt writer %s; using the brief verbatim", err)
+ return _fallback_plan(spec, view_names), usage
if not plan.subject.strip():
plan.subject = brief_text(spec).replace("\n", ", ")
by_view = {v.view.strip().lower(): v for v in plan.views}
plan.views = [by_view.get(v, ViewPrompt(view=v)) for v in view_names]
for v, name in zip(plan.views, view_names, strict=True):
v.view = name
- return plan, resp.usage
+ return plan, usage
def synth_reference(
@@ -868,22 +869,12 @@ def compare(
)
images = [ImagePart(path=str(p), label=f"REFERENCE {i + 1}") for i, p in enumerate(refs)]
images += [ImagePart(path=str(p), label=f"RENDER {i + 1} ({p.stem})") for i, p in enumerate(rens)]
- req = ChatRequest(messages=[ChatMessage.user(text, images=images)], system=DIFF_SYSTEM,
- response_schema=DiffAnswer.model_json_schema(), temperature=temperature,
- thinking="low", max_output_tokens=65_536, max_wait_s=900.0, label="reference_diff")
- try:
- resp = model.generate(req)
- except ModelError as e:
- log.warning("reference diff failed: %s", e)
- diff.error = f"diff call failed: {e}"
- return diff
- diff.usage = resp.usage
- payload = resp.parsed if resp.parsed is not None else parse_json_lenient(resp.text)
- try:
- ans = DiffAnswer.model_validate(payload)
- except (ValidationError, TypeError) as e:
- log.warning("reference diff unparsable: %s", e)
- diff.error = f"diff answer unparsable: {e}"
+ ans, usage, err = _ask(model, DiffAnswer, system=DIFF_SYSTEM, text=text, images=images,
+ temperature=temperature, label="reference_diff")
+ diff.usage = usage
+ if err:
+ log.warning("reference diff %s", err)
+ diff.error = f"diff {err}"
return diff
diff.mismatches = ans.mismatches[:MAX_MISMATCHES]
diff.matches = [m.strip()[:120] for m in ans.matches if m.strip()][:4]
diff --git a/harness/codeverse/tracks/articulated_object.py b/harness/codeverse/tracks/articulated_object.py
index e7f4f88f..6431c823 100644
--- a/harness/codeverse/tracks/articulated_object.py
+++ b/harness/codeverse/tracks/articulated_object.py
@@ -105,6 +105,10 @@ class ArticulatedObjectTrack(StaticObjectTrack):
# ----------------------------------------------------------------------------- sweep adapter
def default_joint_sweep(ws: Workspace, plan: Plan | None, out_dir: Path) -> tuple[GateReport, list[RenderView]]:
+ # ``plan`` is unread HERE — the sweep reads the built URDF off disk — but it stays in
+ # the Services.joint_sweep signature: it is the interface's information, and the test
+ # double (tests/orchestrator_tracks/fakes.py) synthesises its poses and findings from
+ # plan.joints because it has no URDF to read.
"""Adapter to ``codeverse.spatial.joints``: load → pose samples →
``sweep_collisions`` → ``sweep_findings`` (gate) and ``render_poses`` (pose views +
``articulation_sheet.png`` for the judge)."""
diff --git a/harness/codeverse/tracks/lifecycle.py b/harness/codeverse/tracks/lifecycle.py
index 5cf1b868..6f03598d 100644
--- a/harness/codeverse/tracks/lifecycle.py
+++ b/harness/codeverse/tracks/lifecycle.py
@@ -454,11 +454,12 @@ class BaseTrack:
# stale best, which is then restored and DELIVERED over the newer paid round
unranked = bool(journal) and state.best_considered_through < journal[-1].index
best_changed = False
- if not journal:
- if best is not None:
- state.best_round, state.best_commit, state.best_score = None, "", None
- best_changed = True
- elif stale or best_invalid or unranked or best is None:
+ # an empty journal used to have its own arm; it is subsumed — with journal == []
+ # this condition is always true (best_invalid when a best is set, `best is None`
+ # otherwise) and BestSelector().pick([]) is None, which clears the best the same
+ # way. The only divergence, blanking a stale best_commit while best_round is
+ # None, is unobservable: no reader touches best_commit without best_round.
+ if stale or best_invalid or unranked or best is None:
pick = BestSelector().pick(journal)
if pick is None:
best_changed = best is not None
diff --git a/harness/codeverse/tracks/planner.py b/harness/codeverse/tracks/planner.py
index 7dce7d2a..475e77fa 100644
--- a/harness/codeverse/tracks/planner.py
+++ b/harness/codeverse/tracks/planner.py
@@ -442,7 +442,7 @@ def _fold_pass(ps: Any) -> None:
ps.description = " · ".join(bits).replace("\n", " ").replace("|", "/")
-def enrich_plan(plan_obj: Any, brief: EngineeringBrief | None, budget: PlanBudget | None = None) -> Any:
+def enrich_plan(plan_obj: Any, brief: EngineeringBrief | None) -> Any:
"""Fold what the BRIEF knows back into the plan's own fields, after validation.
A part's own depth needs no folding: ``tracks/prompting.py`` renders
@@ -770,7 +770,7 @@ def plan_with_usage[P: BaseModel](spec: Spec, model_id: str, plan_model: type[P]
if normalised and events is not None:
events.emit("plan.normalised", attempt=attempt, n=len(normalised), items=normalised[:8])
result = finalise(result) if finalise is not None else ensure_acceptance(normalise_names(result), spec)
- result = enrich_plan(result, brief, budget)
+ result = enrich_plan(result, brief)
ws.write_json(ws.plan_path, result)
if events is not None:
stats = (event_stats or default_event_stats)(result)
diff --git a/harness/codeverse/tracks/static_object.py b/harness/codeverse/tracks/static_object.py
index 37544245..c04529c6 100644
--- a/harness/codeverse/tracks/static_object.py
+++ b/harness/codeverse/tracks/static_object.py
@@ -384,68 +384,38 @@ class StaticObjectTrack(BaseTrack):
``ctx.extra`` records the round index and the measurement to diff against, which
is what ``ObjectPipeline.gates`` turns into the ``detail_drift`` gate.
"""
- lines = detail_instructions(
- last, ctx.plan, max_lines=ctx.policy.max_instructions_per_task + 2
- )
+ lines = detail_instructions(last, max_lines=ctx.policy.max_instructions_per_task + 2)
if not lines:
return [], []
ctx.extra["detail_round"] = index
ctx.extra["detail_baseline"] = last.measurement
scopes = self.scopes(ctx)
tasks: list[GenerationTask] = []
- if scopes:
- for scope in scopes:
- files = list(scope.files)
- prompt = render(
- self.detail_template,
- **scope_context(
- ctx,
- scope,
- round_index=index,
- tasks=lines,
- files=files,
- judge_summary=judge_digest(last),
- current_files=current_files(ctx, files) if ctx.single_shot else {},
- ),
- )
- tasks.append(
- GenerationTask(
- label=f"detail_{scope.label}",
- prompt=prompt,
- system=self.detail_system_prompt(ctx),
- files_hint=files,
- round=index,
- kind=DETAIL_KIND,
- temperature=0.6,
- thinking="high",
- # detail is file-disjoint per scope; the entry gains no surface detail
- edit_only=True,
- )
- )
- else:
- files = expected_files(ctx)
- prompt = render(
- self.detail_template,
- **base_prompt_context(
- ctx,
- round_index=index,
- tasks=lines,
- files=files,
- judge_summary=judge_digest(last),
- current_files=current_files(ctx, files) if ctx.single_shot else {},
- ),
- )
+ # one scoped task per scope, or one whole-object task. The two arms differed in
+ # four values — the context builder, the label, the file list, and which of
+ # edit_only / owns_entry is set (detail is file-disjoint per scope, so a scoped
+ # pass never touches the entry; the whole-object pass owns the full tree).
+ for scope in scopes or [None]:
+ files = list(scope.files) if scope is not None else expected_files(ctx)
+ context = (scope_context(ctx, scope, round_index=index, tasks=lines, files=files,
+ judge_summary=judge_digest(last),
+ current_files=current_files(ctx, files) if ctx.single_shot else {})
+ if scope is not None else
+ base_prompt_context(ctx, round_index=index, tasks=lines, files=files,
+ judge_summary=judge_digest(last),
+ current_files=current_files(ctx, files) if ctx.single_shot else {}))
tasks.append(
GenerationTask(
- label="detail",
- prompt=prompt,
+ label=f"detail_{scope.label}" if scope is not None else "detail",
+ prompt=render(self.detail_template, **context),
system=self.detail_system_prompt(ctx),
files_hint=files,
round=index,
kind=DETAIL_KIND,
temperature=0.6,
thinking="high",
- owns_entry=True, # whole-object pass: files_hint is the full tree
+ edit_only=scope is not None,
+ owns_entry=scope is None,
)
)
ctx.record_prompt("detail", tasks[0].prompt)
@@ -581,7 +551,7 @@ DEFAULT_DETAIL_LINES: tuple[str, ...] = (
)
-def detail_instructions(last: Any, plan: Any, *, max_lines: int = 8) -> list[str]:
+def detail_instructions(last: Any, *, max_lines: int = 8) -> list[str]:
"""Instruction lines for a detail round: the measured density gap first, then the
judge's detail-shaped asks, then the standing detail vocabulary; deduped and capped."""
lines: list[str] = []
diff --git a/harness/tests/languages/test_ast_lint.py b/harness/tests/languages/test_ast_lint.py
index dbe04b5c..079769ce 100644
--- a/harness/tests/languages/test_ast_lint.py
+++ b/harness/tests/languages/test_ast_lint.py
@@ -146,3 +146,15 @@ def test_real_deeply_nested_source_does_not_escape_the_lint():
deep = "import bpy\nx = " + " + ".join(["1"] * 40_000) + "\n"
rep = lint_blender_source(deep)
assert isinstance(rep.passed, bool)
+
+
+def test_the_runtime_registry_covers_every_language():
+ """get_runtime was a 7-branch if-chain whose last arm was an unreachable
+ fall-through; as a table, a missing row is a KeyError at call time instead. This
+ is the drift guard that makes the table safe."""
+ from codeverse.contracts.common import Language
+ from codeverse.languages.base import _RUNTIMES, get_runtime
+
+ assert set(_RUNTIMES) == set(Language), "every Language needs a runtime row"
+ for lang in Language:
+ assert get_runtime(lang).language is lang
diff --git a/harness/tests/orchestrator_tracks/test_generation_depth.py b/harness/tests/orchestrator_tracks/test_generation_depth.py
index 94c81995..ca87d26f 100644
--- a/harness/tests/orchestrator_tracks/test_generation_depth.py
+++ b/harness/tests/orchestrator_tracks/test_generation_depth.py
@@ -179,7 +179,7 @@ def test_detail_instructions_take_the_judges_detail_asks_then_the_standing_vocab
ImprovementItem(target="Seat", kind="material", instruction="give the seat an oiled-oak colour", priority=1),
ImprovementItem(target="FrontLeg", kind="assembly", instruction="move the leg 12 mm in", priority=1),
])
- lines = detail_instructions(RoundRecord(index=1, kind="refine", judgment=j), None, max_lines=8)
+ lines = detail_instructions(RoundRecord(index=1, kind="refine", judgment=j), max_lines=8)
assert any("oiled-oak" in ln for ln in lines)
assert not any("move the leg" in ln for ln in lines) # assembly work is the repair loop's
assert any("Bevel or chamfer" in ln for ln in lines) # the standing vocabulary is always there