| … | … | @@ -3998,6 +3998,40 @@ injected per layer: |
| 3998 | 3998 | - **Drill r4c3b2: 10/11 red, 1 equivalent.** The equivalent is an unsigned header-length shift: |
| 3999 | 3999 | with bit 31 set, JS's negative length passes the bounds check and the decode throws (null), |
| 4000 | 4000 | while the unsigned one fails the bounds check (null). The state is untouched either way. |
| 4001 | - **R4c-3b-3 DONE 2026-10-06** (keetd 9bc081d): the store and the migrations. |
| 4002 | - **HypercoreStorage, in full.** Dependencies, snapshot, atomize, sessions (create / resume / |
| 4003 | atomic / delete), read / write, close, and the static export. |
| 4004 | - **CorestoreStorage.** |
| 4005 | - The scope-lock group commit: one shared View, flushed when the last op exits or past 128 |
| 4006 | changes; every op waits on that flush. |
| 4007 | - `_migrateStore` / `_migrateCore`, including the locked re-put. |
| 4008 | - `_maybeRecover(Later)`, `tmpFixStorage`, and the device file as rn's lock. |
| 4009 | - Every store op, including getInfoFromBatch's `.catch(noop)` and `await null`s, and the store |
| 4010 | streams. |
| 4011 | - **migrations/0 `store()`.** It reads legacy cores through CoreListStream. On any legacy core, |
| 4012 | 3.3.0 throws `head.allocated` (measured), and the port throws the same. |
| 4013 | - **migrations/0 `core()`.** TreeSlicer, BlockSlicer, allBits as JS has it, the byte-range helpers, |
| 4014 | `commitCoreMigration` and `runGC`. Its `readAll` retry SEGFAULTS Bare (measured); the port aborts |
| 4015 | there. |
| 4016 | - **migrations/1.** |
| 4017 | - **`js::allOf`:** Promise.all over mixed types, in Promise.all's shape. |
| 4018 | - **rn:** every parked completion goes through one `complete()` carrying `rn::testOnCompletion`. |
| 4019 | - **Gate `tools/st` (`r4c_st`): 9 scripts / 18 runs, identical traces and stores.** They cover: |
| 4020 | - every store op, and group commit with write-batch counts; |
| 4021 | - a core's reads / writes / snapshots / atoms / sessions / dependencies / export; |
| 4022 | - fresh, primary-key-only and hypercore-10 stores; |
| 4023 | - version-0 cores built with JS's own `store()`: flushed, unflushed, sparse, dropped, read-only, |
| 4024 | and empty without an oplog; |
| 4025 | - `hops`: every native completion rulered (rocksdb-native's binding callbacks, bare-fs, |
| 4026 | fs-native-extensions). |
| 4027 | - **Port bugs the gate found:** |
| 4028 | - iterators over temporary streams (3 places; they hung); |
| 4029 | - GC paths not normalized; |
| 4030 | - an extra derived promise in `_getInfos`, only visible with 20-tick rulers. |
| 4031 | - **Drill r4c3b3: 16/19 red, 3 equivalent:** |
| 4032 | - the `_preopen` hop and getInfoFromBatch's first `await null` both precede the first completion; |
| 4033 | - a version-0 head is never length 0. |
| 4034 | - ctest 89/89. |
| 4001 | 4035 | - **Then 4e-4** (`createProtocolStream` / `replicate`): the first gate that composes the stack |
| 4002 | 4036 | is a COMPOSED trace against JS (secret-stream + protomux + replicator), now meaningful. |
| 4003 | 4037 | |