nx_campaign_verify.nx
buildroot/runtime/nx_campaign_verify.nx
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
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
structs
| none |
consts
| 45 | const CG_LINE: i64 = 4096 |
| 46 | const CG_PATH: i64 = 8192 |
| 47 | const CG_LIST: i64 = 8388608 // adopted list; 8MB holds ~100k rows |
| 48 | const CG_FILE: i64 = 16777216 // one source file |
| 49 | const CG_NUM: i64 = 64 |
| 50 | const CG_LF: i64 = 10 |
| 51 | const CG_CR: i64 = 13 |
| 52 | const CG_SP: i64 = 32 |
| 53 | const CG_TAB: i64 = 9 |
| 54 | const CG_QUOTE: i64 = 34 |
| 55 | const CG_SLASH: i64 = 47 |
| 56 | const CG_EMPTY_RESERVE: i64 = 4096 // sys_read_file reserves this for an empty file; free exactly it |
functions
| 68 | func cg_puts(s: *u8) -> i64 |
| 74 | func cg_putn(v: i64) -> i64 |
| 85 | func cg_join(root: *u8, rel: *u8, out: *u8) -> i64 called by 1: main |
| 95 | func cg_join_dir(path: *u8, name: *u8, out: *u8) -> i64 |
| 112 | func cg_hash(path: *u8, out: *u8) -> i64 |
| 123 | func cg_eq32(a: *u8, b: *u8) -> i64 called by 1: main |
| 128 | func cg_exists(p: *u8) -> i64 |
| 153 | func cg_try(dir: *u8, sub: *u8, imp: *u8) -> i64 |
| 171 | func cg_resolve(fpath: *u8, imp: *u8, troot: *u8) -> i64 |
| 199 | func cg_check_imports(fpath: *u8, troot: *u8) -> i64 |
| 271 | func main(argc: i64, argv: *i64) -> i64 |