| … | … | @@ -3851,6 +3851,20 @@ injected per layer: |
| 3851 | 3851 | (OverlayStream `_onclose`). A deleted key is dropped. |
| 3852 | 3852 | - ScopeLock: a free `lock()` resolves 1 hop after the call. A queued one resolves 1 hop after |
| 3853 | 3853 | `unlock()`. |
| 3854 | - **R4c-1 DONE 2026-10-06** (keetd 1aa266a): `rt::scaffold::Sync`, as designed above. |
| 3855 | - rt holds a stack of scopes. While one is open, `queueMicrotask`, `complete` and |
| 3856 | `rejectedWithNoHandler` go to the innermost scope. `handlerAdded` searches every level. `run`, |
| 3857 | `runOnce` and `runFor` refuse to run inside a scope. |
| 3858 | - `hc/scaffold.h`: `wait(p)` marks `p` handled, then checkpoints, checks whether `p` settled, |
| 3859 | and runs one completion pass, or throws `NoProgress` when there is nothing left to deliver. |
| 3860 | The destructor runs the scope to quiescence. |
| 3861 | - Gate `r4c_scaffold` (rt real + virtual): 20/20 cases. The cases: outer microtasks and |
| 3862 | earlier completions never run inside; chains of completions; no progress; a rejection |
| 3863 | rethrown and never reported; an unhandled rejection reported at the scope's checkpoint; an |
| 3864 | outer rejection handled inside; nesting; destructor quiescence; the loop guard. |
| 3865 | - Drill r4c1: 8/8 red. |
| 3866 | - Four older anchors (r1, r4a, r4b2) were re-anchored onto the scoped queues and re-run red. |
| 3867 | - ctest 85/85. |
| 3854 | 3868 | - **Then 4e-4** (`createProtocolStream` / `replicate`): the first gate that composes the stack |
| 3855 | 3869 | is a COMPOSED trace against JS (secret-stream + protomux + replicator), now meaningful. |
| 3856 | 3870 | |