code wiki / (root) / nx_comparewatch_lib.nx

nx_comparewatch_lib.nx

buildroot/runtime/nx_comparewatch_lib.nx

6472 B154 linesdepth 2pulls 2 transitivereach 212 importersview sourcekind library
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_comparewatch_lib.nx nx_accept_lib.nx nx_comparewatch_census.nx nx_comparewatch_census_gate.nx nx_release_delta_lib.nx

imports: nx_syscalls.nx

imported by: nx_accept_lib.nxnx_comparewatch_census.nxnx_comparewatch_census_gate.nxnx_release_delta_lib.nx

structs

none

consts

25const CW_UNSET: i64 = 0
26const CW_OPEN: i64 = 1
27const CW_LANDED: i64 = 2
28const CW_OTHER: i64 = 3
29const CW_MALFORMED: i64 = 4
30const CW_TOMB: i64 = 5
33const CW_KEY_COUNT: i64 = 0 - 2
34const CW_KEY_FOREIGN: i64 = 0 - 1
36const CW_TABC: i64 = 9
37const CW_CR: i64 = 13
38const CW_NL: i64 = 10

functions

42func cw_lastfield(v: *u8, n: i64, out2: *i64) -> i64
called by 1: cw_status_code
64func cw_field_eq(v: *u8, o: i64, l: i64, lit: *u8) -> i64
75func cw_status_code(v: *u8, n: i64) -> i64
84func cw_field(v: *u8, n: i64, want: i64, out2: *i64) -> i64
104func cw_key_idx(k: *u8, kl: i64) -> i64
called by 3: al_nextmainmain
123func cw_parse_count(v: *u8, n: i64) -> i64
called by 2: mainmain
144func cw_apply(stArr: *i64, domBuf: *u8, maxrows: i64, domw: i64, idx: i64, st: i64, d: *u8, dlen: i64) -> i64
called by 2: mainmain