Converting the symbol-library bridge from one EM_ASYNC_JS into
beginWait -> start -> wxWasmYieldUntil -> take_result made the app hang after
every library request: the KiCad suite went from 7 minutes to 1.2 HOURS, 111
passed with the rest timing out, and the log goes silent right after a lib
request - a parked context nobody resumes. Reverted; the tree keeps the
working EM_ASYNC_JS and no code from the attempt.
Recorded for the next attempt:
- The PRECONDITION it found (four lines, quoted in the doc, deliberately NOT
landed): wxWasmYieldUntil must not park a context whose wait is already
resolved, because resolveWait deletes the entry. The in-place form had no
such window; every bridge in this pattern re-opens it. It was not the hang,
but it has only ever existed in the broken build, so it lands WITH the
conversion it protects, not before.
- Three hypotheses in evidence order, cheapest first: the resolve never
reaching the registry (this is the first KiCad-side caller of the wait
registry - check Module["_wxWasmSchedResolveContextWait"] exists in the
KiCad link); the lib request running inside the chooser's modal where the
dispatch context is ALREADY parked on a nested wait (a context holds one
park); or the Asyncify instrumentation closure shifting when the
EM_ASYNC_JS left that translation unit.
- Process: gate a bridge conversion on a SINGLE spec, never the full suite.
This cost a 1.2-hour run to learn one bit.
Tree is unchanged from the last verified landing state (STAR_DISPATCH=0,
kicad 139 passed / 1 pre-existing occ-probe) - docs only.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LBjomQfKyRa3jBdeAKpmTw