pcbjam/tests/asyncify
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Gergő Törcsvári 6e80827cec
design-b D3 prep: pin fiber-on-context nesting and the foreign-stack refusal
Two scenarios, deliberately separate because they answer different
questions that D3 depends on:

- fiber_nests_in_context: can a libcontext-style fiber run nested inside
  a scheduler context at all? YES. Worth pinning explicitly — an earlier
  version of this scenario trapped `unreachable` and briefly looked like
  proof that nesting was impossible, which would have been a serious
  wrong turn for the plan. The real cause was the test's own bug: the
  host-side emscripten_fiber_t was zero-initialised, so the swap unwound
  into a null asyncify buffer. Nesting works; the scenario now proves it.
- foreign_stack_refused: a yield from that nested fiber is REFUSED, and
  the host context and scheduler both survive it.

The spec asserts foreignStackRefusals == 1, so the refusal path cannot
silently stop being exercised.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TEHGiiXMShNXbBr7gSJ7iz
2026-08-10 10:14:16 +02:00
..
asyncify-races-scheduler.spec.ts design-b D-1b: delete the legacy handlesleep runtime from the injector 2026-08-10 10:14:14 +02:00
asyncify-races.spec.ts design-b D-1 gate: battery green scheduler-only; startModal import scrub + work log 2026-08-10 10:14:15 +02:00
sched-context.spec.ts design-b D3 prep: pin fiber-on-context nesting and the foreign-stack refusal 2026-08-10 10:14:16 +02:00