Official Codebase of 3DCodeVerse
Python
contracts: the package re-exports nothing; stale paths out of the planner-read docstrings
gaoypeng37bf8a652fd3
diff --git a/harness/codeverse3d/contracts/__init__.py b/harness/codeverse3d/contracts/__init__.pyindex 6ed7b969..0588bac9 100644--- a/harness/codeverse3d/contracts/__init__.py+++ b/harness/codeverse3d/contracts/__init__.py@@ -9,113 +9,6 @@ Modules:- ``run`` the run record (rounds, totals, provenance) — the flywheel unit.- ``chat`` ChatModel request/response shapes.- ``agent`` CodingAgent job/result shapes.-"""--from codeverse3d.contracts.agent import AgentJob, AgentResult, FileChange-from codeverse3d.contracts.artifacts import (- BuildResult,- GateFinding,- GateReport,- ImprovementItem,- JudgeIssue,- Judgment,- Measurement,- PartMeasure,- RenderSet,- RenderView,- Severity,-)-from codeverse3d.contracts.chat import (- ChatMessage,- ChatRequest,- ChatResponse,- ImagePart,- TextPart,-)-from codeverse3d.contracts.common import (- ENTRY_FILE,- LANGUAGE_LABEL,- TRACK_INFO,- TRACK_LANGUAGES,- Backends,- Budget,- Language,- Track,- TrackInfo,- Usage,- Vec3,- code_file,-)-from codeverse3d.contracts.plan import (- AcceptanceItem,- ArticulatedPlan,- AssetPlan,- BBox,- CameraPlan,- EffectPlan,- GraphicsPlan,- JointPlan,- PartPlan,- PassPlan,- Plan,- ScenePlan,- StaticPlan,- ZonePlan,-)-from codeverse3d.contracts.run import RoundRecord, RunRecord, RunStatus-from codeverse3d.contracts.spec import Constraints, ReferenceImage, RunOptions, Spec-__all__ = [- "AcceptanceItem",- "AgentJob",- "AgentResult",- "ArticulatedPlan",- "AssetPlan",- "BBox",- "Backends",- "Budget",- "BuildResult",- "CameraPlan",- "ChatMessage",- "ChatRequest",- "ChatResponse",- "Constraints",- "ENTRY_FILE",- "EffectPlan",- "FileChange",- "GateFinding",- "GateReport",- "GraphicsPlan",- "ImagePart",- "ImprovementItem",- "JointPlan",- "JudgeIssue",- "Judgment",- "LANGUAGE_LABEL",- "Language",- "Measurement",- "PartMeasure",- "PartPlan",- "PassPlan",- "Plan",- "ReferenceImage",- "RenderSet",- "RenderView",- "RoundRecord",- "RunOptions",- "RunRecord",- "RunStatus",- "ScenePlan",- "Severity",- "Spec",- "StaticPlan",- "TRACK_INFO",- "TRACK_LANGUAGES",- "TextPart",- "Track",- "TrackInfo",- "Usage",- "Vec3",- "ZonePlan",- "code_file",-]+Every name is imported from its module; the package itself re-exports nothing.+"""diff --git a/harness/codeverse3d/contracts/artifacts.py b/harness/codeverse3d/contracts/artifacts.pyindex 2b6ef738..dc97825f 100644--- a/harness/codeverse3d/contracts/artifacts.py+++ b/harness/codeverse3d/contracts/artifacts.py@@ -153,7 +153,7 @@ class RenderSet(BaseModel):def software_rendered(self) -> bool:"""True when these pixels came from a CPU rasteriser.- Measured on bench/out/scene_baseline (2026-09-05): with the box's eight GPUs at+ Measured on eval/bench/out/scene_baseline (2026-09-05): with the box's eight GPUs at~100 % from other work, the GPU probe's negative verdict is cached for 20 minutes,so cells fell back to SwiftShader one at a time and `fps` was measured on aDIFFERENT renderer per cell — 11.5 fps on an RTX 6000 Ada for one, 5.1 / 7.1 / 2.0diff --git a/harness/codeverse3d/contracts/common.py b/harness/codeverse3d/contracts/common.pyindex 60174026..b6566b1a 100644--- a/harness/codeverse3d/contracts/common.py+++ b/harness/codeverse3d/contracts/common.py@@ -76,7 +76,7 @@ ENTRY_FILE: dict[Language, str] = {#: source files the HARNESS writes under ``src/`` and owns: the agent reads them and calls what#: they define, never writes them (``AgentJob.read_only`` — the agent's write scope excludes them).-#: Measured 2026-08-26 (bench/out/seed_v1, aurora brief, gemini-3.7-flash api-agent): recipes+#: Measured 2026-08-26 (eval/bench/out/seed_v1, aurora brief, gemini-3.7-flash api-agent): recipes#: seeded into the agent's own ``src/common.glsl`` were gone by the end of the run — it rewrote#: the file with its own helpers — so a seeded file has to be one the agent cannot rewrite.#: An entry ending in ``/`` is a DIRECTORY prefix: every file under it is owned. That isdiff --git a/harness/codeverse3d/contracts/plan.py b/harness/codeverse3d/contracts/plan.pyindex 3bd32fd8..f56064f9 100644--- a/harness/codeverse3d/contracts/plan.py+++ b/harness/codeverse3d/contracts/plan.py@@ -72,7 +72,7 @@ class SubPartPlan(BaseModel):They exist so a part a human would call an *assembly* ("burr mechanism", "pegbox","belt housing") can be planned as the 3-6 shapes it really is — which is where themeasured judge reward lives — without adding contact surfaces the assembly gates must- police. See ``docs/EVAL.md`` / the complexity baseline: built-parts ÷ planned-parts is+ police. See the complexity baseline: built-parts ÷ planned-parts isthe only complexity metric with a positive partial correlation to geometry_detail."""name: str = Field(description="PascalCase, unique within the parent, e.g. Burr")@@ -695,7 +695,7 @@ class SubAssembly(BaseModel):class EngineeringBrief(BaseModel):"""The expanded engineering brief for ONE request: what a person who has actually heldthe object knows about it. Produced by a cheap model call *before* planning- (``tracks/brief.py``) and folded into the plan; never a deliverable of its own.+ and folded into the plan; never a deliverable of its own.The load-bearing fields are REQUIRED on purpose. Measured on the first live run: withevery field defaulted, gemini-3.7-flash answered three of four requests withdiff --git a/harness/codeverse3d/contracts/run.py b/harness/codeverse3d/contracts/run.pyindex 6cd9fcdf..e89b0030 100644--- a/harness/codeverse3d/contracts/run.py+++ b/harness/codeverse3d/contracts/run.py@@ -3,7 +3,7 @@``RunRecord`` (rounds, totals, provenance: the flywheel unit), ``RunId`` (where a runsits in a runs dir or a battery), the per-round skills usage, and the packaged``telemetry/`` + ``deliverable/`` blocks. The skills shapes live here rather than in-``codeverse3d/skills`` so ``contracts`` stays a leaf that ``flywheel``, ``gallery`` and the+``codeverse3d/skills`` so ``contracts`` stays a leaf that ``record``, ``addons`` and theCLI import without the router, and a stored record re-reads on a build with no skilllibrary at all."""@@ -103,7 +103,7 @@ class RunId(BaseModel):``battery`` labels the scan root the run was found under; ``rel`` is the rundirectory's posix path relative to that root. Only the scanner still knows theroot, so only the scanner can mint one of these- (``flywheel.record.run_id_for``)."""+ (``record.record.run_id_for``)."""model_config = ConfigDict(frozen=True)diff --git a/harness/docs/INTERFACES.md b/harness/docs/INTERFACES.mdindex 4aa7eb49..c2322db3 100644--- a/harness/docs/INTERFACES.md+++ b/harness/docs/INTERFACES.md@@ -26,9 +26,9 @@ file was reconciled against it on 2026-08-23 (waves 2–3 + fix batch 1).## core (contracts · config · proc)```python-from codeverse3d.contracts import TRACK_INFO, TrackInfo # {Track: TrackInfo(rubric, label)} — THE track registry-from codeverse3d.contracts import ENTRY_FILE, code_file, LANGUAGE_LABEL # {Language: "src/<entry>"}; code_file(lang) -> "code.<ext>"-from codeverse3d.contracts import RunOptions # Spec.options: candidates (int|None, ≥1), texture (bool)+from codeverse3d.contracts.common import TRACK_INFO, TrackInfo # {Track: TrackInfo(rubric, label)} — THE track registry+from codeverse3d.contracts.common import ENTRY_FILE, code_file, LANGUAGE_LABEL # {Language: "src/<entry>"}; code_file(lang) -> "code.<ext>"+from codeverse3d.contracts.spec import RunOptions # Spec.options: candidates (int|None, ≥1), texture (bool)GateFinding.as_line(with_gate=False, with_severity=False, with_target=False, with_hint=True) -> str# "GATE <gate>: [<sev>] <message> [<target>] FIX: <hint>" — flags opt in; no leading "- "RenderView.judge: bool | None # stamped True/False at render time; None = legacy round (every stored view is judged)diff --git a/harness/tests/core/test_contract_additions.py b/harness/tests/core/test_contract_additions.pyindex a4c454d2..6a4720c5 100644--- a/harness/tests/core/test_contract_additions.py+++ b/harness/tests/core/test_contract_additions.py@@ -5,18 +5,17 @@ from __future__ import annotationsimport pytestfrom pydantic import ValidationError-from codeverse3d.contracts import (+from codeverse3d.contracts.artifacts import GateFinding, RenderSet, RenderView, Severity+from codeverse3d.contracts.common import (ENTRY_FILE,LANGUAGE_LABEL,TRACK_INFO,TRACK_LANGUAGES,Language,- RunOptions,- Spec,Track,code_file,)-from codeverse3d.contracts.artifacts import GateFinding, RenderSet, RenderView, Severity+from codeverse3d.contracts.spec import RunOptions, Spec# ------------------------------------------------------------------ registriesdiff --git a/harness/tests/core/test_contracts.py b/harness/tests/core/test_contracts.pyindex 058a0252..1aa3b88e 100644--- a/harness/tests/core/test_contracts.py+++ b/harness/tests/core/test_contracts.py@@ -7,21 +7,20 @@ import mathimport pytestfrom pydantic import ValidationError-from codeverse3d.contracts import (+from codeverse3d.contracts.chat import ChatMessage+from codeverse3d.contracts.common import Budget, Language, Track, Usage+from codeverse3d.contracts.plan import (ArticulatedPlan,+ AssetPlan,BBox,- Budget,- ChatMessage,+ CameraPlan,JointPlan,- Language,PartPlan,ScenePlan,- Spec,StaticPlan,- Track,- Usage,+ ZonePlan,)-from codeverse3d.contracts.plan import AssetPlan, CameraPlan, ZonePlan+from codeverse3d.contracts.spec import Specfrom codeverse3d.conventions import (OBJECT_CLAY_VIEWS,OBJECT_VIEWS,