nx_segstore_uncap_gate.nx
buildroot/runtime/nx_segstore_uncap_gate.nx
about
nx_segstore_uncap_gate.nx -- ISOLATED proof that the seg_store legacy-cap class is EATEN at the organ:
(1) ss_next_segid = canonical UNCAPPED writer segid (max+1) -- no clobber past the legacy cap;
(2) ss_manifest_dyn sees the WHOLE store while legacy ss_manifest stays byte-identical (capped) --
the discriminating pair proving old callers keep exact behavior (API contract stability);
(3) the ss_scan_seglist version WINDOW slides (oldest out, latest kept): a high-churn key (every
registry's __idx__ gains one version per put) now reads back its LATEST version past the window --
pre-fix ss_get returned the stale FIRST-window version (this is the "writes claim-OK but don't
surface" symptom class);
(4) ss_compact with a FRESH segid folds the >cap store to ONE segment with nothing lost.
Fresh /tmp store (never a shared registry). Runner must clean /tmp/ssuncap first. Exit 0 only on all-PASS.
license_tier: ORIGINAL expect_exit: 0
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_seg_store.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 15 | const GATE_N: i64 = 300 // commits to drive -- chosen ABOVE the legacy cap so the tail exercises it |
| 16 | const GATE_LEGACY_CAP: i64 = 256 // the legacy ss_manifest cap (must STILL cap -- byte-identical old API) |
| 17 | const GATE_SEG_SLOTS: i64 = 260 // legacy caller buffer sizing convention (slots) |
| 18 | const GATE_CHECKS: i64 = 9 // number of PASS conditions below |
| 19 | const KEY_CH: i64 = 107 // 'k' record-key prefix |
| 20 | const VAL_CH: i64 = 118 // 'v' record-value prefix |
| 21 | const HOTV_CH: i64 = 104 // 'h' hot-key value prefix |
| 22 | const ASCII_0: i64 = 48 |
| 23 | const DIR_MODE: i64 = 0x1ed // 0755 |
functions
| 25 | func g_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 26 | func g_putn(v: i64) -> i64 |
| 36 | func g_id(buf: *u8, c: i64, i: i64) -> i64 |
| 47 | func g_get_eq(prefix: *u8, key: *u8, want: *u8, wlen: i64) -> i64 |
| 57 | func g_check(name: *u8, ok: i64, pass: *i64) -> i64 |
| 63 | func main(argc: i64, argv: *i64) -> i64 |