OverviewFilesCommitsIssuesDocsReleasesPeers

keet-daemon commits / 3c3c18c

CPP-PORT-DESIGN: R4c-1 done (scaffold::Sync)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
3c3c18c1baf3de30c9bd62ab8bc68a109cd63684
by plankatron <fleeky@gmail.com> · 2026-10-06T20:05:18.000Z

Changed files (1) +14 -0

docs/CPP-PORT-DESIGN.md +14 -0
……@@ -3851,6 +3851,20 @@ injected per layer:
38513851 (OverlayStream `_onclose`). A deleted key is dropped.
38523852 - ScopeLock: a free `lock()` resolves 1 hop after the call. A queued one resolves 1 hop after
38533853 `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.
38543868- **Then 4e-4** (`createProtocolStream` / `replicate`): the first gate that composes the stack
38553869 is a COMPOSED trace against JS (secret-stream + protomux + replicator), now meaningful.
38563870