code wiki / (root) / nx_explore_census.nx

nx_explore_census.nx

buildroot/runtime/nx_explore_census.nx

7576 B112 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_explore_census.nx -- THE NISHI EXPLORE TEAM: capability census + living map (operator 2026-06-23: "build a nishi explore team capability from the hardware rung up each rung to be s class exceed"). WHY THIS EXISTS (the dogfood): this session the third-party Explore *agent* hit a spend wall AND ripgrep-backed Glob TIMED OUT FOUR TIMES at 20s on this very tree. The sovereign explore capability is justified by DIRECT MEASUREMENT, not assertion -- the incumbents demonstrably fail here. This organ is the ladder's RUNG-0 keystone: it does NOT re-implement anything. It PROBES the real on-disk organs that already provide each explore rung and grades them HAVE/MISSING by reading the file for its DEFINING SYMBOL (so it cannot lie -- drop the symbol and the rung flips MISSING). It is SELF-GATING: baked neg-controls (a bogus-symbol liar-kill + an absent-file open-fail control) must hold or it exits RED. Composes nx_codegrep's proven read+substring idiom. license_tier: ORIGINAL THE LADDER (each rung: incumbent / sovereign exceed axis / proving organ): R0 WALK recursive fs-walk via getdents64 vs find/os.walk nx_dir.nx::nx_dir_list (JPL-bounded, verdict-sealed, no libc -- bounded where find recurses unbounded) R1 GLOB name/suffix match vs find -name nx_dir.nx::nx_dir_name_ends_with R2 GREP recursive content search vs ripgrep nx_codegrep.nx::cg_scan_dir (COMPLETES where rg TIMED OUT on runtime/ -- measured live, 4x this session) R3 INDEX durable inverted index + BM25 rank vs Sourcegraph nx_library_harvest_v2.nx::lh2_query R4 MAP query -> conclusion map (paths+role+hits+rank) = the EXPLORE-AGENT REPLACEMENT, the GAP R5 GROW self-discovers its own coverage gaps and grows the GAP HAVE rungs are proven on-disk; MISSING rungs are the HONEST backlog (the gap IS the roadmap). Build/run: ./_offc/nx_sov_build_run.elf nx_explore_census (run-exit=0 => map correct + neg-controls held)

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_itoa_lib.nx nx_explore_census.nx

imports: nx_syscalls.nxnx_itoa_lib.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main sys_mmap ec_puts sys_write ec_strlen ec_probe sys_openat_rd sys_read sys_close ec_find ec_strlen ↻ ec_verd ec_puts ↻ ec_putn nxi_out nxi_fd sys_mmap ↻ ccz_cat_num sys_write ↻ sys_munmap sys_exit

structs

none

consts

29const EC_FBUF: i64 = 4194304 // 4 MB per-probe read buffer (reused); every probed organ is far under this

functions

31func ec_strlen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 2: ec_putsec_probe
32func ec_puts(s: *u8) -> i64 { sys_write(1, s, ec_strlen(s)); return 0 }
called by 2: ec_verdmain calls 2: sys_writeec_strlen
37func ec_putn(v: i64) -> i64 { nxi_out(v); return 0 }
called by 1: main calls 1: nxi_out
40func ec_find(buf: *u8, lo: i64, hi: i64, pat: *u8, pl: i64) -> i64
called by 1: ec_probe
54func ec_probe(path: *u8, sym: *u8, fbuf: *u8) -> i64
63func ec_verd(have: i64) -> i64 { if have == 1 { ec_puts(" HAVE " as *u8) } else { ec_puts(" MISSING " as *u8) } return 0 }
called by 1: main calls 1: ec_puts
65func main() -> i64