nx_comparewatch_lib.nx
buildroot/runtime/nx_comparewatch_lib.nx
about
nx_comparewatch_lib.nx -- PURE parsers for the /compare watch-plane census (2026-08-29).
WHY THIS EXISTS. The question "how far is /compare from 100 percent?" had NO sovereign answer: the
only correct count ever taken (945 rows = 826 OPEN + 119 LANDED, 2026-08-29) was a HAND TALLY of a
fully-read plane dump, because no organ publishes an OPEN/LANDED count and nx_shelltool grep is
literal-substring only -- structurally unable to anchor on the status FIELD. That matters because at
least one LANDED row (legalpractice_of_import) carries the literal token "OPEN:" inside its label
prose, so any substring count is inflated by construction. ★A NUMBER THAT CAN ONLY BE PRODUCED BY A
HAND TALLY CANNOT RIDE A BEAT, CANNOT BE RATCHETED, AND IS RE-DERIVED FROM SCRATCH BY EVERY SEAT
THAT NEEDS IT.
LIB+PROGRAM SPLIT ON PURPOSE: everything here is a pure function of caller-owned buffers -- no
filesystem, no clock, no seg-store -- so nx_comparewatch_census_gate composes THESE EXACT functions
in-process on planted fixtures, and a mutation to any rule is reachable by the gate.
ROW GRAMMAR (the comparewatch- plane, written by nx_compare_regen):
id <TAB> domain <TAB> label <TAB> organ-path <TAB> symbol <TAB> status
STATUS IS THE LAST TAB-DELIMITED FIELD AND IS COMPARED EXACT-LENGTH: "OPEN" and "LANDED" only.
Any other final field is CW_OTHER -- an unrecognised status must NEVER fall into a known bucket,
because the bucket it lands in becomes the number somebody plans against. A row with no tab at all
is CW_MALFORMED, its own bucket for the same reason.
license_tier: ORIGINAL No hw writes (Rule 26).
dependencies 1 imports · 4 importers
imports: nx_syscalls.nx
imported by: nx_accept_lib.nxnx_comparewatch_census.nxnx_comparewatch_census_gate.nxnx_release_delta_lib.nx
structs
| none |
consts
| 25 | const CW_UNSET: i64 = 0 |
| 26 | const CW_OPEN: i64 = 1 |
| 27 | const CW_LANDED: i64 = 2 |
| 28 | const CW_OTHER: i64 = 3 |
| 29 | const CW_MALFORMED: i64 = 4 |
| 30 | const CW_TOMB: i64 = 5 |
| 33 | const CW_KEY_COUNT: i64 = 0 - 2 |
| 34 | const CW_KEY_FOREIGN: i64 = 0 - 1 |
| 36 | const CW_TABC: i64 = 9 |
| 37 | const CW_CR: i64 = 13 |
| 38 | const CW_NL: i64 = 10 |
functions
| 42 | func cw_lastfield(v: *u8, n: i64, out2: *i64) -> i64 called by 1: cw_status_code |
| 64 | func cw_field_eq(v: *u8, o: i64, l: i64, lit: *u8) -> i64 |
| 75 | func cw_status_code(v: *u8, n: i64) -> i64 |
| 84 | func cw_field(v: *u8, n: i64, want: i64, out2: *i64) -> i64 |
| 104 | func cw_key_idx(k: *u8, kl: i64) -> i64 |
| 123 | func cw_parse_count(v: *u8, n: i64) -> i64 |
| 144 | func cw_apply(stArr: *i64, domBuf: *u8, maxrows: i64, domw: i64, idx: i64, st: i64, d: *u8, dlen: i64) -> i64 |