code wiki / (root) / nx_reader_ruler_adversary_gate.nx

nx_reader_ruler_adversary_gate.nx

buildroot/runtime/nx_reader_ruler_adversary_gate.nx

7952 B120 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind gate/prooftopic reader
docsdependenciesstructsconstsfunctions

about

nx_reader_ruler_adversary_gate.nx -- ADVERSARY + CRITIC pass on the READER F1 RULER, independently confirming (or discrediting) the 2026-07-13 finding: "the 2-shot surface-form win (+104 on the single-gold standalone bench) was a METRIC ARTIFACT -- on the multi-alias on-protocol metric it did NOT transfer (SQuAD 427 vs 510), so it was reverted." Per the sovereign critic-kernel discipline (see nx_card_adversary_gate): a RULER is trustworthy (LAW) only if it DISCRIMINATES genuine-correct from an adversary built to game it. Here two rulers are compared: single_gold_f1(pred, gold) = qs_f1 against ONE gold string (the standalone bench metric) multi_alias_f1(pred, aliases[]) = max_i qs_f1(pred, alias_i) (the on-protocol qab metric == official SQuAD) The ADVERSARY = a surface-form change ("7" -> "seven") that games single-gold WITHOUT improving true correctness. A trustworthy ruler must give the adversary ZERO gain. We prove: single-gold IS gamed (delta>0), multi-alias is NOT (delta==0). That mechanically CONFIRMS the revert. license_tier: ORIGINAL expect_exit: 0

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_qa_score_lib.nx nx_reader_ruler_adversary_gate

imports: nx_syscalls.nxnx_qa_score_lib.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 g_puts sys_write chk g_puts ↻ g_n sys_write ↻ sys_mmap ↻ qs_f1 sys_mmap ↻ qs_norm qs_tok qs_is_article qs_common qs_tok_eq2 malias_f1 qs_f1 ↻ g_n ↻ chk_ge g_puts ↻ g_n ↻

structs

none

consts

none

functions

16func g_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
called by 3: chkchk_gemain calls 1: sys_write
17func g_n(v: i64) -> i64
called by 3: chkchk_gemain calls 2: sys_writesys_mmap
25func chk(name: *u8, got: i64, want: i64, st: *i64) -> i64
called by 1: main calls 2: g_putsg_n
32func chk_ge(name: *u8, got: i64, lo: i64, st: *i64) -> i64
called by 1: main calls 2: g_putsg_n
40func malias_f1(pred: *u8, aliases: *i64, na: i64) -> i64
called by 1: main calls 1: qs_f1
52func main() -> i64