98bed08a20
The evidence render ran on a daemon thread that imported VTK and, on non-macOS, executed in-process GL — a native crash there killed the whole process mid-test-suite (observed on CI), and under load the 15s budget turned into silently missing evidence. The screenshot pipeline now splits into prepare (validate + tessellate, main thread) and execute (render plan: in-process or crash-isolated worker subprocess). The diagnostic evidence channel prepares on the calling thread and always executes worker_isolated, so its daemon thread only ever orchestrates a subprocess. A render that cannot finish within its budget now reports a named 'render-unavailable' evidence entry instead of vanishing; the budget is tunable via SCA_DIAGNOSTIC_RENDER_BUDGET (tests: 60s, default: 15s). Also updates two addon tests to the 2.1.3 runtime-state contract: remove deletes three recorded locations (payload, skill, runtime dir) and effective_command takes runtime_dir.
14 lines
519 B
Python
14 lines
519 B
Python
"""Shared test configuration."""
|
|
|
|
from __future__ import annotations
|
|
|
|
import os
|
|
|
|
# Failure-path evidence rendering stays off for the suite at large: it is
|
|
# slow (VTK worker per render) and exercises nothing those tests assert.
|
|
# Dedicated evidence tests opt back in via monkeypatch.delenv. Their
|
|
# per-render budget scales with the slowest runner (cold CI workers), not
|
|
# with the agent-facing default.
|
|
os.environ.setdefault("SCA_NO_DIAGNOSTIC_RENDER", "1")
|
|
os.environ.setdefault("SCA_DIAGNOSTIC_RENDER_BUDGET", "60")
|