code wiki / _hdl_build / nx_capsweep_lib.nx

nx_capsweep_lib.nx

buildroot/runtime/_hdl_build/nx_capsweep_lib.nx

9819 B221 linesdepth 3pulls 3 transitivereach 2 importersview sourcekind library
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_wirecensus_lib.nx nx_capsweep_lib.nx nx_capsweep.nx nx_capsweep_gate.nx

imports: nx_syscalls.nxnx_wirecensus_lib.nx

imported by: nx_capsweep.nxnx_capsweep_gate.nx

structs

none

consts

23const CS_MAXU: i64 = 8192
24const CS_TAB: i64 = 9
25const CS_NL: i64 = 10
26const CS_HASH: i64 = 35
27const CS_DASH: i64 = 45
28const CS_SURF_FIELD: i64 = 7 // column index of first_surface in execsurface.tsv, read from its emitter
31const CS_S_NONE: i64 = 0
32const CS_S_CLOCK: i64 = 1
33const CS_S_CRON: i64 = 2
34const CS_S_DAEMON: i64 = 3
35const CS_S_ROSTER: i64 = 4
36const CS_S_ACTLOG: i64 = 5
37const CS_S_FORK: i64 = 6
38const CS_S_REF: i64 = 7
39const CS_S_UNKNOWN: i64 = 8
42const CS_B_SURFACE: i64 = 1
43const CS_B_REGISTERED: i64 = 2
44const CS_B_AUTHORISED: i64 = 4
45const CS_B_INVOKED: i64 = 8
197const CS_R_STALE_SPINE: i64 = 1
198const CS_R_SCAFFOLD: i64 = 2
199const CS_R_NO_ARTIFACT: i64 = 3

functions

52func cs_add(names: *u8, lens: *i64, cnt: i64, cap: i64, p: *u8, l: i64, trunc: *i64) -> i64
68func cs_field_end(buf: *u8, s: i64, lim: i64) -> i64
78func cs_field_start(buf: *u8, ls: i64, lim: i64, want: i64) -> i64
called by 2: maincs_parse_surface calls 1: cs_field_end
90func cs_surf_code(buf: *u8, s: i64, e: i64) -> i64
116func cs_parse_surface(buf: *u8, n: i64, names: *u8, lens: *i64, surf: *i64, cap: i64, trunc: *i64) -> i64
178func cs_stage_bits(has_surface: i64, reg: i64, auth: i64, inv: i64) -> i64
called by 2: mainmain
201func cs_residual_reason(elf_exists: i64, new_exists: i64) -> i64
called by 1: main
215func cs_partition_ok(units: i64, joined: i64, residual: i64) -> i64
called by 2: mainmain