pcbjam/tests/kicad/utils
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Istvan Matejcsok 3de00bb15b findings(E-1,E-2,E-3,E-4): occ-service generations/watchdogs/messageerror + abortable model prefetch
Adapted from codex/asyncify-execution-owner-core 3753320 (scheduler-free on
that branch already; one comment line re-worded for the JSPI line):

- E-1: generation-slotted WorkerSlot with a 2-min boot watchdog (armed before
  resolveWasmBase, so a hung delivery lookup expires too) and a 30-min
  per-request response watchdog; retireWorker() is the single idempotent
  funnel (fail that generation's pendings, terminate, revoke the worker Blob
  URL, clear timers/listeners).
- E-2: worker.onerror is wired for the worker's whole life and settles every
  in-flight STEP/export request; a synchronous postMessage throw settles its
  request without leaking the pending id; late frames from a retired
  generation are inert.
- E-3: worker.onmessageerror retires the generation like error does.
- E-4: collectBoardModelFiles is a pure source/IDB/network path (no editor
  MEMFS round-trip) taking an AbortSignal checked at every loop head;
  prefetchBoardModels races it against a 30 s deadline — timeout is non-fatal
  (export proceeds without models) and late results are inert.

Tests: occ-service.test.ts (7, ported) — boot/response watchdog expiry,
crash-settles-all, bootError retry, decode-fault retirement (invokes the real
onmessageerror transition, per J-4), hung-prefetch export; models-bridge.test.ts
+3 — abort inertness, zero FS access on the collect path. e2e harness twin
updated to the same generation shape (adds __occServiceTestHooks/failDecode).
False-green audited: 19 cases fail with the fixes reverted.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-31 18:18:02 +02:00
..
board-ready.ts tests: load-pcb e2e for microwave + pic_programmer demos 2026-05-29 09:51:18 +02:00
fs-inject.ts bench: JSPI vs asyncify A/B — harness + results 2026-08-14 11:53:06 +02:00
ngspice-service.ts jspi: fix the dead-tools ownership bug, emscripten-6 fallout, and green the full suite on Playwright 1.62 2026-08-13 17:41:28 +02:00
occ-service.ts findings(E-1,E-2,E-3,E-4): occ-service generations/watchdogs/messageerror + abortable model prefetch 2026-08-31 18:18:02 +02:00
pcbnew-ready.ts test(determinism): deterministic waits + stableShot screenshots; drop blind sleeps/ifs/retries 2026-07-07 10:50:24 +02:00
perf-utils.ts build+perf: wasm-opt the shipped wasm, and measure real frames in CI 2026-08-22 12:53:00 +02:00
screenshot-compare.ts tests: dark-mode spec diffs against a per-engine light-mode reference 2026-08-28 23:24:20 +02:00
threed-viewer.ts test(determinism): deterministic waits + stableShot screenshots; drop blind sleeps/ifs/retries 2026-07-07 10:50:24 +02:00
trio.ts tests(trio): settleConverged names the diverging tab + first differing line 2026-08-24 19:35:52 +02:00
wait-beacons.ts jspi cleanup: remove the asyncify-era residue — dead code, conditionals, pipeline scaffolding, stale prose 2026-08-14 09:25:32 +02:00