design-b D3: docs — doc 19 FIXED, and the plan re-scoped around that

Doc 19: status DIAGNOSED+PINNED RED -> FIXED, with the mechanism and the
explicit note that waits still park in place; the cure was to stop
parking on a COROUTINE stack, not to stop parking.

Doc 20: D3 work log (layering table, gate numbers) and a status that no
longer claims a phase queue. The bug that motivated the whole core
rewrite is closed WITHOUT contexts, so D2/D4/D5/D6 have lost their
forcing function and must be re-justified rather than continued by
default — including the honest option of deleting D1's unused context
layer.

Trap recorded: detection must capture the main stack's bounds at
top-level DoRun, not query them live — finishContextSwitch resets the
limits to the incoming fiber's, so a live query reports "main stack"
from everywhere and detects nothing.

Gate: kicad 139 passed / 1 failed (pre-existing occ-probe glb); wx +
asyncify + coroutine 394 passed / 1 failed (pre-existing
environment-sensitive modal:125). coroutine-nested — the battery D2
regressed — is green.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TEHGiiXMShNXbBr7gSJ7iz
This commit is contained in:
Gergő Törcsvári 2026-08-06 12:39:50 +02:00
commit cc7c1d1f16
No known key found for this signature in database
GPG key ID: 8E75F2CDE64E5322
2 changed files with 63 additions and 7 deletions

View file

@ -1,6 +1,20 @@
# 19 — Symbol Properties dialog hangs: a stranded tool fiber (live investigation)
> **Status: DIAGNOSED + PINNED RED, NOT FIXED (2026-08-05).** Reproduced end-to-end in a
> **Status: FIXED (2026-08-06).** The nested (quasi-modal) event loop no longer parks on
> the tool coroutine's stack: `wxGUIEventLoop::DoRun` detects that its park would land on a
> non-main stack and bounces it onto the main stack via the host runner
> (`wx/wasm/private/mainstack.h` + `wasm/bindings/main_stack_runner.h` →
> `TOOL_MANAGER::RunOnMainStackIfActiveTool`). The coroutine is then suspended the
> legitimate way — a fiber swap the layer records — so §4's quarantine never applies and
> its resume is never refused. `tests/kicad/quasimodal-strand.spec.ts` is a plain green
> regression pin: 3/3 `closed=true dialogs=0 refused-resumes=0`.
>
> Note what this does NOT do: waits still park in place (§6 direction 3 — handler contexts —
> is untaken). The cure was to stop parking on a *coroutine* stack, not to stop parking.
>
> Original diagnosis follows.
>
> ~~**Status: DIAGNOSED + PINNED RED, NOT FIXED (2026-08-05).**~~ Reproduced end-to-end in a
> real browser against the dev platform on the scheduler build, and since D0 also
> **deterministically in e2e**: `tests/kicad/quasimodal-strand.spec.ts` (6/6 identical —
> `closed=false dialogs=1 refused-resumes=1`). The fix lands at doc 20 **D3**, where that