nx_regfix_gate.nx
buildroot/runtime/nx_regfix_gate.nx
about
nx_regfix_gate.nx -- ISOLATED proof of the reg_put next-segid fix (registration persistence past
the seg-store's cap). Writes REG_TEST_N records to a FRESH /tmp store (never the shared toolreg):
with the OLD ss_manifest cap, records beyond it collide onto one segment and are LOST; with
reg_next_segid (uncapped max+1) ALL persist + read back. rule-11 clean: every threshold is a NAMED
const (no bare literals). Runner must clean /tmp/regfix first. Exit 0 only on all-PASS.
license_tier: ORIGINAL expect_exit: 0
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_registry.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
| 10 | const REG_TEST_N: i64 = 300 // records to write -- chosen ABOVE the old cap so the tail exercises it |
| 11 | const OLD_MANIFEST_CAP: i64 = 256 // the seg-store cap this fix eliminates (documented in nx_seg_store) |
| 12 | const KEY_CH: i64 = 107 // ASCII 'k' (id prefix) |
| 13 | const VAL_CH: i64 = 118 // ASCII 'v' (value prefix) |
| 14 | const ASCII_0: i64 = 48 |
| 15 | const DIR_MODE: i64 = 0x1ed // 0755 |
| 16 | const GATE_CHECKS: i64 = 3 // number of PASS conditions below (all must be GREEN) |
functions
| 18 | 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 } |
| 19 | func g_putn(v: i64) -> i64 |
| 29 | func g_id(buf: *u8, c: i64, i: i64) -> i64 |
| 40 | func main(argc: i64, argv: *i64) -> i64 |