Skip to content

Official Codebase of 3DCodeVerse

Python

spatial: one probe_scene.mjs driver call, run_probe(compile=) — the build, the shader_probe tool and probe_scene stop keeping two copies of its argv and failure finding

gaoypengbba82993de87
diff --git a/harness/codeverse3d/languages/scene_threejs/__init__.py b/harness/codeverse3d/languages/scene_threejs/__init__.py
index e5b18e2a..8d79f9bf 100644
--- a/harness/codeverse3d/languages/scene_threejs/__init__.py
+++ b/harness/codeverse3d/languages/scene_threejs/__init__.py
@@ -10,7 +10,6 @@ from typing import Any
from pydantic import BaseModel, Field
-from codeverse3d.config import get_settings
from codeverse3d.contracts.artifacts import (
BuildResult,
GateFinding,
@@ -770,7 +769,9 @@ class SceneThreeJsRuntime:
# driver outputs (scene_probe.json / shader_preflight.json) looking current;
# census.json is only rewritten `if census:` below, so it MUST be wiped here
ws.stage_artifacts("census.json", "scene_probe.json", "shader_preflight.json", "build.json").invalidate()
- probe, shaders, census = probe_and_preflight(ws, timeout_s=timeout_s)
+ from codeverse3d.spatial.probes import run_probe
+
+ probe, shaders, census = run_probe(ws, compile=True, timeout_s=timeout_s)
if census:
(ws.artifacts / "census.json").write_text(json.dumps(census, indent=1))
gates_dir = ws.artifacts / "gates"
@@ -797,7 +798,7 @@ class SceneThreeJsRuntime:
census=census,
gates=[probe, shaders],
# a driver that could not run is not a defect in the scene; `probes.probe_report`
- # and `probe_and_preflight` already mark it, and `build_with_repair` reads this
+ # and `run_probe` already mark it, and `build_with_repair` reads this
# so the round does not spend its repair budget rewriting working code
harness_failure=bool(first is not None and first.data.get("harness_failure")),
)
@@ -805,50 +806,6 @@ class SceneThreeJsRuntime:
return res
-def probe_and_preflight(ws: Workspace, *, timeout_s: float | None = None) -> tuple[GateReport, GateReport, dict]:
- """One ``probe_scene.mjs --compile`` run → (scene_probe, shader_preflight, census): the
- build's two gates, and the ``shader_probe`` tool's verdict.
-
- The driver boots the scene once and runs both stages on the same page;
- when the scene never boots the preflight is skipped, matching the old
- two-call behaviour (a failed-empty shader gate). ``timeout_s`` defaults to
- the build timeout, capped at 120 s.
- """
- from codeverse3d.spatial.probes import PROBE_GATE, SHADER_GATE, probe_report, shader_report
- from codeverse3d.spatial.render_scene import SceneRenderError, probe_env_args, run_scene_script
-
- t0 = time.time()
- timeout_s = min(float(timeout_s or get_settings().limits.build_timeout_s), 120.0)
- args = [
- "--ws", str(ws.root), "--compile",
- "--out", str(ws.artifacts / "scene_probe.json"),
- "--shaders-out", str(ws.artifacts / "shader_preflight.json"),
- "--timeout-ms", str(int(timeout_s * 1000)),
- ]
- # the production build probes under the SAME settle / camera-repair / auto-exposure
- # policy every render uses (review-3 S4: it used to carry none of the flags, so the
- # build gate measured a census the renders then contradicted)
- args += probe_env_args()
- try:
- res = run_scene_script("probe_scene.mjs", args, timeout_s=timeout_s + 20)
- except SceneRenderError as e:
- dur = int((time.time() - t0) * 1000)
- finding = GateFinding(gate=PROBE_GATE, severity=Severity.ERROR, target="src/scene.js",
- message=f"scene probe could not run: {e}"[:1500],
- fix_hint="this is a harness/driver failure, not your code; retry or report",
- data={"harness_failure": True})
- return (GateReport(gate=PROBE_GATE, passed=False, findings=[finding], duration_ms=dur),
- GateReport(gate=SHADER_GATE, passed=False, findings=[]), {})
- dur = int((time.time() - t0) * 1000)
- probe, census = probe_report(res.summary, duration_ms=dur)
- rep = res.summary.get("shader_report") or {}
- if not rep or rep.get("skipped"):
- shaders = GateReport(gate=SHADER_GATE, passed=False, findings=[])
- else:
- shaders = shader_report(rep, duration_ms=int(rep.get("duration_ms") or 0))
- return probe, shaders, census
-
-
def _summary_text(probe: GateReport, shaders: GateReport) -> str:
lines = [f"scene_probe: {'ok' if probe.passed else 'FAILED'} ({len(probe.errors)} errors)"]
lines += [f" - {f.target or ''}: {f.message}"[:400] for f in probe.findings if f.severity != Severity.INFO][:12]
diff --git a/harness/codeverse3d/spatial/probes.py b/harness/codeverse3d/spatial/probes.py
index 3461b327..f0504dbb 100644
--- a/harness/codeverse3d/spatial/probes.py
+++ b/harness/codeverse3d/spatial/probes.py
@@ -1,10 +1,11 @@
"""Scene probes: the import/census gate and the shader-preflight report reader.
+* ``run_probe(ws, compile=)`` → (scene_probe, shader_preflight, census) — THE
+ ``probe_scene.mjs`` driver call; ``compile=True`` (the scene build and the
+ ``shader_probe`` tool) adds the shader preflight to the same boot
* ``probe_scene(ws)`` → (GateReport 'scene_probe', census) — the standalone probe
(the ``scene_probe`` tool, ``check_placement(rebuild=true)``)
-* ``probe_report`` / ``shader_report`` — the two gates, pure over the driver JSON; the
- scene build (``languages.scene_threejs.probe_and_preflight``: one
- ``probe_scene.mjs --compile`` boot) and the ``shader_probe`` tool read both through them.
+* ``probe_report`` / ``shader_report`` — the two gates, pure over the driver JSON.
"""
from __future__ import annotations
@@ -15,6 +16,7 @@ from typing import Any
from pydantic import BaseModel, Field
+from codeverse3d.config import get_settings
from codeverse3d.contracts.artifacts import GateFinding, GateReport, Severity
from codeverse3d.conventions import MAX_TRIS_SCENE
from codeverse3d.spatial.render_scene import SceneRenderError, probe_env_args, run_scene_script
@@ -51,18 +53,16 @@ class SceneProbeResult(BaseModel):
yield self.census
-def _result(gate: GateReport, census: dict[str, Any], *, driver_failure: str = "") -> SceneProbeResult:
+def _result(gate: GateReport, census: dict[str, Any]) -> SceneProbeResult:
"""A ``harness_failure`` finding IS a driver failure, wherever it was raised.
``ok`` is "the tool could run" (``registry.Observation.failed = not ok``) and the
agent-facing ``findings`` deliberately exclude harness failures — so a report that
carries one and nothing else used to come back ok, with no errors and no findings: a
- probe that reads healthy and measured nothing. Deriving it here means every caller
- gets the rule, not only the one that remembers to pass ``driver_failure``."""
- harness = [f.message for f in gate.findings if f.data.get("harness_failure")]
+ probe that reads healthy and measured nothing."""
+ errors = [f.message[:800] for f in gate.findings if f.data.get("harness_failure")]
lines = [f"[{f.severity.value}] {f.target or ''}: {f.message}" for f in gate.findings
if f.severity != Severity.INFO and not f.data.get("harness_failure")]
- errors = [driver_failure] if driver_failure else harness
return SceneProbeResult(gate=gate, census=census, ok=not errors, errors=errors, findings=lines)
@@ -70,23 +70,40 @@ def _f(gate: str, sev: Severity, msg: str, *, target: str | None = None, hint: s
return GateFinding(gate=gate, severity=sev, target=target, message=msg, fix_hint=hint, data=data)
-def probe_scene(ws: Workspace, *, timeout_s: float = 60.0) -> SceneProbeResult:
- """Import-only probe: module loads, shape valid, cameras valid, update runs, census."""
+def run_probe(ws: Workspace, *, compile: bool = False, timeout_s: float | None = None,
+ ) -> tuple[GateReport, GateReport, dict[str, Any]]:
+ """One ``probe_scene.mjs`` boot → (scene_probe, shader_preflight, census).
+
+ ``compile`` also runs the shader preflight on the same page; without it — or when the
+ scene never boots — the preflight is a failed-empty gate. ``timeout_s`` defaults to
+ the build timeout, capped at 120 s. A driver that cannot run is a ``harness_failure``
+ finding, never a raise."""
t0 = time.time()
- gate = PROBE_GATE
- findings: list[GateFinding] = []
- census: dict[str, Any] = {}
- out_json = ws.artifacts / "scene_probe.json"
+ timeout_s = min(float(timeout_s or get_settings().limits.build_timeout_s), 120.0)
+ args = ["--ws", str(ws.root), "--out", str(ws.artifacts / "scene_probe.json"), "--timeout-ms", str(int(timeout_s * 1000))]
+ if compile:
+ args += ["--compile", "--shaders-out", str(ws.artifacts / "shader_preflight.json")]
+ # every probe runs under the SAME settle / camera-repair / auto-exposure policy every
+ # render uses — ONE parser, render_scene (review-3 S4: the build used to carry none of
+ # the flags, so its gate measured a census the renders then contradicted)
+ args += probe_env_args()
+ no_preflight = GateReport(gate=SHADER_GATE, passed=False, findings=[])
try:
- args = ["--ws", str(ws.root), "--out", str(out_json), "--timeout-ms", str(int(timeout_s * 1000))]
- args += probe_env_args() # settle / camera-repair / auto-exposure: ONE parser (render_scene)
res = run_scene_script("probe_scene.mjs", args, timeout_s=timeout_s + 20)
except SceneRenderError as e:
- findings.append(_f(gate, Severity.ERROR, f"scene probe could not run: {e}", target="src/scene.js",
- hint="this is a harness/driver failure, not your code; retry or report", harness_failure=True))
- return _result(GateReport(gate=gate, passed=False, findings=findings, duration_ms=int((time.time() - t0) * 1000)), census,
- driver_failure=f"scene probe could not run: {e}"[:800])
- report, census = probe_report(res.summary, duration_ms=int((time.time() - t0) * 1000))
+ finding = _f(PROBE_GATE, Severity.ERROR, f"scene probe could not run: {e}"[:1500], target="src/scene.js",
+ hint="this is a harness/driver failure, not your code; retry or report", harness_failure=True)
+ return GateReport(gate=PROBE_GATE, passed=False, findings=[finding], duration_ms=int((time.time() - t0) * 1000)), no_preflight, {}
+ probe, census = probe_report(res.summary, duration_ms=int((time.time() - t0) * 1000))
+ rep = res.summary.get("shader_report") or {}
+ if not compile or not rep or rep.get("skipped"):
+ return probe, no_preflight, census
+ return probe, shader_report(rep, duration_ms=int(rep.get("duration_ms") or 0)), census
+
+
+def probe_scene(ws: Workspace, *, timeout_s: float = 60.0) -> SceneProbeResult:
+ """Import-only probe: module loads, shape valid, cameras valid, update runs, census."""
+ report, _, census = run_probe(ws, timeout_s=timeout_s)
if census:
ws.artifacts.mkdir(parents=True, exist_ok=True)
(ws.artifacts / "census.json").write_text(json.dumps(census, indent=1))
diff --git a/harness/codeverse3d/spatial/tools.py b/harness/codeverse3d/spatial/tools.py
index d6e6407d..288eab1e 100644
--- a/harness/codeverse3d/spatial/tools.py
+++ b/harness/codeverse3d/spatial/tools.py
@@ -40,7 +40,7 @@ from codeverse3d.spatial.observe import (
text_observation,
truncate,
)
-from codeverse3d.spatial.probes import probe_scene
+from codeverse3d.spatial.probes import probe_scene, run_probe
from codeverse3d.spatial.registry import NoArgs, Observation, ToolContext, ToolUsageError, tool
from codeverse3d.spatial.render_scene import read_metrics, render_scene
from codeverse3d.spatial.scene_placement import placement_census as _placement_census
@@ -412,14 +412,12 @@ def joint_sweep(ctx: ToolContext, args: JointSweepArgs) -> Observation:
"line numbers — the build's own probe + preflight, so the verdict is the build's.",
languages=(Language.SCENE_THREEJS.value,), cost_hint="slow")
def shader_probe(ctx: ToolContext, args: NoArgs) -> Observation:
- """The build's own probe + shader preflight (``probe_and_preflight``: one ``probe_scene.mjs
+ """The build's own probe + shader preflight (``run_probe(compile=True)``: one ``probe_scene.mjs
--compile`` boot under the render policy). Until 2026-09-22 this ran a second driver,
check_shaders.mjs at 256x144 without the settle / camera-repair / exposure flags, whose
verdict could differ from the build's. A scene that never boots gets no preflight:
the probe's report says why."""
- from codeverse3d.languages.scene_threejs import probe_and_preflight
-
- probe, shaders, _census = probe_and_preflight(ctx.workspace)
+ probe, shaders, _census = run_probe(ctx.workspace, compile=True)
died = [f.message for f in probe.findings if f.data.get("harness_failure")]
if died:
return Observation.error(f"shader_probe: {died[0]}")
diff --git a/harness/docs/INTERFACES.md b/harness/docs/INTERFACES.md
index c9ad78b6..0d6379c5 100644
--- a/harness/docs/INTERFACES.md
+++ b/harness/docs/INTERFACES.md
@@ -261,7 +261,7 @@ BuildResult.error_type spellings (languages/_common.py): MISSING_ENTRY = "Missin
| `CadQueryRuntime` | `src/model.py` | trailing selector on the stack → parent solid exported + warning (ExportError when no solid exists); helper-module errors map to `src/<file>.py:line`; object.glb/stl/step |
| `ThreeJsRuntime` | `src/object.js`, `src/parts/*.js` | **Δ export as authored** (census `placement_offset`); InstancedMesh baked to `<Name>_<i>` meshes (`instanced_meshes_baked`); exported `selfcheck(THREE, root)` is called (throw → SelfCheckError); NaN geometry errors name mesh/part → routed to `src/parts/<snake>.js` |
| `UrdfBlenderRuntime` | `src/model.py`, `src/robot.urdf` | object.glb (Y-up, node=link, joint extras), meshes/<link>.glb (raw Z-up link frames); link name `world` is reserved (lint ERROR + UrdfError); robot GLB root gets `__root` suffix on name clash; the build collides the REST pose only (RestPenetration > 5 mm, D17) — every pose is the round's `joint_sweep` gate — and writes no articulation.json / census.articulation (Δ 2026-09-22) |
-| `SceneThreeJsRuntime` | `src/scene.js`, `src/zones/*.js`, `src/assets/*.js`, `src/env.js`, `src/shaders/*.js` | glb_path=None; ok iff `probe_and_preflight(ws, *, timeout_s=None) -> (scene_probe, shader_preflight, census)` (one `probe_scene.mjs --compile` boot) passes both; both reports ride `BuildResult.gates`, and the `shader_probe` tool reports the same call |
+| `SceneThreeJsRuntime` | `src/scene.js`, `src/zones/*.js`, `src/assets/*.js`, `src/env.js`, `src/shaders/*.js` | glb_path=None; ok iff `spatial.probes.run_probe(ws, *, compile=True, timeout_s=None) -> (scene_probe, shader_preflight, census)` (one `probe_scene.mjs --compile` boot; `probe_scene` is the same call without `compile`) passes both; both reports ride `BuildResult.gates`, and the `shader_probe` tool reports the same call |
| `GlslShaderRuntime` | `src/shader.frag`, `src/common.glsl`, `src/buffer_a.frag` (+ the harness-owned `src/recipes.glsl` when seeded) | harness owns `#version`/uniforms/`out` (wrap.HEADER: u_time/u_resolution/u_mouse/u_frame/u_prev/u_noise + iTime/iChannel* aliases); `wrap.compose(shader, common, recipes_src=…)` pastes header < recipes < common < shader; build renders judge frames via GlHost; compile errors → GlslCompileError at mapped src file:line (recipes.glsl included); lint ERROR `redefines_recipe` when an agent file defines a recipes.glsl name; artifacts frames/, frames_sheet.png, preview.gif, metrics.json |
| `OpenGLPythonRuntime` | `src/program.py`, `src/*.glsl` | `setup(ctx,w,h)->state` + `render(ctx,state,t,frame,fbo)` run in a moderngl subprocess (`wrappers/run_gl.py`); exceptions map to src/program.py:line, in-string GLSL errors carry both line numbers |
diff --git a/harness/tests/scene_runtime/test_probes.py b/harness/tests/scene_runtime/test_probes.py
index e72ee925..ad8c5422 100644
--- a/harness/tests/scene_runtime/test_probes.py
+++ b/harness/tests/scene_runtime/test_probes.py
@@ -5,8 +5,7 @@ from __future__ import annotations
import pytest
from codeverse3d.contracts.artifacts import Severity
-from codeverse3d.languages.scene_threejs import probe_and_preflight
-from codeverse3d.spatial.probes import probe_scene
+from codeverse3d.spatial.probes import probe_scene, run_probe
from tests.scene_runtime.conftest import needs_browser
pytestmark = [pytest.mark.node, needs_browser]
@@ -60,7 +59,7 @@ def test_probe_scene_catches_update_throw_and_console_errors(starter_ws):
def preflight(ws):
"""The shader_preflight report the build and the ``shader_probe`` tool both read."""
- return probe_and_preflight(ws)[1]
+ return run_probe(ws, compile=True)[1]
def test_the_shader_preflight_runs_raw(ws, tmp_path, monkeypatch):
@@ -197,8 +196,5 @@ def test_probe_result_tool_semantics(starter_ws, monkeypatch):
assert not res2.gate.passed and not res2.ok
assert res2.errors and "could not run" in res2.errors[0]
assert res2.gate.errors[0].data.get("harness_failure") is True
- import codeverse3d.spatial.render_scene as rs_mod
-
- monkeypatch.setattr(rs_mod, "run_scene_script", fake_run_crash) # the build's probe + preflight
- probe, shaders, _ = probe_and_preflight(starter_ws)
+ probe, shaders, _ = probes_mod.run_probe(starter_ws, compile=True) # the build's probe + preflight
assert probe.errors[0].data.get("harness_failure") is True and not shaders.passed and not shaders.findings
diff --git a/harness/tests/scene_runtime/test_render_scene.py b/harness/tests/scene_runtime/test_render_scene.py
index 2c30da14..6116cfe3 100644
--- a/harness/tests/scene_runtime/test_render_scene.py
+++ b/harness/tests/scene_runtime/test_render_scene.py
@@ -294,7 +294,6 @@ def test_every_driver_invocation_carries_the_env_flags(monkeypatch, switch, ws,
"""Review-3 S4 (V7c): the combined single-boot build probes under the SAME
settle / camera-repair / auto-exposure flags as the standalone probe and
render paths — it used to pass none of them."""
- import codeverse3d.languages.scene_threejs as st
import codeverse3d.spatial.probes as probes_mod
captured: dict[str, list[str]] = {}
@@ -311,7 +310,7 @@ def test_every_driver_invocation_carries_the_env_flags(monkeypatch, switch, ws,
# defaults: camera repair ON everywhere, settle on (no flag), exposure off
probes_mod.probe_scene(ws)
assert _flags(captured["probe_scene.mjs"]) == ["--camera-repair"]
- st.probe_and_preflight(ws, timeout_s=5.0)
+ probes_mod.run_probe(ws, compile=True, timeout_s=5.0)
assert _flags(captured["probe_scene.mjs"]) == ["--camera-repair"], "combined build lost the default-ON policy"
with pytest.raises(SceneRenderError):
render_scene(ws, tmp_path / "out_flags", cameras=[CameraPlan(name="c", position=(1, 2, 3), look_at=(0, 0, 0), fov=45)],
@@ -321,7 +320,7 @@ def test_every_driver_invocation_carries_the_env_flags(monkeypatch, switch, ws,
# the A/B words reach every path, including the combined build
switch("C3D_SETTLE", "0")
switch("C3D_CAMERA_REPAIR", "false")
- st.probe_and_preflight(ws, timeout_s=5.0)
+ probes_mod.run_probe(ws, compile=True, timeout_s=5.0)
assert _flags(captured["probe_scene.mjs"]) == ["--no-settle"]
probes_mod.probe_scene(ws)
assert _flags(captured["probe_scene.mjs"]) == ["--no-settle"]
diff --git a/harness/tests/scene_runtime/test_runtime.py b/harness/tests/scene_runtime/test_runtime.py
index 302f2d40..b9aec9bd 100644
--- a/harness/tests/scene_runtime/test_runtime.py
+++ b/harness/tests/scene_runtime/test_runtime.py
@@ -81,8 +81,8 @@ def test_build_interprets_combined_summary_offline(ws, monkeypatch):
], "warnings": [], "compile": {"ms": 3, "programs": 4, "custom_materials": 1}, "duration_ms": 9},
}, 5)
- import codeverse3d.spatial.render_scene as rs_mod
- monkeypatch.setattr(rs_mod, "run_scene_script", fake_run)
+ import codeverse3d.spatial.probes as probes_mod
+ monkeypatch.setattr(probes_mod, "run_scene_script", fake_run)
res = rt_mod.SceneThreeJsRuntime().build(ws)
assert len(calls) == 1 and calls[0][0] == "probe_scene.mjs" and "--compile" in calls[0]
assert not res.ok # shader gate failed
@@ -103,7 +103,7 @@ def test_build_interprets_combined_summary_offline(ws, monkeypatch):
"shader_report": {"ok": False, "skipped": "scene did not boot", "errors": [], "warnings": []},
}, 5)
- monkeypatch.setattr(rs_mod, "run_scene_script", fake_run_noboot)
+ monkeypatch.setattr(probes_mod, "run_scene_script", fake_run_noboot)
res2 = rt_mod.SceneThreeJsRuntime().build(ws)
assert not res2.ok
shaders2 = _json.loads((ws.artifacts / "gates" / "shader_preflight.json").read_text())
@@ -112,7 +112,7 @@ def test_build_interprets_combined_summary_offline(ws, monkeypatch):
def test_probe_crash_leaves_no_stale_probe_outputs(ws, monkeypatch):
"""A probe crash removes prior outputs and publishes a failed build."""
- import codeverse3d.spatial.render_scene as rs_mod
+ import codeverse3d.spatial.probes as probes_mod
from codeverse3d.spatial.render_scene import SceneRenderError
for name in ("census.json", "scene_probe.json", "shader_preflight.json"):
@@ -122,7 +122,7 @@ def test_probe_crash_leaves_no_stale_probe_outputs(ws, monkeypatch):
def crash(script, args, **kw):
raise SceneRenderError("chrome went away")
- monkeypatch.setattr(rs_mod, "run_scene_script", crash)
+ monkeypatch.setattr(probes_mod, "run_scene_script", crash)
res = SceneThreeJsRuntime().build(ws)
assert not res.ok
for name in ("census.json", "scene_probe.json", "shader_preflight.json"):
diff --git a/harness/tests/spatial_tools/test_tools.py b/harness/tests/spatial_tools/test_tools.py
index 630f2fdd..a3fea681 100644
--- a/harness/tests/spatial_tools/test_tools.py
+++ b/harness/tests/spatial_tools/test_tools.py
@@ -324,7 +324,6 @@ def test_render_sheet_and_isolate(stool_ctx: ToolContext, fake_renderer) -> None
def test_scene_tools_with_fake_siblings(stool_ctx: ToolContext, monkeypatch: pytest.MonkeyPatch) -> None:
- import codeverse3d.languages.scene_threejs as st
import codeverse3d.spatial.tools as ts
from codeverse3d.spatial.probes import SceneProbeResult
@@ -338,7 +337,7 @@ def test_scene_tools_with_fake_siblings(stool_ctx: ToolContext, monkeypatch: pyt
return SceneProbeResult(gate=failed, census={"meshes": 12, "lights": 2}, ok=True, findings=["[error] src/scene.js: console: boom"])
# shader_probe reports the BUILD's probe + preflight (one boot), never a driver of its own
- monkeypatch.setattr(st, "probe_and_preflight", lambda ws, **kw: (GateReport.of("scene_probe"), shaders, {}))
+ monkeypatch.setattr(ts, "run_probe", lambda ws, **kw: (GateReport.of("scene_probe"), shaders, {}))
monkeypatch.setattr(ts, "probe_scene", fake_probe_scene)
obs = get_tool("shader_probe").call(stool_ctx, {})
assert not obs.ok and not obs.failed and "vUv" in obs.text and "declare varying" in obs.text
@@ -347,13 +346,13 @@ def test_scene_tools_with_fake_siblings(stool_ctx: ToolContext, monkeypatch: pyt
skipped = GateReport(gate="shader_preflight", passed=False)
boot = GateReport.of("scene_probe", [GateFinding(gate="scene_probe", severity=Severity.ERROR, target="src/scene.js",
message="[import] SyntaxError: Unexpected token")])
- monkeypatch.setattr(st, "probe_and_preflight", lambda ws, **kw: (boot, skipped, {}))
+ monkeypatch.setattr(ts, "run_probe", lambda ws, **kw: (boot, skipped, {}))
obs = get_tool("shader_probe").call(stool_ctx, {})
assert not obs.ok and not obs.failed and "SyntaxError" in obs.text
# the driver died: the tool could not run
died = GateReport.of("scene_probe", [GateFinding(gate="scene_probe", severity=Severity.ERROR, target="src/scene.js",
message="scene probe could not run: timeout", data={"harness_failure": True})])
- monkeypatch.setattr(st, "probe_and_preflight", lambda ws, **kw: (died, skipped, {}))
+ monkeypatch.setattr(ts, "run_probe", lambda ws, **kw: (died, skipped, {}))
obs = get_tool("shader_probe").call(stool_ctx, {})
assert obs.failed and "could not run" in obs.text
obs = get_tool("scene_probe").call(stool_ctx, {})