Official Codebase of 3DCodeVerse
Python
review round 2: the residue — a self-mimic's own message, and three prose copies
ziyaof3eef613be2d
diff --git a/harness/codeverse/spatial/joints_model.py b/harness/codeverse/spatial/joints_model.pyindex abebb5d4..bd80617d 100644--- a/harness/codeverse/spatial/joints_model.py+++ b/harness/codeverse/spatial/joints_model.py@@ -343,6 +343,8 @@ def _mimic_message(issue: MimicIssue, joints: dict[str, Joint]) -> str:return f'joint {j}: <mimic joint="{t}"> names no joint; known: {sorted(joints)}'if kind == "immobile_target":return f"joint {j}: mimics {t!r}, which is {joints[t].type} and never moves"+ if kind == "self":+ return f'joint {j}: <mimic joint="{j}"> names itself'return f"joint {j}: <mimic> chain is a cycle through {(issue.detail or j)!r}"diff --git a/harness/docs/ARCHITECTURE.md b/harness/docs/ARCHITECTURE.mdindex 9c4b0844..fd4d3126 100644--- a/harness/docs/ARCHITECTURE.md+++ b/harness/docs/ARCHITECTURE.md@@ -357,10 +357,8 @@ server (name `3dcv`) for the vendor CLIs, (c) a native tool schema for any embedAn `Observation` carries two different answers: `ok` is the **verdict** and `failed`says the tool **could not run** (exception, missing artefact, unusable arguments).`Observation.error` builds every failure caught at the `ToolDef.call` boundary; three-tools set `failed` on an observation they compose themselves, where the failure is a-fact about the result rather than an exception — `build` (runtime success, no readable-GLB), `scene_probe` (the probe driver died) and `observe.render_observation` (no view AND-no console error; with one it is a verdict). Those four places are the whole list. MCP `is_error` is `failed` alone: a+tools set `failed` on an observation they compose themselves; the list of those places+lives with the field, in `spatial/registry.Observation.error`. MCP `is_error` is `failed` alone: anegative verdict is a result whose text leads with FAIL, because a vendor CLI retries anerrored call, and over 224 recorded gemini-cli sessions `is_error = not ok` made 62 % of1 445 `joint_sweep` calls, 23 % of 2 144 `build`s and ~15 % of the connectivity/contract@@ -553,14 +551,10 @@ errors, cost, fingerprints, `duplicate_of`; `--pack` tars with byte-range locato`flywheel pairs` emits preference pairs (round i < j by judge Δ ≥ τ) and round-levelrepair pairs (in-session trajectory mining died with the api-agent, 2026-08-28 —vendor CLIs log raw stdout, not structured tool turns); `flywheel refine` emits the loop's OWN transitions — one row per (round i → round-i+1) where the harness asked for a change: the failing round's gate findings and-judge complaint, the refine instructions the harness wrote, both code snapshots (git-`before`/`after` commits, `--with-code` inlines the files), the score before and-after, and `outcome` (`improved` when the judge gained ≥ 0.05 — the same threshold-`flywheel/pairs.py` calls a preference — `regressed` when it lost as much,-`unchanged` in between, `unscored` when either side has no verdict). Rows are-dropped, with the reason recorded, when a predecessor has no commit, no verdict or-did not build. That is the supervision the harness produces that a+i+1) where the harness asked for a change, carrying what condemned the round, the+instructions written in response, both code snapshots and whether the score moved+(the row is `flywheel/refine.RefineTransition`; INTERFACES has the fields and the+drop reasons). That is the supervision the harness produces that aone-shot corpus cannot: what a failing artefact looked like, what was wrong with itin the harness's own words, and what the fix changed. `toolkits/llamafactory/`turns those rows into training files; the harness writes the measurement, not thediff --git a/harness/docs/COST.md b/harness/docs/COST.mdindex 49da7772..ae08c5fe 100644--- a/harness/docs/COST.md+++ b/harness/docs/COST.md@@ -1447,12 +1447,9 @@ A second flag, not a threshold. `Observation.failed` is what the MCP server rep`is_error`; `ok` stays the verdict. `Observation.error` builds every failure caught at the`ToolDef.call` boundary (exception, `ToolUnavailable`, `ToolUsageError`, missing orunreadable artefact), and three tools set `failed` on a result they compose themselves,-where the failure is a fact about the result rather than an exception: `build` (the runtime-reported success and left no readable GLB), `scene_probe` (the probe driver died) and-`observe.render_observation` (no view AND nothing logged — a render with no picture and no-reason is not a verdict; console errors ARE one, empty RenderSet or not, because a scene-that fails to boot returns exactly that and the errors say what to fix). Those four places-are the whole list.+where the failure is a fact about the result rather than an exception. Which places those+are is a property of the code, so the list lives there (`spatial/registry.Observation.error`)+and not in three documents.Every negative verdict now LEADS its text with `… FAIL` (`gate_observation` for the gates,`JOINT SWEEP: FAIL — penetration …`, `FRAME GATE: FAIL — n error(s)`, `RENDER: FAIL — ndiff --git a/harness/docs/RUNBOOK.md b/harness/docs/RUNBOOK.mdindex 7d1d7454..1dc3fc42 100644--- a/harness/docs/RUNBOOK.md+++ b/harness/docs/RUNBOOK.md@@ -159,13 +159,10 @@ unless you type `--host` yourself; it never serves a path outside the declared r[--captions-dir caps/] [--drop-duplicates]3dcv flywheel pairs runs/ pairs.jsonl [--min-delta 0.05]3dcv flywheel refine runs/ refine.jsonl [--with-code]- # one row per round i -> i+1 the harness asked to change:- # gate findings + judge complaint + the refine instructions,- # before/after commits (--with-code inlines the files),- # score_before/score_after, outcome improved|regressed|- # unchanged|unscored, and dropped rows with the reason- # (no_predecessor / no_commit / predecessor_unjudged / ...).- # Training formats live in toolkits/llamafactory/, not here.+ # one row per round the harness asked to change; the row+ # schema is codeverse/flywheel/refine.RefineTransition and+ # INTERFACES has the call signatures. Training formats live+ # in toolkits/llamafactory/, not here.3dcv flywheel caption <slug> [--model …] [--out caps/] # --out = side-car mode, run untouched3dcv flywheel gallery runs/ gallery.html [--title …] # alias of `3dcv gallery build --embed` (§4)3dcv flywheel index runs/ runs_index.sqlite · 3dcv flywheel dedupe dataset/diff --git a/harness/tests/urdf_joints/test_mimic.py b/harness/tests/urdf_joints/test_mimic.pyindex a024c662..31c0e777 100644--- a/harness/tests/urdf_joints/test_mimic.py+++ b/harness/tests/urdf_joints/test_mimic.py@@ -316,3 +316,13 @@ def test_the_lint_says_when_only_the_first_instance_of_a_driver_is_followed(tmp_warns = [f for f in lint_workspace(ws).findings if "stay independent inputs" in f.message]assert len(warns) == 1 and warns[0].target == "rib_a_hinge"assert "runner_slide_2" in warns[0].message and warns[0].severity.value == "warn"+++def test_a_self_mimic_says_it_names_itself(tmp_path):+ """The loader reported a self-coupling as "chain is a cycle", which is true of the+ graph and useless to whoever wrote ``<mimic joint="itself">``. The shared rules have a+ ``self`` kind; the URDF renderer now has the sentence for it."""+ text = RIB.replace('<mimic joint="runner_slide" multiplier="4" offset="0"/>',+ '<mimic joint="rib_a_hinge" multiplier="1" offset="0"/>')+ with pytest.raises(UrdfError, match="names itself"):+ _robot(tmp_path, text)