nx_provcensus_lib.nx
buildroot/runtime/nx_provcensus_lib.nx
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
imports: none
imported by: nx_provcensus.nxnx_provcensus_gate.nx
structs
| none |
consts
| 22 | const PCX_CURRENT: i64 = 0 |
| 23 | const PCX_DRIFTED: i64 = 1 |
| 24 | const PCX_UNRECORDED: i64 = 2 |
| 25 | const PCX_NOSIDECAR: i64 = 3 |
| 26 | const PCX_UNREADABLE: i64 = 4 |
| 27 | const PCX_NBUCKET: i64 = 5 |
| 178 | const PCX_WS_SPACE: i64 = 32 |
| 179 | const PCX_WS_TAB: i64 = 9 |
| 180 | const PCX_WS_CR: i64 = 13 |
| 181 | const PCX_NL: i64 = 10 |
| 182 | const PCX_SEMI: i64 = 59 |
| 183 | const PCX_SLASH: i64 = 47 |
functions
| 29 | func pcx_bucket_name(b: i64) -> *u8 |
| 40 | func pcx_bucket_remedy(b: i64) -> *u8 called by 1: main |
| 51 | func pcx_slen(s: *u8) -> i64 |
| 58 | func pcx_find(b: *u8, n: i64, s: *u8, start: i64) -> i64 |
| 82 | func pcx_find_last(b: *u8, n: i64, s: *u8) -> i64 |
| 99 | func pcx_at(b: *u8, n: i64, o: i64, s: *u8) -> i64 |
| 115 | func pcx_classify(b: *u8, n: i64) -> i64 |
| 128 | func pcx_ends_with(name: *u8, name_len: i64, suffix: *u8) -> i64 |
| 145 | func pcx_total(counts: *i64) -> i64 |
| 155 | func pcx_reconciles(counts: *i64, population: i64) -> i64 |
| 185 | func pcx_is_ws(c: i64) -> i64 |
| 193 | func pcx_row_begin(b: *u8, s: i64, e: i64) -> i64 |
| 206 | func pcx_row_end(b: *u8, s: i64, e: i64) -> i64 |
| 216 | func pcx_basename_off(b: *u8, s: i64, e: i64) -> i64 called by 1: pcx_roster_has |
| 228 | func pcx_span_eq(b: *u8, s: i64, e: i64, name: *u8) -> i64 |
| 243 | func pcx_roster_has(b: *u8, n: i64, name: *u8) -> i64 |
| 275 | func pcx_roster_rows(b: *u8, n: i64) -> i64 |