pcbjam/scripts/common
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Gergő Törcsvári 9ca2ac1e52
fix(asyncify): layer 3 — serialize root re-entry out of sleep-wake windows + flight recorder
v0.1.22 still trapped with BOTH guards silent: the fatal rewind's target is
the ROOT context, which layer 2 exempted. All four prod stacks are the same
collision — a fiber completes its yield-back to main while main's sleep-wake
rewind is still on the stack (maybeStopUnwind → trampoline →
finishContextSwitch → doRewind(root) → unreachable), two "resume main" paths
interleaved in one tick; the 8ms-earlier "index out of bounds" is the wake
side of the same event.

Root entry is legal and constant in healthy flow; only the wake-window
overlap is fatal. So: serialize, don't refuse. The shim marks the
synchronous wake window (Asyncify.__inSleepWake around wakeUp) and DEFERS a
root finishContextSwitch landing inside it by one macrotask
([wx-asyncify] root-entry-deferred beacon, trampoline retry) — an ordering
change only, nothing dropped. Suspension recording happens before the
deferral branch, so the yielding fiber's validity survives the wake chain
nulling currData.

Plus a flight recorder: a 96-entry ring of asyncify/fiber events (sleeps,
wakes, every context switch with ROOT/wake-depth, refusals, deferrals),
silent in normal operation, auto-dumped with full machine state next to the
first trap signature in the console; window.__wxAsyncifyDump() on demand.
The next prod export reads like a black box, not a stack-shape puzzle.

.ci-cache-epoch 3→4 (wasm cache key omits scripts/**).

Local: fiber-resume-park 2/2 (one refusal beacon), timer-park 1/1, sweep 20
passed, web fatal+follow 2/2.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019SE4o46Lnq3hF574FFq8x4
2026-08-01 14:06:53 +02:00
..
shims fix(asyncify): layer 3 — serialize root re-entry out of sleep-wake windows + flight recorder 2026-08-01 14:06:53 +02:00
apply-asyncify.sh eeschema simulator: lazy ngspice_service worker — static sharedspice (XSPICE registry + CIDER), init_dll ifdef, e2e both engines 2026-07-19 15:59:21 +02:00
apply-finalize.sh fix(wasm-eh): build wasm-emscripten-finalize from the Binaryen submodule (unbreak CI) 2026-06-30 11:55:52 +02:00
asyncify-imports.txt feat(wasm-eh): migrate the WASM build to native wasm exceptions (+ 3D viewer default-on) 2026-06-30 09:40:26 +02:00
asyncify-removelist.txt eeschema simulator: lazy ngspice_service worker — static sharedspice (XSPICE registry + CIDER), init_dll ifdef, e2e both engines 2026-07-19 15:59:21 +02:00
env.sh feat(wasm-eh): migrate the WASM build to native wasm exceptions (+ 3D viewer default-on) 2026-06-30 09:40:26 +02:00
functions.sh perf(build): 4h05m -> 1h15m full CI build — docker caps, pipelined wasm-opt, Binaryen 130 2026-06-11 07:48:46 +02:00
get-wasm-opt.sh fix(build): host postprocess silently no-ops when emsdk tools are stubbed 2026-06-11 13:25:02 +02:00
inject-dyncall-shims.sh feat(wasm-eh): migrate the WASM build to native wasm exceptions (+ 3D viewer default-on) 2026-06-30 09:40:26 +02:00
logging.sh chore: 🤖 add build monitor 2026-06-01 17:37:00 +02:00
patch-env-shim.mjs fix(trace): make ?trace= work by merging Module.ENV in the glue 2026-07-01 11:01:10 +02:00
stages.sh ci: fix stale build-wxuniversal-wasm.sh reference after rename 2026-06-13 19:50:23 +02:00
versions.sh eeschema simulator: lazy ngspice_service worker — static sharedspice (XSPICE registry + CIDER), init_dll ifdef, e2e both engines 2026-07-19 15:59:21 +02:00