nx_store_janitor_gate.nx
buildroot/runtime/nx_store_janitor_gate.nx
about
nx_store_janitor_gate.nx -- THE JANITOR GATE: the seg-store's most destructive standing beat (it moves
files nobody can reach, on every plane, every beat) had NO gate. Born 2026-08-18 from two live incidents
in two days: nx_store_janitor swept a segment being BORN (files land before the manifest line, id above the
manifest max), then its race repair restored only the .docs -- comparewatch-seg-1786828803 (08-16/17) and
debt-seg-1787064612 (08-18) both read as "lossy load"/SHORTFALL to every reader, and one seat's debt row was
overwritten during the hand repair. Subject: ./nx_store_janitor.elf (argv[1] overrides the path so a STAGED
build can be bitten before promote). Fixture assembled at RUNTIME under /tmp/janitor_gate/ (a detector that
scans source would find its own fixture) and rebuilt from scratch on every run (idempotent by construction).
Teeth, each printed with its values: superseded segment moved (the sweep still sweeps -- the anti-vacuity
tooth), birth in flight left alone, live segment untouched, heal restores EVERY sidecar, heal never clobbers a
live file, empty manifest REFUSES and touches nothing. RED against the pre-08-18 binary by construction (it
moves the birth and knows no heal verb); GREEN only when both fixes are in the forked binary.
license_tier: ORIGINAL No hw writes (Rule 26).
dependencies 2 imports · 0 importers
imports: nx_gate_verdict.nxnx_tool_run.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
| 17 | const JG_OUT: i64 = 65536 |
| 18 | const JG_PATH: i64 = 512 |
| 19 | const JG_STAT: i64 = 256 |
| 20 | const JG_STAT_SIZE_OFF: i64 = 48 |
| 21 | const JG_AV: i64 = 64 |
| 22 | const JG_I64: i64 = 8 |
| 23 | const JG_EXIT_REFUSED: i64 = 3 // nx_store_janitor's own REFUSED exit code (its header contract) |
functions
| 27 | func jg_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 28 | func jg_cat(d: *u8, o: i64, s: *u8) -> i64 { var i: i64 = 0; var p: i64 = o; while s[i] != (0 as u8) { d[p] = s[i]; p = p + 1; i = i + 1 } return p } |
| 30 | func jg_size(path: *u8) -> i64 |
| 38 | func jg_exists(path: *u8) -> i64 { if jg_size(path) >= 0 { return 1 } return 0 } |
| 39 | func jg_w(path: *u8, content: *u8) -> i64 |
| 47 | func jg_has(hay: *u8, hn: i64, needle: *u8) -> i64 |
| 61 | func jg_live(dst: *u8, pfx: *u8, id: *u8, ext: *u8) -> i64 |
| 69 | func jg_retired(dst: *u8, ret: *u8, id: *u8, ext: *u8) -> i64 |
| 78 | func jg_count4(pfx: *u8, ret: *u8, id: *u8, loc: i64) -> i64 |
| 96 | func jg_clear(pfx: *u8, ret: *u8, id: *u8) -> i64 |
| 113 | func jg_make4(pfx: *u8, ret: *u8, id: *u8, loc: i64, body: *u8) -> i64 |
| 130 | func jg_run(elf: *u8, pfx: *u8, verb: *u8, out: *u8, olen: *i64) -> i64 |
| 142 | func main(argc: i64, argv: *i64) -> i64 |