code wiki / (root) / nx_swcompare_watch_gate.nx

nx_swcompare_watch_gate.nx

buildroot/runtime/nx_swcompare_watch_gate.nx

49679 B575 linesdepth 10pulls 53 transitivereach 0 importersview sourcekind gate/prooftopic swcompare
docsdependenciesstructsconstsfunctions

about

nx_swcompare_watch_gate.nx -- GATE for the ONE symbol ruler (nx_symdecl_lib) and the measured watch section every page kind now renders (nx_swcompare_lib watch_pass). 2026-08-23, lane L. What it proves: (a) the ruler counts a top-level DECLARATION and nothing else -- a comment, a call site, an indented line or a longer identifier sharing the prefix must NOT flip a cell (each such neg-control is paired with the OLD substring rule fired on the same fixture, so the fixture is proven to discriminate the two rulers); (b) watch_pass renders exactly the matrix's symbol rows with a partition that sums, and renders NOTHING for a domain without a .matrix; (c) over the REAL population (every regen.list domain that has a .matrix, from the nishihost cwd) it prints the rows whose verdict CHANGES under the declaration ruler -- the false-LANDED population the pages and the comparewatch plane had been publishing -- and asserts the census partition sums. Fixtures under /tmp/nx_swcompare_watch_gate_<pid>/ (data only; the NAS mounts /tmp noexec and nothing here is executed). In-process composition: no generator is forked. license_tier: ORIGINAL No hw writes (Rule 26).

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_gate_verdict.nx nx_swcompare_lib.nx nx_swcompare_watch_gate.nx

imports: nx_syscalls.nxnx_gate_verdict.nxnx_swcompare_lib.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main gv_head gv_puts sys_write gv_ctr sys_mmap nxa_die sys_write ↻ sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ streq sys_mmap ↻ wg_cat wg_catn sys_mmap ↻ wg_pid sys_mkdir wg_path sys_mmap ↻ wg_cat ↻ wg_write sys_openat_wr wg_slen sys_write ↻ sys_close gv_puts ↻

structs

none

consts

19const WG_PATH_MAX: i64 = 4096
20const WG_DIR_MODE: i64 = 0x1ed
21const WG_FILE_MODE: i64 = 0x1a4
22const WG_FIX_ROWS: i64 = 6 // symbol rows in the fixture matrix (the expected render count)

functions

24func wg_both(a: i64, b: i64) -> i64 { if a == 1 { if b == 1 { return 1 } } return 0 }
25func wg_pid() -> i64 { return __syscall(172, 0, 0, 0, 0, 0, 0) }
called by 1: main
26func wg_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
27func wg_cat(d: *u8, o: i64, s: *u8) -> i64 { var i: i64 = 0; var p: i64 = o; while s[i] != (0 as u8) { d[p] = s[i]; p = p + 1; i = i + 1 } d[p] = 0 as u8; return p }
28func wg_catn(d: *u8, o: i64, v: i64) -> i64
called by 1: main calls 1: sys_mmap
40func wg_path(base: *u8, leaf: *u8) -> *u8
called by 2: wg_graph_dumpmain calls 2: sys_mmapwg_cat
47func wg_write(path: *u8, s: *u8) -> i64
57func wg_count_in_file(path: *u8, needle: *u8) -> i64
74func wg_size(path: *u8) -> i64
83func wg_substring_file(path: *u8, sym: *u8) -> i64
93func wg_make_matrix(base: *u8, path: *u8) -> i64
112func wg_wl_row(verbose: i64, tally: *i64) -> i64
119func wg_graph_dump(base: *u8, leaf: *u8, p: *SgPlan) -> *u8
125func main(argc: i64, argv: *i64) -> i64