code wiki / (root) / nx_provcensus_lib.nx

nx_provcensus_lib.nx

buildroot/runtime/nx_provcensus_lib.nx

12732 B296 linesdepth 0pulls 0 transitivereach 2 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_provcensus_lib.nx -- the classification and reconciliation half of the fleet provenance-drift census (2026-08-26). WHY THIS IS A SEPARATE FILE. The census program must fork nx_provcheck once per gate, and a gate that fork/execs a deployed elf CANNOT be mutation-proven: every mutant reads NOT-REACHED, so the harness reports the gate's own fault rather than the subject's. A lib compiled INTO the gate's build closure can be bitten. So all the judgement lives here and all the walking and forking lives in nx_provcensus.nx -- the split is what makes the load-bearing half provable. DELIBERATELY IMPORTS NOTHING. Every function here is pure byte arithmetic over a caller-supplied buffer: no syscalls, no allocation, no clock. That keeps it linkable from both the program (which pulls in nx_dir.nx via the syscalls.nx alias stub) and the gate (which pulls in nx_gate_verdict.nx via nx_syscalls.nx) with no chance of a duplicate-symbol collision between the two spellings. license_tier: ORIGINAL No hw writes (Rule 26).

dependencies 0 imports · 2 importers

nx_provcensus_lib.nx nx_provcensus.nx nx_provcensus_gate.nx

imports: none

imported by: nx_provcensus.nxnx_provcensus_gate.nx

structs

none

consts

22const PCX_CURRENT: i64 = 0
23const PCX_DRIFTED: i64 = 1
24const PCX_UNRECORDED: i64 = 2
25const PCX_NOSIDECAR: i64 = 3
26const PCX_UNREADABLE: i64 = 4
27const PCX_NBUCKET: i64 = 5
178const PCX_WS_SPACE: i64 = 32
179const PCX_WS_TAB: i64 = 9
180const PCX_WS_CR: i64 = 13
181const PCX_NL: i64 = 10
182const PCX_SEMI: i64 = 59
183const PCX_SLASH: i64 = 47

functions

29func pcx_bucket_name(b: i64) -> *u8
called by 2: mainmain
40func pcx_bucket_remedy(b: i64) -> *u8
called by 1: main
51func pcx_slen(s: *u8) -> i64
58func pcx_find(b: *u8, n: i64, s: *u8, start: i64) -> i64
called by 2: mainpcx_find_last calls 1: pcx_slen
82func pcx_find_last(b: *u8, n: i64, s: *u8) -> i64
called by 1: pcx_classify calls 1: pcx_find
99func pcx_at(b: *u8, n: i64, o: i64, s: *u8) -> i64
called by 1: pcx_classify calls 1: pcx_slen
115func pcx_classify(b: *u8, n: i64) -> i64
called by 2: mainmain calls 2: pcx_find_lastpcx_at
128func pcx_ends_with(name: *u8, name_len: i64, suffix: *u8) -> i64
called by 2: mainmain calls 1: pcx_slen
145func pcx_total(counts: *i64) -> i64
155func pcx_reconciles(counts: *i64, population: i64) -> i64
called by 1: main calls 1: pcx_total
185func pcx_is_ws(c: i64) -> i64
193func pcx_row_begin(b: *u8, s: i64, e: i64) -> i64
206func pcx_row_end(b: *u8, s: i64, e: i64) -> i64
216func pcx_basename_off(b: *u8, s: i64, e: i64) -> i64
called by 1: pcx_roster_has
228func pcx_span_eq(b: *u8, s: i64, e: i64, name: *u8) -> i64
called by 1: pcx_roster_has calls 1: pcx_slen
243func pcx_roster_has(b: *u8, n: i64, name: *u8) -> i64
275func pcx_roster_rows(b: *u8, n: i64) -> i64
called by 2: mainmain calls 2: pcx_row_beginpcx_row_end