code wiki / (root) / nx_campaign_verify.nx

nx_campaign_verify.nx

buildroot/runtime/nx_campaign_verify.nx

17214 B374 linesdepth 5pulls 6 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_campaign_verify.nx -- DID THAT CAMPAIGN ACTUALLY DO WHAT IT CLAIMED, FOR EVERY ROW? WHY IT EXISTS, and it is a defect I committed today rather than one I read about. On 2026-08-07 I ran two convergence campaigns (139 files, then 228) and "verified" them like this: - byte identity: checked ALL rows -> honest - import resolution: checked THE FIRST 40 OF 228, reported "ALL IMPORTS RESOLVE" - surplus-line clusters: read the TOP 22 of 1,119 distinct lines, called it the distribution Every one of those numbers was true about the sample and asserted about the population. The operator named it exactly: "sample size bullshit ... full ecosystem scope". => ★★★★★★A VERIFICATION THAT DOES NOT PRINT ITS DENOMINATOR IS A SAMPLE WEARING A PROOF'S CLOTHES. => ★★★★★★A CHECK I HAVE TO REMEMBER TO RUN IN FULL IS A CHECK THAT WILL BE RUN IN PART. The estate already banked why: A CAPABILITY OFFERED AS ADVICE IS ADOPTED AT ADVICE RATES; THE SAME CAPABILITY PLACED IN THE PATH IS ADOPTED AT 100%. So this is an ORGAN the campaign CALLS, not a discipline the operator maintains. WHAT IT PROVES, over the WHOLE adopted list, never a prefix: 1. EVERY adopted row is byte-identical to the source it was adopted from (the adopt really landed) 2. EVERY import edge in EVERY adopted file resolves in the TARGET tree (the tree stays coherent) and it prints checked/total for both, so a shortfall is visible rather than inferable. !!IT REFUSES AN EMPTY OR UNREADABLE LIST. A gate that reports "0 of 0 failed, GREEN" on a list it could not open is the absence-tooth defect the estate has already paid for twice: A TOOTH THAT ASSERTS AN ABSENCE PASSES LOUDEST WHEN NOTHING RAN AT ALL. rows==0 is RED, not GREEN. !!IT IS A VERIFIER, NOT A GATE, AND THE NAME NOW SAYS SO. /api/ship REFUSED the first version under D001: "this gate rolls its own verdict instead of inheriting nx_gate_verdict, so nothing can read its outcome -- nx_gate_green cannot judge it and it records no harness.jrnl frame, so flake and erosion stay invisible for it." There is an allow_own_verdict=yes escape hatch and taking it would have been exempting my own gate from the convention it exists to enforce. The deeper error was the NAME: gates here are no-arg and sweep-run, and a thing that takes a population in argv is a tool. => ★★★★★★THE CONVENTION-ENFORCING MECHANISM CAUGHT THE CONVENTION-ENFORCING TOOL. A GUARD YOU EXEMPT YOURSELF FROM IS NOT A GUARD, IT IS A PREFERENCE. => ★★★★★NAMING A TOOL `*_gate` MAKES A CLAIM ABOUT HOW IT IS RUN AND JUDGED -- MEET THE CLAIM OR CHANGE THE NAME. Verdict + journalling are inherited from nx_gate_verdict (gv_check / gv_verdict), so nx_gate_green can judge this like anything else and each run leaves a harness.jrnl frame. Exit: gv_verdict's rc (0 GREEN, 1 RED) | 2 usage | 3 IO. DIALECT: plain-if, <=6 params, consts above use, mmap'd static POINTERS (a BSS static array crashes the module at startup -- banked gotcha). license_tier: ORIGINAL expect_exit: 0 No hw writes (Rule 26).

dependencies 3 imports · 0 importers

nx_gate_verdict.nx nx_syscalls.nx nx_sha256.nx nx_campaign_verify.nx

imports: nx_gate_verdict.nxnx_syscalls.nxnx_sha256.nx

imported by: nobody (leaf or entry point)

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

main 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 ↻ cg_puts sys_write ↻ sys_exit ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_munmap sys_close cg_join cg_hash sys_mmap ↻ sys_read_file ↻ sys_munmap ↻ sha256_digest sys_mmap ↻ sha256_init sys_mmap ↻ sha256_seed_allocated sha256_k sha256_update sha256_compress_ni_blocks blk_set_byte

structs

none

consts

45const CG_LINE: i64 = 4096
46const CG_PATH: i64 = 8192
47const CG_LIST: i64 = 8388608 // adopted list; 8MB holds ~100k rows
48const CG_FILE: i64 = 16777216 // one source file
49const CG_NUM: i64 = 64
50const CG_LF: i64 = 10
51const CG_CR: i64 = 13
52const CG_SP: i64 = 32
53const CG_TAB: i64 = 9
54const CG_QUOTE: i64 = 34
55const CG_SLASH: i64 = 47
56const CG_EMPTY_RESERVE: i64 = 4096 // sys_read_file reserves this for an empty file; free exactly it

functions

68func cg_puts(s: *u8) -> i64
74func cg_putn(v: i64) -> i64
called by 1: main calls 2: sys_writecg_puts
85func cg_join(root: *u8, rel: *u8, out: *u8) -> i64
called by 1: main
95func cg_join_dir(path: *u8, name: *u8, out: *u8) -> i64
112func cg_hash(path: *u8, out: *u8) -> i64
123func cg_eq32(a: *u8, b: *u8) -> i64
called by 1: main
128func cg_exists(p: *u8) -> i64
153func cg_try(dir: *u8, sub: *u8, imp: *u8) -> i64
called by 1: cg_resolve calls 1: cg_exists
171func cg_resolve(fpath: *u8, imp: *u8, troot: *u8) -> i64
called by 1: cg_check_imports calls 1: cg_try
199func cg_check_imports(fpath: *u8, troot: *u8) -> i64
271func main(argc: i64, argv: *i64) -> i64