nx_provcensus.nx
buildroot/runtime/nx_provcensus.nx
about
nx_provcensus.nx -- THE FLEET PROVENANCE-DRIFT CENSUS (2026-08-26).
nx_organ_ship consults nx_provcheck so a gate is rebuilt when its import CLOSURE drifted even with no
import edge to notice. Two gates were caught DRIFTED by hand the day that shipped. NOBODY HAD MEASURED
THE FLEET, so nobody knew how many ships had already proved the wrong subject -- and a rate nobody has
measured is not a small number, it is an unknown one. This organ measures it.
POPULATION: every "<name>_gate.provenance" sidecar in the estate root -- exactly "the gates that have a
provenance record" -- enumerated from ONE directory via nx_dir_list rather than a tree walk. That is
deliberate and measured: nx_shelltool find AND glob both return matches=0 with corpus_complete=0 over
this root for sidecars that demonstrably exist (2026-08-26), because the walk exhausts its budget in
the subtrees before it reports the root's own files. A tree scanner cannot establish this population at
all, and only its coverage envelope stops the zero being published as absence.
PARTITION -- each bucket its own remedy, printed with the count, and the parts are SUMMED against the
population rather than assumed to agree:
CURRENT | DRIFTED | UNRECORDED | NOSIDECAR | UNREADABLE (+ SKIPPED-OVER-BUDGET, reconciled too)
NO-RECORD is reported BESIDE the partition, never inside it: it counts "<name>_gate.elf" at the root
with no sidecar at all. That is a different question with a different denominator, and folding it in
would silently break the reconciliation -- a bucket that overlaps a partition must be a separate axis.
Composes nx_provcheck per row instead of re-deriving CURRENT/DRIFTED, so there stays exactly ONE
definition of the verdict in the estate and this inherits every future fix to it. All judgement lives
in nx_provcensus_lib.nx so the gate can mutation-prove it in-process.
license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0
dependencies 3 imports · 0 importers
imports: nx_dir.nxnx_tool_run.nxnx_provcensus_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
| 33 | const PV_MAXENT: i64 = 262144 |
| 34 | const PV_ROWBYTES: i64 = 32 |
| 35 | const PV_ARENA: i64 = 16777216 |
| 36 | const PV_RESBYTES: i64 = 40 |
| 37 | const PV_CAP: i64 = 262144 |
| 38 | const PV_TMO: i64 = 90000 // per child, matching nx_provcheck's own child timeout |
| 39 | const PV_PATHMAX: i64 = 1024 |
| 40 | const PV_MAXCLASS: i64 = 16384 |
| 41 | const PV_COUNTS: i64 = 40 // PCX_NBUCKET slots of 8 |
| 42 | const PV_ARGVSLOTS: i64 = 64 |
| 43 | const PV_NUMSCRATCH: i64 = 32 |
| 44 | const PV_B10: i64 = 10 |
| 45 | const PV_ZERO: i64 = 48 |
| 46 | const PV_LENSLOT: i64 = 16 // one i64 out-parameter slot for sys_read_file's length |
| 51 | const PV_BUDGET_MS: i64 = 1200000 |
functions
| 53 | func pv_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 |
| 54 | func pv_num(v: i64) -> i64 called by 1: main |
| 64 | func pv_cat(d: *u8, o: i64, s: *u8) -> i64 { var p: i64 = o; var i: i64 = 0; while s[i] != (0 as u8) { d[p] = s[i]; p = p + 1; i = i + 1 } return p } called by 1: main |
| 66 | func main(argc: i64, argv: *i64) -> i64 |