Skip to content

Official Codebase of 3DCodeVerse

Python

plan: normalisations is harness-only — a planner that writes prose into it (articulated_v2 scissor_mirror) no longer reads as a harness repair

gaoypeng58f322f9ffaf
diff --git a/harness/codeverse/contracts/plan.py b/harness/codeverse/contracts/plan.py
index 1d8bda3d..16ff6d8d 100644
--- a/harness/codeverse/contracts/plan.py
+++ b/harness/codeverse/contracts/plan.py
@@ -238,7 +238,10 @@ class ArticulatedPlan(StaticPlan):
data = dict(data)
parts = [dict(p) for p in (data.get("parts") or []) if isinstance(p, dict)]
joints = [dict(j) for j in (data.get("joints") or []) if isinstance(j, dict)]
- notes: list[str] = list(data.get("normalisations") or [])
+ # harness-only: the planner is told to leave this empty, and one did not (articulated_v2
+ # scissor_mirror, 2026-08-26: two lines of design prose landed here) — a planner's text
+ # would read as a harness repair in the record, so incoming values are dropped
+ notes: list[str] = []
if not parts or not joints:
return data
by_name = {to_snake(str(p.get("name", ""))): p for p in parts}
diff --git a/harness/tests/core/test_plan_normalise.py b/harness/tests/core/test_plan_normalise.py
index 39ae34b6..07f62219 100644
--- a/harness/tests/core/test_plan_normalise.py
+++ b/harness/tests/core/test_plan_normalise.py
@@ -122,3 +122,14 @@ def test_unfixable_plans_still_fail():
"axis": [0, 0, 1], "pivot": [0, 0, 0]})
with pytest.raises(ValidationError, match="unknown link"):
ArticulatedPlan.model_validate(d)
+
+
+def test_planner_text_in_normalisations_is_dropped():
+ """articulated_v2 scissor_mirror (2026-08-26): the planner wrote two lines of design prose into
+ the harness-only field; they must not read as harness repairs in the record."""
+ from codeverse.contracts.plan import ArticulatedPlan
+
+ raw = ArticulatedPlan._normalise_raw({"parts": [{"name": "A", "bbox": {"center": [0, 0, 0], "extents": [1, 1, 1]}}],
+ "joints": [{"name": "j", "parent": "A", "child": "A", "type": "revolute", "lower": 0, "upper": 1}],
+ "normalisations": ["rest pose set to 0.15 m (planner prose)"]})
+ assert raw["normalisations"] == []