design-b D1: work log + audit note

Doc 20: D1 entry (star topology as the load-bearing decision, the
9-scenario gate, measured memory) and the §3 asset table flipped —
registry/park/resume/drain are no longer "stubs that throw".
Doc 21: what D1 built, plus the sizing instruction for D4 — take each
bridge's deep-park high-water from its own beacon; do NOT carry the
harness's ~34 B/frame figure (synthetic frames, three locals each = a
floor) and do not inherit libcontext's 512 K by default either.

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-05 21:42:58 +02:00
commit 41f3f35919
No known key found for this signature in database
GPG key ID: 8E75F2CDE64E5322
2 changed files with 51 additions and 4 deletions

View file

@ -77,6 +77,20 @@ Notes:
needs no cross-thread story. The raytracer interplay (K7) is confined to "main
thread yields while a worker boots" — unchanged by D1–D4.
## 2b. What D1 built (2026-08-05)
`wasm/sched/context.{h,cpp}` — the contexts every site in §1 will migrate onto, with a
**star** topology (contexts yield to the scheduler; only the scheduler resumes) rather
than libcontext's symmetric swap. That is what converts every "route" cell above from
"move the park" into "move the park onto a context whose state is recorded". Nothing in
§1 is wired to it yet: W1/W3 move at D3, the bridges at D4.
Sizing note for the D4 migration: contexts run 128 KB C stack + 128 KB asyncify buffer,
and the layer measures its own high-water use. The D1 harness's synthetic frames cost
~34 B each — a floor, not a production figure. **When each bridge in §1 moves at D4, take
its deep-park high-water from the beacon and size from that**; do not carry the harness
number, and do not inherit libcontext's 512 K by default either.
## 3. What D4's assertion must cover
"No `handleSleep` park happens inside a fiber" (doc 20 §6 D4) must trip on: W1/W3 if