pcbjam/scripts/common
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Gergő Törcsvári a8adfa9843
fix(asyncify): stale-fiber-rewind guard — layer 2, attribution-proof
v0.1.21 still trapped with ZERO jump-refused beacons: the fatal swap PASSED
the C++ swap_suspended guard. Mechanism (async/16 round 2): a fresh JS entry
executing while g_current_context still points at a parked fiber gets
attributed to that fiber — fiber_swap writes a fresh, valid-LOOKING foreign
suspension into the parked fiber's struct and re-marks the flag. The flag
lies; the resume rewinds garbage.

This guard tracks truth at the emscripten-fiber layer (handlesleep.js wraps
Fibers.finishContextSwitch):
- valid suspensions = real swap-outs (currData == oldFiber+20 when the
  trampoline runs), consumed on rewind;
- internally-parked = an entered slice that ended in a handleSleep park
  (currData set, no nextFiber) — quarantined until a GENUINE swap-out,
  where genuine means the fiber's pending sleep has resolved
  (__pendingSleepContexts), so a laundering write cannot lift it;
- entering a quarantined or suspension-less fiber is REFUSED
  ([wx-asyncify] fiber-resume-refused, ghost contract).

The ROOT context is exempt from quarantine and refusal: its rewound
continuation runs the whole main loop, whose routine yield park says nothing
about a fiber body — the first build of this guard quarantined main off that
signal and starved every coroutine return (19 collab e2e reds, empty
results). Root = the old side of the first switch ever.

.ci-cache-epoch 2→3: the wasm output cache key omits scripts/**.

Red/green: fiber-resume-park.spec.ts scenario 2 (laundered resume → exactly
one refusal beacon, both coroutines complete); full fiber-heavy sweep green
(21 passed).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019SE4o46Lnq3hF574FFq8x4
2026-08-01 10:05:27 +02:00
..
shims fix(asyncify): stale-fiber-rewind guard — layer 2, attribution-proof 2026-08-01 10:05:27 +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