Official Codebase of 3DCodeVerse
Python
scene_threejs: delete the untouched-env-skeleton lint rule — its placeholder palette left the starter at D71, so it has not been able to fire since
gaoypeng5910729b3318
diff --git a/harness/codeverse3d/languages/scene_threejs/__init__.py b/harness/codeverse3d/languages/scene_threejs/__init__.pyindex 8d79f9bf..ee6cf1c2 100644--- a/harness/codeverse3d/languages/scene_threejs/__init__.py+++ b/harness/codeverse3d/languages/scene_threejs/__init__.py@@ -100,16 +100,6 @@ def _check_imports(rel: str, text: str, ws: Workspace, path: Path) -> list[GateFreturn check_imports(text, path, ws.src, make_finding=make_finding)[0]-#: the env skeleton's own TODO line and its placeholder daylight palette. An env.js that-#: still carries them is a skeleton the env stage never rewrote — measured 2026-08-30 on the-#: SOTA battery: izakaya_night (both arms) and nyc_dusk shipped the untouched skeleton, so a-#: "cozy izakaya at NIGHT" rendered under 0xcfdcec sky over 0x4a5a2a ground and the run lost-#: on brief fidelity while every other gate passed. The plan was right and sat in the file's-#: own ENV PLAN header; nobody acted on it.-_ENV_SKELETON_TODO = "Rewrite the ground/sky/fog/sun below to match the plan"-_ENV_SKELETON_DEFAULTS = ("0xbcd7ff", "0xcfdcec")--def lint(ws: Workspace) -> GateReport:"""Run all static checks; passed iff no ERROR findings."""t0 = time.time()@@ -144,16 +134,6 @@ def lint(ws: Workspace) -> GateReport:if path.parent == ws.src / "zones" and not _BUILD_RE.search(text):findings.append(_f(Severity.ERROR, "zone module does not export build(ctx)", target=rel,hint="export function build(ctx) { const g = new THREE.Group(); g.name = 'ZoneName'; ...; return g; }"))- if path == ws.src / "env.js":- stale = [d for d in _ENV_SKELETON_DEFAULTS if d in text]- if _ENV_SKELETON_TODO in text and stale:- findings.append(_f(Severity.ERROR,- f"src/env.js is still the untouched skeleton (its TODO line and the "- f"placeholder daylight palette {', '.join(stale)} are both present)",- target=rel,- hint="the ENV PLAN header at the top of env.js states the sky, sun, fog and "- "ground this scene needs — write those colours and angles into buildEnv, "- "then delete the TODO line"))if path.parent == ws.src / "assets" and not _BUILD_ANY_RE.search(text):findings.append(_f(Severity.WARN, "asset module exports no build<Pascal>(THREE) factory", target=rel,hint="export function buildLamp(THREE) { ... return group; }"))diff --git a/harness/tests/scene_runtime/test_lint.py b/harness/tests/scene_runtime/test_lint.pyindex da0b07e4..f437684b 100644--- a/harness/tests/scene_runtime/test_lint.py+++ b/harness/tests/scene_runtime/test_lint.py@@ -82,33 +82,3 @@ def test_large_file_warning(ws):rep = lint(ws)assert any("large file" in m for _, m in _msgs(rep, Severity.WARN))--def test_an_untouched_env_skeleton_is_an_error(ws):- """The env stage shipping the skeleton back is invisible to every other gate: the file- parses, exports what it must, and renders — as a sunny day, whatever the brief asked for."""- (ws.src / "scene.js").write_text(- "import * as THREE from 'three';\n"- "export function createScene({ THREE, renderer, loaders }) { return { scene: new THREE.Scene(), cameras: [], update() {} }; }\n")- skeleton = (- "// ENV PLAN: night, moonlit, sky zenith 0x070b18\n"- "// Rewrite the ground/sky/fog/sun below to match the plan; keep buildEnv/heightAt exports.\n"- "import * as THREE from 'three';\n"- "export const SUN_AZIMUTH_DEG = 60;\n"- "export function heightAt(x, z) { return 0; }\n"- "export function buildEnv(ctx) {\n"- " ctx.scene.background = new THREE.Color(0xcfdcec);\n"- " ctx.scene.add(new THREE.HemisphereLight(0xbcd7ff, 0x4a5a2a, 0.9));\n"- " return { update(t, dt) {} };\n"- "}\n")- (ws.src / "env.js").write_text(skeleton)- rep = lint(ws)- assert not rep.passed- assert any("untouched skeleton" in m for _, m in _msgs(rep, Severity.ERROR))-- # the same file with the plan's own colours written in is clean again- (ws.src / "env.js").write_text(- skeleton.replace("// Rewrite the ground/sky/fog/sun below to match the plan; keep buildEnv/heightAt exports.\n", "")- .replace("0xcfdcec", "0x141a2e").replace("0xbcd7ff", "0x1c2b4a"))- rep = lint(ws)- assert not any("untouched skeleton" in m for _, m in _msgs(rep, Severity.ERROR)), _msgs(rep)-diff --git a/harness/tests/scene_runtime/test_skeleton.py b/harness/tests/scene_runtime/test_skeleton.pyindex 57e74f2a..f68fd274 100644--- a/harness/tests/scene_runtime/test_skeleton.py+++ b/harness/tests/scene_runtime/test_skeleton.py@@ -62,10 +62,7 @@ def test_plan_skeleton_writes_zone_and_asset_stubs_and_lints(ws):assert "GROUND_SIZE = 200" in env # 80 m span * 2.5assert (ws.public / "assets").is_dir()rep = lint(ws)- # a fresh skeleton IS an unwritten env.js, and lint says so on purpose (that check is- # what catches an env stage that never ran); everything else must already be legal.- other = [(f.target, f.message) for f in rep.errors if "untouched skeleton" not in f.message]- assert not other, other+ assert not rep.errors, [(f.target, f.message) for f in rep.errors]# ------------------------------------------------------- the effect library (D51)