code wiki / _hdl_build / nx_capsweep_lib.nx
nx_capsweep_lib.nx
buildroot/runtime/_hdl_build/nx_capsweep_lib.nx
about
nx_capsweep_lib.nx -- CR1 of /compare/capregistry: THE WHOLE-REGISTRY LIFECYCLE JOIN.
THE DEFECT THIS CLOSES, MEASURED 2026-08-28 in a single session: three censuses of the SAME estate
returned three different denominators -- nx_wirecensus 2048 promoted artifacts, nx_execsurface 2418
organs, nx_artifactdrift 1295 registry rows. Every one of those partitions RECONCILES INTERNALLY and
every one is correct about its own subject, so NOTHING LOOKS WRONG -- and yet no reader can state how
many distinct units the estate has, because nothing joins them PER UNIT.
WHAT THIS IS NOT: a fourth census. It collects nothing and it walks no directory. It JOINS artifacts the
existing censuses have already written, so it cannot disagree with them about anything except the join.
If it ever grows a collector, that is the moment it becomes a rival ruler and stops being trustworthy.
COMPOSED, NEVER RE-IMPLEMENTED: wc_read, wc_read_tail, wc_parse_registered, wc_parse_authorised,
wc_parse_invoked, wc_has and wc_elflen all come from nx_wirecensus_lib. There is exactly ONE parser for
the allowlist, the consent ledger and the actlog in this estate, and it is not this file.
dependencies 2 imports · 2 importers
imports: nx_syscalls.nxnx_wirecensus_lib.nx
imported by: nx_capsweep.nxnx_capsweep_gate.nx
structs
| none |
consts
| 23 | const CS_MAXU: i64 = 8192 |
| 24 | const CS_TAB: i64 = 9 |
| 25 | const CS_NL: i64 = 10 |
| 26 | const CS_HASH: i64 = 35 |
| 27 | const CS_DASH: i64 = 45 |
| 28 | const CS_SURF_FIELD: i64 = 7 // column index of first_surface in execsurface.tsv, read from its emitter |
| 31 | const CS_S_NONE: i64 = 0 |
| 32 | const CS_S_CLOCK: i64 = 1 |
| 33 | const CS_S_CRON: i64 = 2 |
| 34 | const CS_S_DAEMON: i64 = 3 |
| 35 | const CS_S_ROSTER: i64 = 4 |
| 36 | const CS_S_ACTLOG: i64 = 5 |
| 37 | const CS_S_FORK: i64 = 6 |
| 38 | const CS_S_REF: i64 = 7 |
| 39 | const CS_S_UNKNOWN: i64 = 8 |
| 42 | const CS_B_SURFACE: i64 = 1 |
| 43 | const CS_B_REGISTERED: i64 = 2 |
| 44 | const CS_B_AUTHORISED: i64 = 4 |
| 45 | const CS_B_INVOKED: i64 = 8 |
| 197 | const CS_R_STALE_SPINE: i64 = 1 |
| 198 | const CS_R_SCAFFOLD: i64 = 2 |
| 199 | const CS_R_NO_ARTIFACT: i64 = 3 |
functions
| 52 | func cs_add(names: *u8, lens: *i64, cnt: i64, cap: i64, p: *u8, l: i64, trunc: *i64) -> i64 |
| 68 | func cs_field_end(buf: *u8, s: i64, lim: i64) -> i64 |
| 78 | func cs_field_start(buf: *u8, ls: i64, lim: i64, want: i64) -> i64 |
| 90 | func cs_surf_code(buf: *u8, s: i64, e: i64) -> i64 |
| 116 | func cs_parse_surface(buf: *u8, n: i64, names: *u8, lens: *i64, surf: *i64, cap: i64, trunc: *i64) -> i64 |
| 148 | func cs_footer_num(buf: *u8, n: i64, key: *u8) -> i64 |
| 178 | func cs_stage_bits(has_surface: i64, reg: i64, auth: i64, inv: i64) -> i64 |
| 201 | func cs_residual_reason(elf_exists: i64, new_exists: i64) -> i64 called by 1: main |
| 215 | func cs_partition_ok(units: i64, joined: i64, residual: i64) -> i64 |