nx_writebench_gate.nx
buildroot/runtime/nx_writebench_gate.nx
about
nx_writebench_gate.nx -- the LIAR-KILL gate for nx_writebench. A benchmark that grades us is
worthless unless something can prove it is not a rubber stamp. Teeth:
T1 THE RULER IS REAL -- the banked corpus exists and clears the decoy byte floor.
T2 THE RULER IS THAT PAPER -- the corpus literally contains the paper's own distinctive strings
(FlowGPT / Krippendorff / the H-/C+ finding). This is the anti-fabrication tooth: it makes it
impossible to benchmark against an INVENTED paper, which is the whole failure mode of a
self-authored ruler.
T3 EVERY CLAIMED ARTIFACT EXISTS -- each evidence artifact the board attaches to a HAVE/PARTIAL is
stat'd on disk from this gate's OWN independent list. Board, gate and disk are three copies.
T4 NEG-CONTROL -- a fabricated artifact path must NOT exist. Without this, T3 could pass
by accident (if the stat helper always returned success) and the gate would be a rubber stamp.
T5 HONESTY CANNOT ROT -- the board source must still carry the SELF-GRADED deflation AND the
DAN-class policy declaration. If a later edit quietly deletes either so the number reads like
parity, this gate goes RED.
T6 COVERAGE IS COMPUTED -- this gate recomputes the score from its own independent copy of the 28
verdicts and asserts it equals both the arithmetic (20/56 = 357 permil) AND the figure the board
actually emitted into its log. Inflating the board alone cannot move this.
T7 THE PARTITION SUMS -- the ruler's four class sizes must sum to 378, and 378 minus the 2
dual-labelled bots must equal the 376 distinct corpus. A partition is a claim: check the parts.
T8 RULER DATA IS NON-VACUOUS -- the headline datum the board grades against (22.8) must be present
in the banked corpus, not just in our prose about it.
Evidence -> stdout + knowledge/status/writebench_gate.log. Exit 0 GREEN / 1 RED.
Sovereign x86_64. license_tier: ORIGINAL expect_exit: 0
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_estate_path.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
| 28 | const WG_NAXES: i64 = 28 |
| 29 | const WG_RULER_MIN: i64 = 50000 |
| 30 | const WG_EXP_SCORE: i64 = 35 |
| 31 | const WG_EXP_PERMIL: i64 = 625 |
| 32 | const WG_SCRATCH: i64 = 524288 |
| 33 | const WG_N_AICHAR: i64 = 279 |
| 34 | const WG_N_STORY: i64 = 63 |
| 35 | const WG_N_IMAGE: i64 = 15 |
| 36 | const WG_N_DAN: i64 = 21 |
| 37 | const WG_CLASS_SUM: i64 = 378 |
| 38 | const WG_CORPUS_N: i64 = 376 |
| 39 | const WG_DUAL: i64 = 2 |
functions
| 41 | func gw(fd: i64, s: *u8) -> i64 |
| 48 | func gnum(fd: i64, v: i64) -> i64 |
| 62 | func gkv(fd: i64, label: *u8, got: i64, exp: i64) -> i64 |
| 75 | func wg_slurp(p: *u8, buf: *u8, cap: i64) -> i64 |
| 91 | func wg_find(hay: *u8, n: i64, needle: *u8) -> i64 called by 1: gsub |
| 107 | func gsub(fd: i64, label: *u8, hay: *u8, n: i64, needle: *u8, want: i64) -> i64 |
| 118 | func main() -> i64 |