| … | … | @@ -3144,6 +3144,24 @@ injected per layer: |
| 3144 | 3144 | - **R1:** `hc::rt`, both the real libuv runtime and the virtual one. Gate: Bare probe scripts |
| 3145 | 3145 | (microtask vs timer vs immediate vs I/O vs uncaught ordering, as in the 2026-10-04 probe) |
| 3146 | 3146 | must give the same trace on `rt`. |
| 3147 | - **R1 DONE 2026-10-04** (keetd 45bb1a1 + 2 gate commits). `hc::rt`: the Real (libuv) and |
| 3148 | Virtual runtimes behind one API. |
| 3149 | - **Gate `tools/rt/rt-gate.sh`:** 14 op scripts; Bare 1.28 vs rt real AND virtual, identical |
| 3150 | traces, stable over 5 runs. |
| 3151 | - **Drill `r1`: 12/13 red, 1 equivalent:** the virtual per-timer creation guard. The phase's |
| 3152 | due list is snapshotted first, so the guard matters only for a refresh to 0 ms mid-phase. |
| 3153 | - **Bare's rules, MEASURED:** |
| 3154 | - a throw in a callback is delivered after that callback's microtasks drain; |
| 3155 | - a microtask's throw is held to the end of the iteration (after the immediates); |
| 3156 | - an immediate queued in the check phase runs on the next iteration; |
| 3157 | - pending immediates run in the current iteration even if unreferenced, and Bare always |
| 3158 | runs the first iteration after the main script. |
| 3159 | - **TRAP:** libuv's `UV_RUN_ONCE` re-runs due timers after the check phase. The forced first |
| 3160 | iteration uses `UV_RUN_NOWAIT`. |
| 3161 | - **NOT ordered on Bare (measured 4/5 vs 1/5):** a 0 ms timer vs an immediate queued from an |
| 3162 | immediate. It races the clock's granularity, so gates must never compare it. |
| 3163 | - libuv 1.51.0 (keetd, via librocksdb) vs Bare's 1.52.0: one minor version apart. Align it |
| 3164 | when convenient. |
| 3147 | 3165 | - **R2:** ss onto `rt` (`ss::Loop` and `ss::Timers` removed). The secret-stream trace and |
| 3148 | 3166 | interop gates are unchanged. |
| 3149 | 3167 | - **R3:** mux / replicator / Core onto `rt` (Clock, `onsettimeout`, `Host::defer`, |