SIGN IN SIGN UP

feat: bound whole-file validation in a worker so a stalled check returns is_valid null (#186)

The mesh layer already ran under a budget, but the other layers and the
file reload had none: a native check that stalled on a large imported part
hung 'agentcad run' past the caller's limit with no report at all.

Written files of 1 MB or more (run's exported STEP, import's source) now
validate in a worker process under AGENTCAD_VALIDATION_TIMEOUT_S (default
120 s; 0 disables). The worker streams each finished layer back; when the
budget expires the parent kills it and assembles a report that keeps every
finished layer, marks the running layer 'timeout', leaves the rest
'skipped', and sets is_valid to null with undetermined_layer and
timed_out_layer. A gating failure proven before the timeout still yields
is_valid false. A worker crash is an 'error' layer, never a pass. Small
files validate in-process as before.

run saves the version on a null verdict, as it already did for a mesh
timeout, and the warning names the budget and the variable to raise.
Worker processes now receive the parent's agentcad package location on
PYTHONPATH so they import the same code regardless of working directory.

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
J
James Edward Dillard committed
7317e2e9495f894733ce409802abd38401e2edc7
Parent: 2a79732
Committed by GitHub <noreply@github.com> on 9/17/2026, 9:28:54 AM