Official Codebase of 3DCodeVerse
Python
integrate: compose leftovers go with the compose session, R4 joins R3 as object-only, stale bvh/--normalise text; settings reset between tests
gaoypeng0a61e44a5bcc
diff --git a/harness/codeverse3d/cost/types.py b/harness/codeverse3d/cost/types.pyindex 5c1f1430..5e7a19bb 100644--- a/harness/codeverse3d/cost/types.py+++ b/harness/codeverse3d/cost/types.py@@ -22,8 +22,9 @@ class Stage(StrEnum):PLAN = "plan"#: SKELETON / GATES / RENDER are *deterministic harness work* (no model call at#: all); kept in the enum so latency can be attributed to them from events- #: (``report.STAGE_ORDER``, ``audit.stage_latency``). ASSEMBLE is NOT one of- #: them — the scene track's ``compose`` task is an agent session that bills.+ #: (``report.STAGE_ORDER``, ``audit.stage_latency``). ASSEMBLE is deterministic too+ #: since the scene track's ``compose`` agent session was removed (2026-09-22); older+ #: ledgers still carry it.SKELETON = "skeleton"ASSETS = "assets"ENV = "env"@@ -64,7 +65,6 @@ _KIND_STAGES: dict[str, Stage] = {"asset": Stage.ASSETS,"asset_fix": Stage.ASSETS,"zone": Stage.ZONES,- "compose": Stage.ASSEMBLE,}#: label prefix → stage, longest prefix wins (``asset_stone_lantern`` → assets)diff --git a/harness/codeverse3d/skills/c3d-bbox-contract/SKILL.md b/harness/codeverse3d/skills/c3d-bbox-contract/SKILL.mdindex 6ffe9d68..d661029c 100644--- a/harness/codeverse3d/skills/c3d-bbox-contract/SKILL.md+++ b/harness/codeverse3d/skills/c3d-bbox-contract/SKILL.md@@ -1,6 +1,6 @@---name: c3d-bbox-contract-description: "Use when a session owns part sizes, placement or ground contact, or when the contract gate fired: hit the plan's dimensions on the first build. Applies to baseline, part, detail, refine, rebuild and zone sessions on static_object, articulated_object and scene. Covers the tolerance the gate really uses (relative, not a flat millimetre figure), how instanced parts are measured, ground contact and footprint, part-name matching, and how to prove the numbers with measure / check_contract instead of by eye."+description: "Use when a session owns part sizes, placement or ground contact, or when the contract gate fired: hit the plan's dimensions on the first build. Applies to baseline, part, detail, refine and rebuild sessions on static_object and articulated_object. Covers the tolerance the gate really uses (relative, not a flat millimetre figure), how instanced parts are measured, ground contact and footprint, part-name matching, and how to prove the numbers with measure / check_contract instead of by eye."license: Apache-2.0metadata:evidence: measureddiff --git a/harness/codeverse3d/skills/c3d-threejs-forms/SKILL.md b/harness/codeverse3d/skills/c3d-threejs-forms/SKILL.mdindex 44f26a8d..b03a5caa 100644--- a/harness/codeverse3d/skills/c3d-threejs-forms/SKILL.md+++ b/harness/codeverse3d/skills/c3d-threejs-forms/SKILL.md@@ -67,7 +67,7 @@ blows the ceiling; the budget belongs on the shapes that fill the silhouette.## There is no CSG-`runtime_js/package.json` ships `three`, `puppeteer` and `three-mesh-bvh` only —+`runtime_js/package.json` ships `three` and `puppeteer` only —there is no `three-bvh-csg`, no `Brush`, no `Evaluator`, and the lint allowsimports of `three`, `three/addons/*` and relative files under `src/` and nothingelse. So a boolean operation is not available to you at all, in eitherdiff --git a/harness/codeverse3d/skills/registry.py b/harness/codeverse3d/skills/registry.pyindex f6721054..356f0c65 100644--- a/harness/codeverse3d/skills/registry.py+++ b/harness/codeverse3d/skills/registry.py@@ -171,12 +171,13 @@ ROUTES: tuple[Route, ...] = (Route("R2", "c3d-part-contact", 95, kinds=("repair", "refine", "rebuild"),findings=("connectivity/*", "joint_sweep/*"),why="the previous round's connectivity/joint gate fired"),- # object tracks only: the sheet's proof loop is measure / check_contract / isolate, and a- # scene session has none of those tools (it was attached to scene zone sessions until 2026-09-22)+ # R3 and R4 are object tracks only: the sheet's proof loop is measure / check_contract /+ # isolate, and a scene session has none of those tools (both reached scene sessions until 2026-09-22)Route("R3", "c3d-bbox-contract", 65, tracks=OBJECT_TRACKS,kinds=("baseline", "part", "detail", "refine", "rebuild"),why="this session owns dimensions, and the plan's numbers are the contract"),- Route("R4", "c3d-bbox-contract", 95, kinds=("repair", "refine", "rebuild"), findings=("contract/*",),+ Route("R4", "c3d-bbox-contract", 95, tracks=OBJECT_TRACKS, kinds=("repair", "refine", "rebuild"),+ findings=("contract/*",),why="the previous round's contract gate fired"),# R5 was c3d-form-manifest, retired 2026-08-25: read 2/19 (11%, CI [3%,31%]) before and# after its description was revised. See docs/SKILLS_LEDGER.md (the bundle's text is in git history). The id is@@ -203,7 +204,7 @@ ROUTES: tuple[Route, ...] = (findings=("joint_sweep/*", "motion_direction/*"),why="a joint_sweep or motion_direction gate fired on the previous round"),Route("R14", "c3d-scene-composition", 75, tracks=("scene",), languages=("scene_threejs",),- kinds=("baseline", "env", "zone", "compose", "refine"),+ kinds=("baseline", "env", "zone", "refine"),why="scene layout and camera framing"),Route("R15", "c3d-scene-composition", 95, tracks=("scene",), languages=("scene_threejs",),findings=(SCENE_CAMERA_PLACEMENT,),@@ -215,7 +216,7 @@ ROUTES: tuple[Route, ...] = (findings=(SCENE_DARK_OR_FLAT,),why="the frame gate called the render dark or flat"),Route("R18", "c3d-scene-motion", 70, tracks=("scene",), languages=("scene_threejs",),- kinds=("baseline", "zone", "refine", "compose"),+ kinds=("baseline", "zone", "refine"),why="animation_life 0.431 is the lowest criterion in the whole corpus"),Route("R19", "c3d-scene-motion", 90, tracks=("scene",), languages=("scene_threejs",),findings=(GL_MOTION_OR_DETAIL,),@@ -244,13 +245,13 @@ ROUTES: tuple[Route, ...] = (kinds=("baseline", "env", "refine"),why="the sky bake is the light source every PBR surface reflects; 4/9 reference scenes shipped it inverted"),Route("R26", "c3d-scene-water", 85, tracks=("scene",), languages=("scene_threejs",),- kinds=("baseline", "env", "zone", "compose", "refine"), requires_any=("wants_water",),+ kinds=("baseline", "env", "zone", "refine"), requires_any=("wants_water",),why="the plan's own words ask for water; metallic water is the reference's most-shipped material mistake"),Route("R27", "c3d-scene-night", 85, tracks=("scene",), languages=("scene_threejs",),- kinds=("baseline", "env", "zone", "compose", "refine"), requires_any=("wants_night",),+ kinds=("baseline", "env", "zone", "refine"), requires_any=("wants_night",),why="the plan's own words ask for night; shafts/emissive discipline is measured in the reference ledger"),Route("R28", "c3d-scene-materials", 65, tracks=("scene",), languages=("scene_threejs",),- kinds=("baseline", "zone", "compose", "refine"),+ kinds=("baseline", "zone", "refine"),why="flat albedo and identical twins are the reference audit's most-cited surface defects"),)diff --git a/harness/codeverse3d/tracks/scene.py b/harness/codeverse3d/tracks/scene.pyindex 0945c12e..df47c626 100644--- a/harness/codeverse3d/tracks/scene.py+++ b/harness/codeverse3d/tracks/scene.py@@ -283,7 +283,7 @@ class SceneTrack(BaseTrack):in ``prepare()``: ``_env_stage`` writes the lighting and ``_zones_stage`` thecontents — agent sessions that never passed through ``steps.run_round``, the ONEplace that called ``attach_for_round`` (``scene.js`` is assembled, not written). The- router has always had ``kinds=("env", "zone", "compose")`` rows for the four scene+ router has always had ``kinds=("env", "zone")`` rows for the four scenebundles (registry R14-R21), so they were selected for these very stages and thendelivered to nobody: measured 2026-08-25 at 0 opens out of 30 listings, while round0's ``baseline_tasks`` returned ``[]`` and so listed them to a session that did notdiff --git a/harness/docs/ARCHITECTURE.md b/harness/docs/ARCHITECTURE.mdindex f59acc53..87e3ec1b 100644--- a/harness/docs/ARCHITECTURE.md+++ b/harness/docs/ARCHITECTURE.md@@ -310,7 +310,7 @@ summary:errors map to `src/<file>.py:line`.* **threejs** (static): `src/parts/<snake>.js` each `export function build<Pascal>(THREE) → THREE.Group`at world pose (Y-up, +Z front, meters); `src/object.js` `export function build(THREE)`.- Export is **as authored** (no re-centring; `--normalise` is a dataset-only flag);+ Export is **as authored** (no re-centring);`InstancedMesh` is baked to plain `<Name>_<i>` meshes (trimesh ignoresEXT_mesh_gpu_instancing); an exported `selfcheck(THREE, root)` is called and athrow fails the build as `SelfCheckError`; NaN-geometry errors name mesh + partdiff --git a/harness/docs/INTERFACES.md b/harness/docs/INTERFACES.mdindex c1e8515f..200f3bee 100644--- a/harness/docs/INTERFACES.md+++ b/harness/docs/INTERFACES.md@@ -217,7 +217,7 @@ BuildResult.error_type spellings (languages/_common.py): MISSING_ENTRY = "Missin|---|---|---|| `BlenderRuntime` | `src/model.py`, `src/parts/*.py` | **Δ multi-file**: `file_for_part(name) -> "src/parts/<snake>.py"` (`def build_<snake>()`); lint = `layout.lint_workspace` over every src/*.py; skeleton writes model.py + per-part files; object.glb/stl, build.json, census.json || `CadQueryRuntime` | `src/model.py` | trailing selector on the stack → parent solid exported + warning (ExportError when no solid exists); helper-module errors map to `src/<file>.py:line`; object.glb/stl/step |-| `ThreeJsRuntime` | `src/object.js`, `src/parts/*.js` | **Δ export as authored** (`--normalise` opt-in, never passed by the runtime; census `placement_offset`/`normalised_offset`); InstancedMesh baked to `<Name>_<i>` meshes (`instanced_meshes_baked`); exported `selfcheck(THREE, root)` is called (throw → SelfCheckError); NaN geometry errors name mesh/part → routed to `src/parts/<snake>.js` |+| `ThreeJsRuntime` | `src/object.js`, `src/parts/*.js` | **Δ export as authored** (census `placement_offset`); InstancedMesh baked to `<Name>_<i>` meshes (`instanced_meshes_baked`); exported `selfcheck(THREE, root)` is called (throw → SelfCheckError); NaN geometry errors name mesh/part → routed to `src/parts/<snake>.js` || `UrdfBlenderRuntime` | `src/model.py`, `src/robot.urdf` | object.glb (Y-up, node=link, joint extras), meshes/<link>.glb (raw Z-up link frames); link name `world` is reserved (lint ERROR + UrdfError); robot GLB root gets `__root` suffix on name clash || `SceneThreeJsRuntime` | `src/scene.js`, `src/zones/*.js`, `src/assets/*.js`, `src/env.js`, `src/shaders/*.js` | glb_path=None; ok iff `probe_scene` + `check_shaders` pass || `GlslShaderRuntime` | `src/shader.frag`, `src/common.glsl`, `src/buffer_a.frag` (+ the harness-owned `src/recipes.glsl` when seeded) | harness owns `#version`/uniforms/`out` (wrap.HEADER: u_time/u_resolution/u_mouse/u_frame/u_prev/u_noise + iTime/iChannel* aliases); `wrap.compose(shader, common, recipes_src=…)` pastes header < recipes < common < shader; build renders judge frames via GlHost; compile errors → GlslCompileError at mapped src file:line (recipes.glsl included); lint ERROR `redefines_recipe` when an agent file defines a recipes.glsl name; artifacts frames/, frames_sheet.png, preview.gif, metrics.json |diff --git a/harness/tests/conftest.py b/harness/tests/conftest.pyindex 3ba826e9..de6e54dd 100644--- a/harness/tests/conftest.py+++ b/harness/tests/conftest.py@@ -11,6 +11,18 @@ import pytestfrom codeverse3d.workspace import Workspace[email protected](autouse=True)+def _fresh_settings():+ """`3dcode make --profile X` applies the dial to the cached Settings singleton — right for+ a process that runs one run, but in the test process it leaked into every later test on the+ same xdist worker (`--profile quality` changed the next test's default max_minutes)."""+ from codeverse3d.config import get_settings++ get_settings.cache_clear()+ yield+ get_settings.cache_clear()++@pytest.fixturedef tmp_ws(tmp_path: Path) -> Workspace:"""A fresh, git-initialised workspace under a temp dir."""diff --git a/harness/tests/cost/test_instrument.py b/harness/tests/cost/test_instrument.pyindex 7e40420a..fff4e5d8 100644--- a/harness/tests/cost/test_instrument.py+++ b/harness/tests/cost/test_instrument.py@@ -111,14 +111,14 @@ def test_a_cli_agent_we_cannot_see_inside_gets_one_session_row(tmp_path: Path):def test_a_session_row_is_filed_by_the_task_kind(tmp_path: Path):- """``job.kind`` is a bare task kind (``zone``, ``compose``, ``rebuild``); until 2026-08-29+ """``job.kind`` is a bare task kind (``zone``, ``rebuild``, ``asset``); until 2026-08-29only the label PREFIXES were known here, so every scene zone session was ``other``."""with run_ledger(tmp_path, run="r1"):- for kind, label in (("zone", "zone_courtyard"), ("compose", "compose"), ("rebuild", "rebuild"),+ for kind, label in (("zone", "zone_courtyard"), ("rebuild", "rebuild"),("asset", "asset_koi"), ("candidate", "baseline_c1")):MeteredAgent(CliAgent(FakeChat())).run(AgentJob(workspace=str(tmp_path), prompt="p", label=label, round=0, kind=kind))- assert [r.stage for r in load_ledger(tmp_path)] == [Stage.ZONES, Stage.ASSEMBLE, Stage.REPAIR,+ assert [r.stage for r in load_ledger(tmp_path)] == [Stage.ZONES, Stage.REPAIR,Stage.ASSETS, Stage.CANDIDATE]diff --git a/harness/tests/orchestrator_tracks/test_round_economics.py b/harness/tests/orchestrator_tracks/test_round_economics.pyindex 39ffaace..d3640141 100644--- a/harness/tests/orchestrator_tracks/test_round_economics.py+++ b/harness/tests/orchestrator_tracks/test_round_economics.py@@ -266,7 +266,7 @@ def test_task_stage_names_the_cost_bucket_a_task_spends_in():assert t("baseline") == "baseline" and t("refine") == "refine" and t("repair") == "repair"assert t("rebuild") == "repair" # regenerating after a failed build IS repair moneyassert t("zone") == "zones" and t("asset") == "assets" and t("asset_fix") == "assets"- assert t("compose") == "assemble" and t("env") == "env"+ assert t("env") == "env"# the static track's surface-detail round is refine money, not "other" — it filed as# Stage.OTHER until 2026-08-30 because _LABEL_STAGES had no "detail" prefixassert t("detail") == "refine" and t("detail", "detail_seat") == "refine"diff --git a/harness/tests/skills/test_routing_property.py b/harness/tests/skills/test_routing_property.pyindex 8405f339..da288458 100644--- a/harness/tests/skills/test_routing_property.py+++ b/harness/tests/skills/test_routing_property.py@@ -19,7 +19,7 @@ TRACKS = ("static_object", "articulated_object", "scene", "graphics")LANGUAGES = ("blender", "cadquery", "threejs", "urdf_blender", "scene_threejs","glsl_shader", "opengl_python")KINDS = ("baseline", "part", "detail", "refine", "rebuild", "repair", "env", "zone",- "compose", "asset", "asset_fix", "reference")+ "asset", "asset_fix", "reference")#: the boolean plan signals the table may test (n_parts / joint_types are derived)FLAGS = tuple(k for k in SIGNAL_KEYS if k not in ("n_parts", "joint_types"))JUNK = ("", " ", "no_such_track", "STATIC_OBJECT", "static object", "1", "../etc")