code wiki / (root) / nx_importcensus.nx

nx_importcensus.nx

buildroot/runtime/nx_importcensus.nx

9533 B171 linesdepth 5pulls 5 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_importcensus.nx -- IMPORTER REACH PER SOURCE FILE, as a flat, stamped artifact (2026-08-23, compare CE2). WHY: about half of a /compare board's rows name a LIBRARY -- no top-level main(), no binary by design -- and for a library the adoption question is IMPORTER COUNT (nx_catalog's own verdict text), which nothing published per name. The import graph already exists: knowledge/store/ecograph_full, walked from buildroot/runtime by the nx_eco_graph_build pin and judged daily by nx_arch_board. It lives in a seg-store that costs a load to ask, and a board classifies ~40 rows per emit across ~70 domains per regen beat. ONE load here, one flat TSV for every consumer, is the syscalls-per-unit-of-output discipline (rule F). ROWS name<TAB>importers<TAB>importers_nonval<TAB>imports<TAB>first_nonval_importer importers direct fan-in Ca from the graph: every source that imports this one importers_nonval the same minus VALIDATION importers -- sources named *_gate.nx *_test.nx *_bench.nx *_demo.nx *_probe.nx *_smoke.nx *_kat.nx *_negtest.nx (the suffix taxonomy nx_eco_graph_honesty's histe() applies). A lib imported ONLY by its own gate is the BUILT+UNWIRED class (LN8 eqsat, measured 2026-08-23), and THAT is the number a board needs: a gate importing a lib proves the lib is tested, never that it is used. imports fan-out Ce (what this source imports), printed so a reader can tell a leaf from a hub first_nonval_importer one witness name (presence needs one witness), "-" when there is none LAST LINE (the canonical verdict row, anchored BY POSITION -- consumers read the last line, never grep): # asof=<epoch> store=<prefix> nodes=N edges=M rows=N has_nonval=A val_only=B orphan=C nonval_excludes=_gate,_test,_bench,_demo,_probe,_smoke,_kat,_negtest A + B + C == rows is the partition, printed by the organ and checked by its gate. FRESHNESS IS THE CONSUMER'S TO JUDGE from asof=; this organ never overwrites a good artifact with a bad one: an unreadable store writes NOTHING (exit 3), so a stale file stays visibly stale by its own stamp. usage: nx_importcensus [store-prefix] [out-path] defaults knowledge/store/ecograph_full knowledge/status/importers.tsv exit 0 written (tmp + fsync + rename: a reader never sees a half file) | 3 UNOBSERVABLE store | 4 write failed license_tier: ORIGINAL Read-only over the estate except its one artifact. No hw writes (Rule 26).

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_eco_graph.nx nx_importcensus.nx

imports: nx_syscalls.nxnx_eco_graph.nx

imported by: nobody (leaf or entry point)

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

main eg_load sys_mmap nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ sov_get_ints sys_mmap ↻ ss_get sys_mmap ↻ ss_scan sys_mmap ↻ ss_manifest_dyn ss_manifest_file_dyn ss_scan_seglist ss_len sys_mmap ↻ ss_cat ss_readall ss_r32 sov_get_copy sys_mmap ↻ ss_get ↻ ic_puts sys_write ↻ sys_exit ↻ ic_slen sys_mmap ↻ eg_ca

structs

none

consts

33const IC_DEC_MAX: i64 = 20 // digits of an i64 plus sign: the width of one rendered number
34const IC_ROW_FIXED: i64 = 4 + 3 * IC_DEC_MAX + 2 // tabs + three numbers + the "-" witness + newline
35const IC_TAIL_FIXED: i64 = 512 // the stamped last line: keys + six numbers + the suffix list
36const IC_NSUFFIX: i64 = 8

functions

38func ic_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
called by 1: main calls 1: sys_write
39func ic_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 2: ic_is_valmain
40func ic_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 }
called by 1: main
41func ic_catn(d: *u8, o: i64, v: i64) -> i64
called by 2: ic_putnmain calls 2: sys_mmapsys_munmap
54func ic_putn(v: i64) -> i64 { let b: *u8 = sys_mmap(IC_DEC_MAX + 4); let n: i64 = ic_catn(b, 0, v); sys_write(1, b, n); sys_munmap(b, IC_DEC_MAX + 4); return 0 }
57func ic_suffix(i: i64) -> *u8
called by 2: ic_is_valmain
68func ic_is_val(name: *u8) -> i64
called by 1: main calls 2: ic_slenic_suffix
84func ic_name(g: *EcoGraph, idx: i64) -> *u8 { return ((g.arena as i64) + g.node_off[idx]) as *u8 }
called by 1: main
86func main(argc: i64, argv: *i64) -> i64