nx_memindex_budget_gate.nx
buildroot/runtime/nx_memindex_budget_gate.nx
about
nx_memindex_budget_gate.nx -- liar-killed GATE for the memindex TOTAL-size budget (the
remaining memindex-cap-treadmill rail feature). Forks the REAL built elf
(_build/nx_memindex_emit.sov.elf) against byte-exact fixtures and proves:
- budget split keeps the NEWEST entries in the md block, moves the OLDEST into the
overflow file's COINDEX-OVFL block (presence AND absence checks = neg-controls)
- NO-LOSS: every slug lands in exactly one of the two blocks
- both files fully re-derive -> IDEMPOTENT (second identical run byte-identical)
- FAIL-CLOSED: overflow file without markers is untouched AND nothing is evicted
(the md gets the FULL block -- no entry ever silently vanishes)
- the newest entry is NEVER evicted (budget=1 still keeps it live)
- 2-arg form = unbudgeted back-compat (full block, no overflow writes)
Fixture line sizes are chosen so budget=24 keeps exactly {e5,e6}: e6=14B + e5=8B = 22 <= 24,
+e4(8B)=30 > 24. usage: nx_memindex_budget_gate [emit_elf] Exit 0 only on 9/9.
license_tier: ORIGINAL expect_exit: 0
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_crashresume_census_core.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
| none |
functions
| 21 | 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 } |
| 22 | func g_putn(v: i64) -> i64 { nxi_out(v); return 0 } |
| 23 | func g_bool(name: *u8, got: i64, want: i64, passp: *i64) -> i64 |
| 28 | func g_write(path: *u8, s: *u8) -> i64 { let fd: i64 = sys_openat_wr(path, 420); if fd < 0 { return 0 - 1 } sys_write(fd, s, ccz_slen(s)); sys_close(fd); return 0 } |
| 29 | func g_has(hay: *u8, hn: i64, needle: *u8) -> i64 |
| 42 | func g_same(p: *u8, q: *u8, qn: i64) -> i64 |
| 51 | func g_fhas(p: *u8, needle: *u8) -> i64 |
| 59 | func g_run() -> i64 |
| 72 | func fixtures(md: *u8, ov: *u8) -> i64 |
| 78 | func main(argc: i64, argv: *i64) -> i64 |