Commit Graph

2 Commits

Author SHA1 Message Date
NiJingzhe eea43021ba fix(errors): cluster-correct disjoint diagnosis + bounded evidence render
Benchmarking the failure path surfaced two defects:

1. Nearest-disjoint-PAIR reporting misattributed failures: two operands
   not touching each other may still be transitively connected through
   a third, so the ring case reported an internal 2.29 mm pair instead
   of the real 7.8 mm hub-to-ring separation. Diagnosis now unions
   touching operands into clusters (gap <= tol) and reports the nearest
   inter-cluster pair; a single cluster that failed to fuse reports the
   touch-without-overlap pair as non-manifold contact. Beyond the pair
   probe cap it reports nothing rather than guess.

2. Evidence rendering was unbounded on the failure path: the render
   worker allows 180s x 6 attempts, and identical agent retries re-paid
   ~5s each. Diagnostic renders are now downgraded single-view, deduped
   per failure signature (same unmoved gap renders once per process),
   and abandoned after a 15s watchdog — the error always goes out
   immediately, measurements first (text axiom).

Failure-path costs after this: probes 4 ms (2 small solids) to 86 ms
(70-face plate) on top of the kernel's own failed attempt; evidence
render ~5 s once per distinct failure, ~15 ms on retries.
2026-09-12 04:02:44 +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