Commit Graph

2 Commits

Author SHA1 Message Date
NiJingzhe 98bed08a20 fix(diagnostics): keep GL out of the evidence render thread; name failed renders
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.
2026-09-18 12:10:23 +08:00
NiJingzhe 56f433309b feat(errors): guidance contract fields + boolean-family failure diagnosis pilot
ErrorGuidance gains measurements / evidence / repair / inventory; every
measurement renders into the error text (text axiom), rendered evidence
images land next to the part-cache root and their paths appear in the
text. Legacy call sites emit byte-identical output while the new fields
are empty.

Boolean union/cut/intersect failures now classify at raise time:
disjoint operands report the exact min gap, closest points, closure
vector, and an operation-specific parameterized repair; edge/vertex/
tangent-only contact is distinguished from positive-volume overlap via
an intersection-volume probe. Evidence rendering is default-on for
failures (SCA_NO_DIAGNOSTIC_RENDER to disable); the test suite opts out
in conftest with dedicated render tests opting back in.

SimpleCADMessageError now keeps the display message separate from the
programmatic .message attribute (ArtifactValidationError str() had
drifted; 6 suite failures traced to match= assertions on it).

1825 passed, 5 skipped.
2026-09-12 03:54:52 +08:00