nx_libindex_gate.nx
buildroot/runtime/nx_libindex_gate.nx
about
nx_libindex_gate.nx -- GATE for the library discovery index (PG1, procgen.plan, 2026-08-24).
Composes nx_libindex_lib IN-PROCESS. There is no deployed binary to fork, so the mutation-tester defect
where the harness rebuilds the TEST but not the SUBJECT cannot arise here by construction.
FIXTURES LIVE IN /tmp/<gate>/, created by sys_mkdir at SETUP -- including the FIXTURE PLANE the build seeds,
so the gate never touches the production plane at knowledge/store/libindex-. Estate law, paid for twice:
a gate sharing scratch with a production plane reports on the FIXTURE rather than the code, and a teardown
does not run when a run crashes, so setup must be the thing that guarantees the clean state.
THE LOAD-BEARING TOOTH is finds-a-symbol-that-only-a-library-declares. Everything else here could pass on a
broken index; that one is the capability claim itself -- a symbol nx_capsearch was structurally unable to
return must be returnable from this plane, or this organ has not closed the gap it was built to close.
TWO NEG-CONTROLS AND AN ANTI-VACUITY TOOTH, because an index that swallowed every .nx file would satisfy
every positive assertion above while being exactly the wrong artifact.
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_gate_verdict.nxnx_libindex_lib.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
| 22 | const VLG_SCRATCH: i64 = 0x1ff // mkdir mode 0777, masked by umask -- matches nx_fs.fs_mkdir |
| 23 | const VLG_TERMS: i64 = 8 |
functions
| 25 | func vlg_dir() -> *u8 { return "/tmp/nx_libindex_gate" as *u8 } called by 1: main |
| 26 | func vlg_scratch() -> *u8 { return "/tmp/nx_libindex_gate/walk.scratch" as *u8 } called by 1: main |
| 27 | func vlg_plane() -> *u8 { return "/tmp/nx_libindex_gate/libindex-" as *u8 } called by 1: main |
| 28 | func vlg_one_scratch() -> *u8 { return "/tmp/nx_libindex_gate/oneroot.scratch" as *u8 } called by 1: main |
| 29 | func vlg_missing() -> *u8 { return "/tmp/nx_libindex_gate/no-such-plane-" as *u8 } called by 1: main |
| 32 | func vlg_term1(slot: *i64, s: *u8) -> i64 { slot[0] = s as i64; return 1 } called by 1: main |
| 34 | func main() -> i64 |