fw-04 step 01 — Derive the work loop
Goal
Reach a Fiber-shaped structure by needing it. Each step should feel forced by the previous one. Do not read React first.
Tasks
- Feel the problem. Render 10,000 nodes with your
fw-02recursive renderer. Measure the task length; compare with the 16.7 ms budget frombi-10. Observe the dropped frames. - Try to yield. Attempt to pause halfway through the recursive render and resume later. Discover you cannot — write down precisely which state you would need and where it lives.
- Make the stack explicit. Nodes with
child/sibling/returnpointers, walked with a loop. Note thatreturnis a parent pointer a recursive traversal never needs. - Now yield. Loop while work remains and time remains; otherwise schedule a continuation.
Choose your primitive using
bi-11— and justify why not microtasks. - Get spec stage 9 green: a 60 ms render with a 5 ms slice must span multiple continuations.
Done when
- The failed pause attempt documented, with the reason stated precisely
- Explicit work loop replacing recursion
- Stage 9 green, with a justified yield primitive