Official Codebase of 3DCodeVerse
Python
placement gate: a stamped ring tolerates a 25 % size jitter — loop 24's 32 peaks at 15 % were still "identical pyramids stamped in a ring"
gaoypeng55cbb35b2c6d
diff --git a/harness/codeverse/spatial/scene_placement.py b/harness/codeverse/spatial/scene_placement.pyindex fc4dca57..5efaaee2 100644--- a/harness/codeverse/spatial/scene_placement.py+++ b/harness/codeverse/spatial/scene_placement.py@@ -311,7 +311,7 @@ RING_MIN_COPIES = 8RING_BACKDROP_FRAC = 0.6RING_RADIUS_CV_MAX = 0.08RING_GAP_CV_MAX = 0.25-RING_SIZE_CV_MAX = 0.05+RING_SIZE_CV_MAX = 0.25 # loop 24's ski station: 32 peaks, radius spread 0.8 %, SIZE spread 15 % — still "identical pyramids stamped in a ring" to the judgeBACKDROP_MIN_HEIGHT_M = 2.0@@ -462,7 +462,7 @@ def contract_findings(census: dict[str, Any] | None, plan: Any,and rcv <= RING_RADIUS_CV_MAX and gcv <= RING_GAP_CV_MAX and scv <= RING_SIZE_CV_MAX):where = f"{g.get('name', '?')}/{st.get('name', '?')}"out.append(_f(Severity.WARN,- f"{where}: {n} same-size copies stamped evenly on a {r:.0f} m ring round the world "+ f"{where}: {n} near-identical copies stamped evenly on a {r:.0f} m ring round the world "f"(radius spread {rcv:.0%}, spacing spread {gcv:.0%}, size spread {scv:.0%}) — a toy backdrop",target=str(g.get("name", "overall")), kind="stamped_ring", n=n, radius_m=r,radius_cv=rcv, gap_cv=gcv, size_cv=scv,diff --git a/harness/tests/scene_gates/test_placement.py b/harness/tests/scene_gates/test_placement.pyindex 694e38de..84d27a05 100644--- a/harness/tests/scene_gates/test_placement.py+++ b/harness/tests/scene_gates/test_placement.py@@ -335,8 +335,10 @@ def test_a_ring_of_identical_copies_round_the_world_is_warned_but_not_a_rotunda("placement": _table(_row("Lantern", h=0.6), _row("Bench", h=0.9), _row("BenchB", zone="House", h=0.9)),"groups": [{"name": "FarShore", "kind": "content", "stamps": [ring]}]}hits = [f for f in placement_gate_safe(census, plan=plan).findings if f.data.get("kind") == "stamped_ring"]- assert len(hits) == 1 and hits[0].severity == Severity.WARN and "FarShore/FarPeaks: 16 same-size copies" in hits[0].message+ assert len(hits) == 1 and hits[0].severity == Severity.WARN and "FarShore/FarPeaks: 16 near-identical copies" in hits[0].messageassert "36 m ring" in hits[0].message and "silhouettes" in hits[0].fix_hint+ census["groups"][0]["stamps"] = [dict(ring, size_cv=0.15)] # loop 24: a 15 % size jitter is still a stamp+ assert [f for f in placement_gate_safe(census, plan=plan).findings if f.data.get("kind") == "stamped_ring"]census["groups"][0]["stamps"] = [dict(ring, size_cv=0.3, radius_cv=0.2)] # varied: a real skylineassert not [f for f in placement_gate_safe(census, plan=plan).findings if f.data.get("kind") == "stamped_ring"]census["groups"][0]["stamps"] = [dict(ring, name="Column", n=12, radius_m=4.0)] # a rotunda: inside the content