Skip to content

Official Codebase of 3DCodeVerse

Python

delete what nothing calls: supports_vision, six dead properties, a dead prompt file

gaoypenga3590bf76bb3
diff --git a/harness/codeverse/contracts/plan.py b/harness/codeverse/contracts/plan.py
index 55eb6e14..4bba6738 100644
--- a/harness/codeverse/contracts/plan.py
+++ b/harness/codeverse/contracts/plan.py
@@ -654,10 +654,6 @@ class EngineeringBrief(BaseModel):
not_present: list[str] = Field(default_factory=list, max_length=10,
description="things a naive model would wrongly add")
- @property
- def dimension_map(self) -> dict[str, float]:
- return {d.name: d.meters for d in self.dimensions_m}
-
@property
def is_useful(self) -> bool:
"""A brief with no assemblies AND no signature features tells the planner nothing —
diff --git a/harness/codeverse/conventions.py b/harness/codeverse/conventions.py
index d947354c..75f18ffa 100644
--- a/harness/codeverse/conventions.py
+++ b/harness/codeverse/conventions.py
@@ -24,8 +24,6 @@ import re
from dataclasses import dataclass
from enum import StrEnum
-UNITS = "meters"
-
class Frame(StrEnum):
"""Named coordinate conventions."""
diff --git a/harness/codeverse/cost/audit.py b/harness/codeverse/cost/audit.py
index 031d5e02..89e7951c 100644
--- a/harness/codeverse/cost/audit.py
+++ b/harness/codeverse/cost/audit.py
@@ -107,10 +107,6 @@ class Audit:
def model_s(self) -> float:
return sum(r.model_s for r in self.runs)
- @property
- def harness_s(self) -> float:
- return sum(r.harness_s for r in self.runs)
-
def bucket(self, dim: str, key: str) -> CostBucket:
return self.summary.dimension(dim).get(key, CostBucket(key=key))
diff --git a/harness/codeverse/cost/caching.py b/harness/codeverse/cost/caching.py
index d80d21ae..6aa8df12 100644
--- a/harness/codeverse/cost/caching.py
+++ b/harness/codeverse/cost/caching.py
@@ -39,10 +39,6 @@ class SessionCache:
def cached_fraction(self) -> float:
return self.cached_tokens / self.input_tokens if self.input_tokens else 0.0
- @property
- def first_cached_fraction(self) -> float:
- return self.first_cached / self.first_input if self.first_input else 0.0
-
@property
def saved_usd(self) -> float:
"""USD the cache reads saved against paying full input price for them."""
diff --git a/harness/codeverse/cost/instrument.py b/harness/codeverse/cost/instrument.py
index 3923a5ba..a3258c05 100644
--- a/harness/codeverse/cost/instrument.py
+++ b/harness/codeverse/cost/instrument.py
@@ -90,9 +90,6 @@ class MeteredChatModel:
def id(self) -> str:
return str(self._inner.id)
- def supports_vision(self) -> bool:
- return bool(self._inner.supports_vision())
-
def __getattr__(self, name: str) -> Any: # everything else is the real model's
return getattr(self._inner, name)
diff --git a/harness/codeverse/cost/profiles.py b/harness/codeverse/cost/profiles.py
index d03ffb22..a45563a4 100644
--- a/harness/codeverse/cost/profiles.py
+++ b/harness/codeverse/cost/profiles.py
@@ -35,7 +35,7 @@ The expected $ per profile comes from the same 61 runs; see
from __future__ import annotations
-from dataclasses import dataclass, replace
+from dataclasses import dataclass
#: profile names in increasing order of spend
PROFILE_NAMES = ("economy", "balanced", "quality")
@@ -75,11 +75,6 @@ class Profile:
def expectation(self) -> str:
return f"~${self.expected_usd:.2f}/run, {self.expected_score}"
- def with_overrides(self, **kw: object) -> Profile:
- """Copy with the fields the user stated explicitly (``None`` = not stated)."""
- clean = {k: v for k, v in kw.items() if v is not None and hasattr(self, k)}
- return replace(self, **clean) if clean else self # type: ignore[arg-type]
-
#: the three dials. Generator ids are harness backend ids; judge/planner ids are
#: ``<provider>:<model>``.
diff --git a/harness/codeverse/cost/reconstruct.py b/harness/codeverse/cost/reconstruct.py
index 4f22f57f..5e4aaaca 100644
--- a/harness/codeverse/cost/reconstruct.py
+++ b/harness/codeverse/cost/reconstruct.py
@@ -107,12 +107,6 @@ class RunLedger:
def ledger_usd(self) -> float:
return sum(r.cost_usd for r in self.rows)
- @property
- def harness_s(self) -> float:
- """Wall clock not spent waiting on a model (build / gates / render / IO).
- Clamped at 0: parallel stages can make ``model_s`` exceed the wall clock."""
- return max(0.0, self.wall_s - self.model_s)
-
def _row(usage: Usage, *, run: str, stage: Stage, label: str, rnd: int | None, source: str,
role: Role | None = None, ts: float = 0.0, outcome: str = "ok", n_calls: int = 1,
diff --git a/harness/codeverse/languages/opengl_python/wrappers/run_gl.py b/harness/codeverse/languages/opengl_python/wrappers/run_gl.py
index 5c0de2be..b1acab02 100644
--- a/harness/codeverse/languages/opengl_python/wrappers/run_gl.py
+++ b/harness/codeverse/languages/opengl_python/wrappers/run_gl.py
@@ -119,10 +119,6 @@ class Pass:
def prev_tex(self):
return self.tex[1 - self.cur]
- @property
- def out_tex(self):
- return self.tex[self.cur]
-
def draw(self, ctx, *, w: int, h: int, t: float, frame: int, samplers: dict):
units: dict = {}
for unit, (name, tex) in enumerate(samplers.items()):
diff --git a/harness/codeverse/models/anthropic.py b/harness/codeverse/models/anthropic.py
index dca68db4..a0961e44 100644
--- a/harness/codeverse/models/anthropic.py
+++ b/harness/codeverse/models/anthropic.py
@@ -284,9 +284,6 @@ class AnthropicModel:
def id(self) -> str:
return f"anthropic:{self.model}"
- def supports_vision(self) -> bool:
- return True
-
# ---------------------------------------------------------------- client
def client(self) -> Any:
with self._lock:
diff --git a/harness/codeverse/models/base.py b/harness/codeverse/models/base.py
index 043261a7..226780dd 100644
--- a/harness/codeverse/models/base.py
+++ b/harness/codeverse/models/base.py
@@ -29,8 +29,6 @@ class ChatModel(Protocol):
"""
...
- def supports_vision(self) -> bool: ...
-
class ModelError(RuntimeError):
"""A model call failed. ``attempts`` is how many round-trips the retry machine
diff --git a/harness/codeverse/models/gemini.py b/harness/codeverse/models/gemini.py
index f0c9bfea..f730a3e5 100644
--- a/harness/codeverse/models/gemini.py
+++ b/harness/codeverse/models/gemini.py
@@ -581,9 +581,6 @@ class GeminiModel:
def id(self) -> str:
return f"gemini:{self.model}"
- def supports_vision(self) -> bool:
- return True
-
# --------------------------------------------------------------- generate
def generate(self, request: ChatRequest) -> ChatResponse:
contents = to_contents(request.messages)
diff --git a/harness/codeverse/models/openai.py b/harness/codeverse/models/openai.py
index 61ddeb16..5fe8d72c 100644
--- a/harness/codeverse/models/openai.py
+++ b/harness/codeverse/models/openai.py
@@ -252,9 +252,6 @@ class OpenAIModel:
def id(self) -> str:
return f"openai:{self.model}"
- def supports_vision(self) -> bool:
- return True
-
# ---------------------------------------------------------------- client
def client(self) -> Any:
with self._lock:
diff --git a/harness/codeverse/prompts/texturing/image_prompt_style.md b/harness/codeverse/prompts/texturing/image_prompt_style.md
deleted file mode 100644
index dd1bdfb4..00000000
--- a/harness/codeverse/prompts/texturing/image_prompt_style.md
+++ /dev/null
@@ -1,30 +0,0 @@
-# Image prompt style (texturing)
-
-Every texture prompt sent to the image model is composed by the harness as:
-
- <subject from the material plan>, <family phrase>, seamless tileable texture,
- perfectly repeating at the edges, top-down orthographic view, flat even diffuse
- lighting, no shadows, no specular highlights, no vignette, no depth of field,
- no text, no watermark, no border, fills the whole frame edge to edge, photoreal,
- uniform scale, 1:1 square
-
-Family phrases (appended after the subject so the image model knows what physical
-surface it is drawing):
-
-| family | phrase |
-|----------|--------|
-| wood | natural wood surface, visible grain and subtle pores, uniform plank-free grain unless planks are named |
-| metal | metal surface albedo only, matte base colour, no reflections or environment |
-| fabric | woven textile close-up, visible thread weave, soft matte |
-| stone | stone surface, natural mineral variation, matte |
-| plastic | smooth plastic surface, subtle fine noise, uniform colour |
-| leather | leather surface, fine natural grain and pores, matte |
-| glass | (skipped by default — glass keeps its flat material) |
-| ceramic | glazed ceramic surface, subtle speckle, uniform colour |
-| painted | painted surface, subtle brush or roller micro-texture, uniform colour |
-| rubber | matte rubber surface, fine uniform grain |
-| other | matte natural surface material, fine detail (objects: skipped unless the planner names a subject; scenes: soil, grass, moss, sand) |
-
-Negative phrasing is kept inside the positive prompt (Gemini image models have no
-negative prompt field). The pattern MUST be scale-free: no objects, no horizon, no
-single feature (one knot, one logo) that would repeat visibly every tile.
diff --git a/harness/codeverse/skills/__init__.py b/harness/codeverse/skills/__init__.py
index c17c8ee3..e534d1f6 100644
--- a/harness/codeverse/skills/__init__.py
+++ b/harness/codeverse/skills/__init__.py
@@ -104,10 +104,6 @@ def load_skill(name: str, root: Path | None = None) -> Skill:
return parse_skill(d)
-def skill_names(root: Path | None = None) -> list[str]:
- return [p.name for p in bundle_dirs(root)]
-
-
from codeverse.skills.config import skills_enabled, skills_max, skills_unverified # noqa: E402
from codeverse.skills.materialize import attach_skills, materialize_skills # noqa: E402
from codeverse.skills.registry import plan_signals, select, skills_for # noqa: E402
@@ -117,5 +113,5 @@ from codeverse.skills.telemetry import probe_reads # noqa: E402
__all__ = ["SKILLS_DIR_ENV", "Skill", "SkillError", "SkillRef", "all_skills", "attach_skills", "bundle_dirs",
"check_claims", "claim_values",
"iter_skills", "load_skill", "materialize_skills", "plan_signals", "probe_reads", "select",
- "skill_names", "skills_dir", "skills_enabled", "skills_for", "skills_max", "skills_unverified",
+ "skills_dir", "skills_enabled", "skills_for", "skills_max", "skills_unverified",
"validate_bundle"]
diff --git a/harness/codeverse/skills/model.py b/harness/codeverse/skills/model.py
index e53fcb6a..74c2fd7f 100644
--- a/harness/codeverse/skills/model.py
+++ b/harness/codeverse/skills/model.py
@@ -62,11 +62,6 @@ class Skill(BaseModel):
"""ISO date the bundle's claims were last checked against the harness."""
return self.metadata.get("verified", "")
- @property
- def when_to_use(self) -> str:
- """Optional long form of the *when* half of ``description`` (metadata key)."""
- return self.metadata.get("when_to_use", "")
-
def ref(self) -> SkillRef:
return SkillRef(name=self.name, description=self.description, body_tokens=self.body_tokens)
diff --git a/harness/tests/compare_bench/test_compare_matrix.py b/harness/tests/compare_bench/test_compare_matrix.py
index cd26efb9..babdd67c 100644
--- a/harness/tests/compare_bench/test_compare_matrix.py
+++ b/harness/tests/compare_bench/test_compare_matrix.py
@@ -230,9 +230,6 @@ def test_every_cell_and_its_harness_run_open_a_ledger(tmp_path: Path):
class FakeChat:
provider, model, id = "gemini", "gemini-3.7-flash", "gemini:gemini-3.7-flash"
- def supports_vision(self) -> bool:
- return True
-
def generate(self, request: ChatRequest) -> ChatResponse:
return ChatResponse(text="ok", usage=Usage(backend="gemini", model="gemini-3.7-flash",
input_tokens=1000, output_tokens=10))
diff --git a/harness/tests/compare_bench/test_infra_failures.py b/harness/tests/compare_bench/test_infra_failures.py
index 45a8a89f..7ee8af1e 100644
--- a/harness/tests/compare_bench/test_infra_failures.py
+++ b/harness/tests/compare_bench/test_infra_failures.py
@@ -116,9 +116,6 @@ def test_both_failure_paths_classify_the_same_way(tmp_path):
class DeadModel: # the real ApiOneShot around a model that raises the outage
provider, model = "gemini", "gemini-3.7-flash"
- def supports_vision(self):
- return True
-
def generate(self, request):
raise outage
diff --git a/harness/tests/cost/test_instrument.py b/harness/tests/cost/test_instrument.py
index 854fb09c..6927f183 100644
--- a/harness/tests/cost/test_instrument.py
+++ b/harness/tests/cost/test_instrument.py
@@ -38,9 +38,6 @@ class FakeChat:
def id(self) -> str:
return "gemini:gemini-3.7-flash"
- def supports_vision(self) -> bool:
- return True
-
def generate(self, request: ChatRequest) -> ChatResponse:
self.requests.append(request)
if self.error is not None:
@@ -157,7 +154,7 @@ def test_the_proxy_forwards_everything_else():
chat = FakeChat()
chat.pool = "the-key-pool" # type: ignore[attr-defined]
m = MeteredChatModel(chat)
- assert m.id == "gemini:gemini-3.7-flash" and m.provider == "gemini" and m.supports_vision()
+ assert m.id == "gemini:gemini-3.7-flash" and m.provider == "gemini"
assert m.pool == "the-key-pool"
agent = MeteredAgent(FakeAgent(chat))
assert agent.kind == "self-metering" and agent.available() == (True, "ok")
@@ -471,9 +468,6 @@ def test_a_late_hedge_loser_keeps_its_stage_role_and_round(tmp_path: Path):
id = "gemini:gemini-3.7-flash"
late: threading.Thread | None = None
- def supports_vision(self):
- return True
-
def generate(self, req):
sink = attempt_sink() # captured once, like gemini._attempt_hook
diff --git a/harness/tests/flywheel_cli/test_bench.py b/harness/tests/flywheel_cli/test_bench.py
index 3f3e6d89..ff53c88e 100644
--- a/harness/tests/flywheel_cli/test_bench.py
+++ b/harness/tests/flywheel_cli/test_bench.py
@@ -99,9 +99,6 @@ def test_every_bench_prompt_opens_its_own_run_ledger(tmp_path: Path):
class FakeChat:
provider, model, id = "gemini", "gemini-3.7-flash", "gemini:gemini-3.7-flash"
- def supports_vision(self) -> bool:
- return True
-
def generate(self, request: ChatRequest) -> ChatResponse:
return ChatResponse(text="ok", usage=Usage(backend="gemini", model="gemini-3.7-flash",
input_tokens=1000, output_tokens=10))
diff --git a/harness/tests/flywheel_cli/test_captions.py b/harness/tests/flywheel_cli/test_captions.py
index 30ed69a0..6352280f 100644
--- a/harness/tests/flywheel_cli/test_captions.py
+++ b/harness/tests/flywheel_cli/test_captions.py
@@ -29,9 +29,6 @@ class FakeModel:
def id(self):
return "fake:fake"
- def supports_vision(self):
- return True
-
def generate(self, request: ChatRequest) -> ChatResponse:
self.requests.append(request)
data = self.replies.pop(0)
diff --git a/harness/tests/judges/conftest.py b/harness/tests/judges/conftest.py
index 662c9f57..35bd4aac 100644
--- a/harness/tests/judges/conftest.py
+++ b/harness/tests/judges/conftest.py
@@ -134,9 +134,6 @@ class FakeChatModel:
def id(self) -> str:
return "fake:fake-1"
- def supports_vision(self) -> bool:
- return True
-
def _next_reply(self, request: ChatRequest) -> Any:
for key in sorted(self.by_label, key=len, reverse=True):
if key in (request.label or "") and self.by_label[key]:
diff --git a/harness/tests/models/test_control_chars.py b/harness/tests/models/test_control_chars.py
index aa97dc4b..ebb235f3 100644
--- a/harness/tests/models/test_control_chars.py
+++ b/harness/tests/models/test_control_chars.py
@@ -123,9 +123,6 @@ def test_the_brief_text_fallback_is_sanitised(tmp_path):
provider, model = "fake", "fake-1"
- def supports_vision(self) -> bool:
- return True
-
def generate(self, request):
return ChatResponse(text=json.dumps(payload), parsed=None, usage=Usage())
diff --git a/harness/tests/orchestrator_tracks/fakes.py b/harness/tests/orchestrator_tracks/fakes.py
index ae6e1259..f1601a3b 100644
--- a/harness/tests/orchestrator_tracks/fakes.py
+++ b/harness/tests/orchestrator_tracks/fakes.py
@@ -185,9 +185,6 @@ class FakeChatModel:
def id(self) -> str:
return "fake:fake-model"
- def supports_vision(self) -> bool:
- return True
-
def generate(self, request: ChatRequest) -> ChatResponse:
from tests.orchestrator_tracks.conftest import FAKE_CLOCK
diff --git a/harness/tests/reference/conftest.py b/harness/tests/reference/conftest.py
index e3dc226b..2b547169 100644
--- a/harness/tests/reference/conftest.py
+++ b/harness/tests/reference/conftest.py
@@ -31,9 +31,6 @@ class FakeChat:
def id(self) -> str:
return "fake:fake-1"
- def supports_vision(self) -> bool:
- return True
-
def generate(self, request: ChatRequest) -> ChatResponse:
with self._lock:
self.requests.append(request)
diff --git a/harness/tests/texturing/test_plan.py b/harness/tests/texturing/test_plan.py
index e60f850e..66e08075 100644
--- a/harness/tests/texturing/test_plan.py
+++ b/harness/tests/texturing/test_plan.py
@@ -78,9 +78,6 @@ class _FakeChat:
def id(self):
return "fake:fake"
- def supports_vision(self):
- return True
-
def generate(self, req: ChatRequest) -> ChatResponse:
self.calls.append(req)
return ChatResponse(text=json.dumps(self.payload), parsed=self.payload, usage=Usage(cost_usd=0.002, input_tokens=100))