Skip to content

Official Codebase of 3DCodeVerse

Python

articulated: a pose-render timeout inside the joint sweep is a WARN on the gate, not a failed run

gaoypeng0c3b1cb062dc
diff --git a/harness/codeverse/tracks/articulated_object.py b/harness/codeverse/tracks/articulated_object.py
index d0335f48..b427d9d7 100644
--- a/harness/codeverse/tracks/articulated_object.py
+++ b/harness/codeverse/tracks/articulated_object.py
@@ -23,6 +23,7 @@ from codeverse.contracts.artifacts import (
)
from codeverse.contracts.common import TRACK_INFO, Track
from codeverse.contracts.plan import ArticulatedPlan, Plan
+from codeverse.spatial.render import RenderError
from codeverse.tracks.common import RunContext
from codeverse.tracks.motion import MOTION_GATE
from codeverse.tracks.static_object import ObjectPipeline, StaticObjectTrack
@@ -126,10 +127,20 @@ def default_joint_sweep(ws: Workspace, plan: Plan | None, out_dir: Path) -> tupl
duration_ms=int((time.time() - t0) * 1000))
views: list[RenderView] = []
out_dir.mkdir(parents=True, exist_ok=True)
- for label, rs in joints.render_poses(robot, out_dir):
- if rs.views:
- v = rs.views[0]
- views.append(RenderView(name=f"pose_{label}", path=v.path, mode=v.mode, width=v.width, height=v.height))
+ try:
+ for label, rs in joints.render_poses(robot, out_dir):
+ if rs.views:
+ v = rs.views[0]
+ views.append(RenderView(name=f"pose_{label}", path=v.path, mode=v.mode, width=v.width, height=v.height))
+ except RenderError as e:
+ # The pose renders are the judge's evidence, not the gate's: the collision sweep
+ # above is already measured. A render timeout here (art_verify architect_lamp,
+ # 2026-08-26: 330 s in render_glb.mjs with three articulated runs sharing the
+ # browser) used to raise out of gates() and fail the run before its first round.
+ log.warning("pose renders failed; the sweep gate stands without a sheet: %s", e)
+ gate.findings.append(GateFinding(gate=SWEEP_GATE, severity=Severity.WARN, target="poses",
+ message=f"pose renders failed ({str(e)[:160]}); the judge sees no articulation sheet this round",
+ fix_hint="nothing to fix in the code: a render timeout under load"))
sheet = out_dir / joints.ARTICULATION_SHEET_NAME
if sheet.is_file():
views.insert(0, RenderView(name="articulation_sheet", path=str(sheet), mode="shaded"))
diff --git a/harness/tests/urdf_joints/test_sweep_degrade.py b/harness/tests/urdf_joints/test_sweep_degrade.py
new file mode 100644
index 00000000..cacd654b
--- /dev/null
+++ b/harness/tests/urdf_joints/test_sweep_degrade.py
@@ -0,0 +1,36 @@
+"""A pose-render timeout inside the joint sweep degrades to a WARN, it does not fail the run."""
+
+from __future__ import annotations
+
+from types import SimpleNamespace
+
+from codeverse.contracts.artifacts import Severity
+from codeverse.spatial.render import RenderError
+
+
+def test_pose_render_failure_keeps_the_measured_sweep(tmp_path, monkeypatch):
+ """art_verify architect_lamp, 2026-08-26: render_glb.mjs timed out after 330 s inside
+ render_poses with three articulated runs sharing the browser; gates() raised and the run
+ was recorded failed before its first round."""
+ import codeverse.tracks.articulated_object as art
+ from codeverse.spatial import joints
+
+ urdf = tmp_path / "src" / "robot.urdf"
+ urdf.parent.mkdir(parents=True)
+ urdf.write_text("<robot/>")
+ ws = SimpleNamespace(artifacts=tmp_path / "artifacts", src=tmp_path / "src")
+ monkeypatch.setattr(joints, "load_urdf", lambda u, meshes: "robot")
+ monkeypatch.setattr(joints, "pose_samples", lambda robot: [])
+ monkeypatch.setattr(joints, "sweep_collisions", lambda robot, poses: "report")
+ monkeypatch.setattr(joints, "sweep_findings", lambda report: [])
+
+ def boom(robot, out_dir):
+ raise RenderError("render_glb failed: node script render_glb.mjs timed out after 330s")
+ yield # pragma: no cover
+
+ monkeypatch.setattr(joints, "render_poses", boom)
+ gate, views = art.default_joint_sweep(ws, None, tmp_path / "poses")
+ assert gate.passed, "the measured sweep had no errors; a render timeout is not a collision"
+ assert views == []
+ warns = [f for f in gate.findings if f.severity == Severity.WARN]
+ assert warns and "pose renders failed" in warns[0].message