code wiki / (root) / nx_swcompare_gapmap_gate.nx

nx_swcompare_gapmap_gate.nx source

↩ module page · 306 lines · 19506 B

1// nx_swcompare_gapmap_gate.nx -- THE REFEREE for the frontier radar generator nx_swcompare_gapmap (2026-09-16). 2// Subject: the promoted nx_swcompare_gapmap END TO END, forked with its CWD inside a /tmp fixture tree (never the 3// estate's knowledge tree: a gate must not share a fixture with a production beat). The defects this guards were 4// four guessed caps that each read as a clean MEASURED-HONEST while publishing a partial measurement: 5// the frontier corpus was loaded into a fixed 4,194,304-byte buffer -> a keyword banked past it counted 0 6// every organ source was read through a 262,144-byte scratch window -> a symbol defined past it read ABSENT 7// the axis tables were one 4 KiB page (512 slots) -> axis 513 and later wrote past the table 8// a RED printed every possible cause -> the reader had to guess which conjunct failed 9// The fixture PLANTS each condition, ASSERTS the plant reached it (file sizes, offsets, row counts) before asserting 10// the outcome, and carries two negative controls: a domain with no banks on disk must refuse naming corpus-loaded, 11// and a corpus holding the radar's neg-control token must refuse naming neg-control-zero while the clean one passes. 12// argv[1], when given, is the generator to drive instead of the promoted one, so a staged build is provable before 13// promote. exit: 0 GREEN . 1 RED . 3 SKIP (generator or fixture unavailable) license_tier: ORIGINAL No hw writes. 14import "nx_syscalls.nx" 15import "nx_gate_verdict.nx" 16import "nx_tool_run.nx" 17 18const GG_PATH: i64 = 1024 19const GG_CAP: i64 = 1048576 20const GG_WORD: i64 = 8 21const GG_ARGV: i64 = 8 22const GG_MODE_RWX: i64 = 493 23const GG_MODE_RW: i64 = 420 24const GG_TIMEOUT_MS: i64 = 120000 25const GG_ROOT: *u8 = "/tmp/nx_swcompare_gapmap_gate" 26const GG_ZERO: i64 = 48 27const GG_NINE: i64 = 57 28const GG_MINUS: i64 = 45 29const GG_SEEK_END: i64 = 2 30const GG_SPACE: i64 = 32 31const GG_SLASH: i64 = 47 32// the old caps, named so each plant can be ASSERTED past the cap it targets 33const GG_OLD_CORPUS_CAP: i64 = 4194304 34const GG_OLD_SCRATCH_CAP: i64 = 262144 35const GG_OLD_AXIS_SLOTS: i64 = 512 36// the plants: two banks whose sum crosses the corpus cap, a tail keyword banked after it, an organ whose one symbol 37// sits after the scratch window, and more filler axes than the old page could hold 38const GG_BANK_BYTES: i64 = 2300000 39const GG_FILL_CHUNK: i64 = 65536 40const GG_HEAD_HITS: i64 = 5 41const GG_TAIL_HITS: i64 = 7 42const GG_ORGAN_PAD: i64 = 300000 43const GG_FILLER_AXES: i64 = 600 44const GG_NAMED_AXES: i64 = 8 45// the homonym plant: "cid" sits inside decided, acid and undecided (never counted) and starts two words (counted), 46// "graphrag" appears once in title case, and the whole-word keyword "fea$" must not count feature or feasible 47const GG_WORDS_TEXT: *u8 = "decided acid undecided CID cid-based GraphRAG graphrag fea feature feasible\n" 48const GG_FILL_TEXT: *u8 = "lorem ipsum dolor sit amet " 49const GG_HEAD_KW: *u8 = "alphakw" 50const GG_TAIL_KW: *u8 = "omegakw" 51const GG_TAIL_SYM: *u8 = "fx_tail_symbol" 52 53func gg_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } 54func gg_cat(dst: *u8, off: i64, s: *u8) -> i64 { var o: i64 = off; var i: i64 = 0; while s[i] != (0 as u8) { dst[o] = s[i]; o = o + 1; i = i + 1 } dst[o] = 0 as u8; return o } 55func gg_catn(dst: *u8, off: i64, v: i64) -> i64 { 56 var o: i64 = off 57 var m: i64 = v 58 if m < 0 { dst[o] = GG_MINUS as u8; o = o + 1; m = 0 - m } 59 let t: *u8 = sys_mmap(32) 60 var k: i64 = 0 61 if m == 0 { t[0] = GG_ZERO as u8; k = 1 } 62 while m > 0 { t[k] = (GG_ZERO + (m % 10)) as u8; m = m / 10; k = k + 1 } 63 var j: i64 = 0 64 while j < k { dst[o] = t[k - 1 - j]; o = o + 1; j = j + 1 } 65 dst[o] = 0 as u8 66 sys_munmap(t, 32) 67 return o 68} 69func gg_find(buf: *u8, n: i64, needle: *u8) -> i64 { 70 let m: i64 = gg_slen(needle) 71 if m == 0 { return 0 - 1 } 72 var i: i64 = 0 73 while i + m <= n { 74 var j: i64 = 0 75 var ok: i64 = 1 76 while j < m { if buf[i + j] != needle[j] { ok = 0; break } j = j + 1 } 77 if ok == 1 { return i } 78 i = i + 1 79 } 80 return 0 - 1 81} 82func gg_has(buf: *u8, n: i64, needle: *u8) -> i64 { if gg_find(buf, n, needle) >= 0 { return 1 } return 0 } 83// the integer right after key in buf, -1 when the key is absent 84func gg_num_after(buf: *u8, n: i64, key: *u8) -> i64 { 85 let at: i64 = gg_find(buf, n, key) 86 if at < 0 { return 0 - 1 } 87 var i: i64 = at + gg_slen(key) 88 var v: i64 = 0 89 var any: i64 = 0 90 while i < n { 91 let c: i64 = buf[i] as i64 92 if c < GG_ZERO { break } 93 if c > GG_NINE { break } 94 v = v * 10 + (c - GG_ZERO) 95 any = 1 96 i = i + 1 97 } 98 if any == 0 { return 0 - 1 } 99 return v 100} 101func gg_path(dst: *u8, rel: *u8) -> *u8 { var o: i64 = gg_cat(dst, 0, GG_ROOT); o = gg_cat(dst, o, rel); return dst } 102func gg_write_all(fd: i64, s: *u8, n: i64) -> i64 { 103 var off: i64 = 0 104 while off < n { let r: i64 = sys_write(fd, (s as i64 + off) as *u8, n - off); if r <= 0 { return 0 - 1 } off = off + r } 105 return n 106} 107func gg_write(path: *u8, text: *u8) -> i64 { 108 let fd: i64 = sys_openat_wr(path, GG_MODE_RW) 109 if fd < 0 { return 0 - 1 } 110 let r: i64 = gg_write_all(fd, text, gg_slen(text)) 111 sys_close(fd) 112 return r 113} 114func gg_size(path: *u8) -> i64 { 115 let fd: i64 = sys_openat_rd(path) 116 if fd < 0 { return 0 - 1 } 117 let sz: i64 = sys_lseek(fd, 0, GG_SEEK_END) 118 sys_close(fd) 119 return sz 120} 121// a bank of `total` bytes: `head` copies of head_kw first, filler, then `tail` copies of tail_kw at the very end 122func gg_bank(path: *u8, total: i64, head_kw: *u8, head: i64, tail_kw: *u8, tail: i64) -> i64 { 123 let fd: i64 = sys_openat_wr(path, GG_MODE_RW) 124 if fd < 0 { return 0 - 1 } 125 let chunk: *u8 = sys_mmap(GG_FILL_CHUNK + GG_PATH) 126 var wrote: i64 = 0 127 var h: i64 = 0 128 while h < head { let o: i64 = gg_cat(chunk, 0, head_kw); chunk[o] = GG_SPACE as u8; gg_write_all(fd, chunk, o + 1); wrote = wrote + o + 1; h = h + 1 } 129 let tail_bytes: i64 = tail * (gg_slen(tail_kw) + 1) 130 let fl: i64 = gg_slen(GG_FILL_TEXT) 131 var fo: i64 = 0 132 while fo + fl <= GG_FILL_CHUNK { fo = gg_cat(chunk, fo, GG_FILL_TEXT) } 133 while wrote + fo <= total - tail_bytes { gg_write_all(fd, chunk, fo); wrote = wrote + fo } 134 var t: i64 = 0 135 while t < tail { let o2: i64 = gg_cat(chunk, 0, tail_kw); chunk[o2] = GG_SPACE as u8; gg_write_all(fd, chunk, o2 + 1); wrote = wrote + o2 + 1; t = t + 1 } 136 sys_close(fd) 137 sys_munmap(chunk, GG_FILL_CHUNK + GG_PATH) 138 return wrote 139} 140// an organ source whose ONLY definition of sym sits after `pad` bytes of comment lines 141func gg_tail_organ(path: *u8, pad: i64, sym: *u8) -> i64 { 142 let fd: i64 = sys_openat_wr(path, GG_MODE_RW) 143 if fd < 0 { return 0 - 1 } 144 let line: *u8 = sys_mmap(GG_PATH) 145 let ln: i64 = gg_cat(line, 0, "// padding line for nx_swcompare_gapmap_gate so the symbol below sits past the old scratch window\n" as *u8) 146 var wrote: i64 = 0 147 while wrote < pad { gg_write_all(fd, line, ln); wrote = wrote + ln } 148 var o: i64 = gg_cat(line, 0, "func " as *u8); o = gg_cat(line, o, sym); o = gg_cat(line, o, "() -> i64 { return 1 }\n" as *u8) 149 gg_write_all(fd, line, o) 150 sys_close(fd) 151 sys_munmap(line, GG_PATH) 152 return wrote 153} 154// absolute path of the promoted generator from the caller's CWD, or the argv override 155func gg_resolve_gen(out: *u8, argc: i64, argv: *i64) -> i64 { 156 let cwd: *u8 = sys_mmap(GG_PATH) 157 if sys_getcwd(cwd, GG_PATH) <= 0 { out[0] = 0 as u8; return 0 } 158 if argc >= 2 { 159 let a1: *u8 = argv[1] as *u8 160 var o: i64 = 0 161 if a1[0] != (GG_SLASH as u8) { o = gg_cat(out, 0, cwd); o = gg_cat(out, o, "/" as *u8) } 162 o = gg_cat(out, o, a1) 163 return (gg_size(out) > 0) as i64 164 } 165 var k: i64 = 0 166 while k < 4 { 167 var o2: i64 = gg_cat(out, 0, cwd) 168 if k == 0 { o2 = gg_cat(out, o2, "/nx_swcompare_gapmap.elf" as *u8) } 169 if k == 1 { o2 = gg_cat(out, o2, "/../nx_swcompare_gapmap.elf" as *u8) } 170 if k == 2 { o2 = gg_cat(out, o2, "/buildroot/_build/nx_swcompare_gapmap.sov.elf" as *u8) } 171 if k == 3 { o2 = gg_cat(out, o2, "/_build/nx_swcompare_gapmap.sov.elf" as *u8) } 172 if gg_size(out) > 0 { return 1 } 173 k = k + 1 174 } 175 out[0] = 0 as u8 176 return 0 177} 178func gg_run(gen: *u8, dom: *u8, mode: *u8, out: *u8, outlen: *i64) -> i64 { 179 let av: *i64 = sys_mmap(GG_ARGV * GG_WORD) as *i64 180 av[0] = gen as i64; av[1] = dom as i64 181 if gg_slen(mode) > 0 { av[2] = mode as i64; av[3] = 0 } else { av[2] = 0 } 182 return tr_run_capture_cwd(gen, av, out, GG_CAP, outlen, GG_TIMEOUT_MS, GG_ROOT) 183} 184 185func main(argc: i64, argv: *i64) -> i64 { 186 let ctr: *i64 = gv_ctr() 187 gv_head("NX-SWCOMPARE-GAPMAP-GATE: the frontier radar measures its WHOLE corpus, its WHOLE organ sources and EVERY axis, and a RED names its failed conjunct" as *u8) 188 let gen: *u8 = sys_mmap(GG_PATH) 189 let have: i64 = gg_resolve_gen(gen, argc, argv) 190 gv_puts(" generator=" as *u8); if have == 1 { gv_puts(gen) } else { gv_puts("ABSENT" as *u8) } gv_puts("\n" as *u8) 191 if gv_need("promoted nx_swcompare_gapmap (serving root, its parent, _build, or argv[1])" as *u8, have, ctr) == 0 { 192 return gv_verdict("nx_swcompare_gapmap_gate" as *u8, ctr, "no generator to drive" as *u8) 193 } 194 // ---- the fixture tree, rebuilt from scratch at runtime under /tmp on every run (idempotent) ---- 195 let p: *u8 = sys_mmap(GG_PATH) 196 sys_mkdir(GG_ROOT, GG_MODE_RWX) 197 sys_mkdir(gg_path(p, "/knowledge" as *u8), GG_MODE_RWX) 198 sys_mkdir(gg_path(p, "/knowledge/compare" as *u8), GG_MODE_RWX) 199 sys_mkdir(gg_path(p, "/knowledge/library" as *u8), GG_MODE_RWX) 200 sys_mkdir(gg_path(p, "/runtime" as *u8), GG_MODE_RWX) 201 let big1: *u8 = sys_mmap(GG_PATH); gg_path(big1, "/knowledge/library/fx_big1.txt" as *u8) 202 let big2: *u8 = sys_mmap(GG_PATH); gg_path(big2, "/knowledge/library/fx_big2.txt" as *u8) 203 let negb: *u8 = sys_mmap(GG_PATH); gg_path(negb, "/knowledge/library/fx_negbank.txt" as *u8) 204 let absb: *u8 = sys_mmap(GG_PATH); gg_path(absb, "/knowledge/library/fx_missing.txt" as *u8) 205 let wordsb: *u8 = sys_mmap(GG_PATH); gg_path(wordsb, "/knowledge/library/fx_words.txt" as *u8) 206 sys_unlinkat(absb) 207 gg_bank(big1, GG_BANK_BYTES, GG_HEAD_KW, GG_HEAD_HITS, GG_TAIL_KW, 0) 208 gg_bank(big2, GG_BANK_BYTES, GG_HEAD_KW, 0, GG_TAIL_KW, GG_TAIL_HITS) 209 gg_write(wordsb, GG_WORDS_TEXT) 210 // the neg-control token is assembled from two halves at runtime, so this source never spells it whole 211 let negtok: *u8 = sys_mmap(GG_PATH) 212 var nt: i64 = gg_cat(negtok, 0, "zqxjq_wolfram_" as *u8); nt = gg_cat(negtok, nt, "notacap" as *u8) 213 gg_bank(negb, GG_BANK_BYTES, GG_HEAD_KW, GG_HEAD_HITS, negtok, 1) 214 let small: *u8 = sys_mmap(GG_PATH); gg_path(small, "/runtime/fx_organ.nx" as *u8) 215 gg_write(small, "// fixture organ for nx_swcompare_gapmap_gate\nfunc fx_present() -> i64 { return 1 }\n" as *u8) 216 let tailorg: *u8 = sys_mmap(GG_PATH); gg_path(tailorg, "/runtime/fx_tailorgan.nx" as *u8) 217 gg_tail_organ(tailorg, GG_ORGAN_PAD, GG_TAIL_SYM) 218 // rosters: fx (two real banks and one declared-but-absent), fxneg (the leaked token), fxnobank (no bank on disk) 219 gg_write(gg_path(p, "/knowledge/compare/fx.q" as *u8), "# fixture roster\nfx_big1\thttps://example.invalid/fx1\nfx_big2\thttps://example.invalid/fx2\nfx_missing\thttps://example.invalid/fx3\nfx_words\thttps://example.invalid/fx4\n" as *u8) 220 gg_write(gg_path(p, "/knowledge/compare/fxneg.q" as *u8), "fx_negbank\thttps://example.invalid/neg\n" as *u8) 221 gg_write(gg_path(p, "/knowledge/compare/fxnobank.q" as *u8), "fx_missing\thttps://example.invalid/a\nfx_missing\thttps://example.invalid/b\n" as *u8) 222 // the axes: four named rows and GG_FILLER_AXES covered filler rows, one per line 223 let axes: *u8 = sys_mmap(GG_CAP) 224 var ao: i64 = gg_cat(axes, 0, "# fixture axes\n@title Gapmap gate fixture & <x>\n" as *u8) 225 ao = gg_cat(axes, ao, "Covered small|runtime/fx_organ.nx|fx_present|alphakw\n" as *u8) 226 ao = gg_cat(axes, ao, "Tail symbol|runtime/fx_tailorgan.nx|fx_tail_symbol|alphakw\n" as *u8) 227 ao = gg_cat(axes, ao, "Tail momentum gap|runtime/fx_organ.nx|_ABSENT_|omegakw\n" as *u8) 228 ao = gg_cat(axes, ao, "Dormant gap|runtime/fx_organ.nx|_ABSENT_|zzqnomatchkw\n" as *u8) 229 ao = gg_cat(axes, ao, "Homonym gap|runtime/fx_organ.nx|_ABSENT_|cid\n" as *u8) 230 ao = gg_cat(axes, ao, "Case gap|runtime/fx_organ.nx|_ABSENT_|graphrag\n" as *u8) 231 ao = gg_cat(axes, ao, "Whole word gap|runtime/fx_organ.nx|_ABSENT_|fea$\n" as *u8) 232 ao = gg_cat(axes, ao, "Escaped <b> & label|runtime/fx_organ.nx|fx_present|alphakw\n" as *u8) 233 var fa: i64 = 0 234 while fa < GG_FILLER_AXES { ao = gg_cat(axes, ao, "Filler axis " as *u8); ao = gg_catn(axes, ao, fa); ao = gg_cat(axes, ao, "|runtime/fx_organ.nx|fx_present|alphakw\n" as *u8); fa = fa + 1 } 235 gg_write(gg_path(p, "/knowledge/compare/fx.axes" as *u8), axes) 236 gg_write(gg_path(p, "/knowledge/compare/fxneg.axes" as *u8), "@title neg\nCovered small|runtime/fx_organ.nx|fx_present|alphakw\nGap|runtime/fx_organ.nx|_ABSENT_|alphakw\n" as *u8) 237 gg_write(gg_path(p, "/knowledge/compare/fxnobank.axes" as *u8), "@title nobank\nCovered small|runtime/fx_organ.nx|fx_present|alphakw\nGap|runtime/fx_organ.nx|_ABSENT_|alphakw\n" as *u8) 238 239 // ---- the plants reached their conditions (asserted BEFORE any outcome) ---- 240 let s1: i64 = gg_size(big1) 241 let s2: i64 = gg_size(big2) 242 let s3: i64 = gg_size(wordsb) 243 let so: i64 = gg_size(tailorg) 244 gv_check("plant-corpus-crosses-the-old-4MiB-cap" as *u8, (s1 + s2 > GG_OLD_CORPUS_CAP) as i64, ctr) 245 gv_check("plant-tail-keyword-sits-past-the-old-cap (bank1 alone is below it, the tail is at the end of bank2)" as *u8, ((s1 < GG_OLD_CORPUS_CAP) as i64) & ((s1 + s2 - GG_OLD_CORPUS_CAP > GG_TAIL_HITS * (gg_slen(GG_TAIL_KW) + 1)) as i64), ctr) 246 gv_check("plant-tail-symbol-sits-past-the-old-scratch-window" as *u8, (so > GG_OLD_SCRATCH_CAP) as i64, ctr) 247 gv_check("plant-axis-rows-exceed-the-old-page-of-slots" as *u8, (GG_FILLER_AXES + GG_NAMED_AXES > GG_OLD_AXIS_SLOTS) as i64, ctr) 248 gv_check("plant-declared-absent-bank-really-absent" as *u8, (gg_size(absb) < 0) as i64, ctr) 249 gv_check_eq("plant-homonym-bank-written" as *u8, s3, gg_slen(GG_WORDS_TEXT), ctr) 250 251 let out: *u8 = sys_mmap(GG_CAP) 252 let ol: *i64 = sys_mmap(16) as *i64 253 // ---- A: the whole corpus, the whole organ, every axis ---- 254 let rcA: i64 = gg_run(gen, "fx" as *u8, "" as *u8, out, ol) 255 let nA: i64 = ol[0] 256 gv_puts(" A(fx) rc=" as *u8); gv_num(rcA); gv_puts(" bytes=" as *u8); gv_num(nA); gv_puts("\n" as *u8) 257 gv_check_eq("A-exit-0-measured-honest" as *u8, rcA, 0, ctr) 258 gv_check("A-verdict-line-MEASURED-HONEST" as *u8, gg_has(out, nA, "domain=fx opportunities=" as *u8) & gg_has(out, nA, "verdict=MEASURED-HONEST" as *u8), ctr) 259 gv_check_eq("A-corpus-bytes-is-the-sum-of-the-banks-on-disk" as *u8, gg_num_after(out, nA, "corpus_bytes=" as *u8), s1 + s2 + s3, ctr) 260 gv_check_eq("A-banks-present-counted" as *u8, gg_num_after(out, nA, "banks=" as *u8), 3, ctr) 261 gv_check("A-banks-declared-counted (banks=3/4)" as *u8, gg_has(out, nA, "banks=3/4" as *u8), ctr) 262 gv_check_eq("A-every-axis-row-parsed" as *u8, gg_num_after(out, nA, "axes=" as *u8), GG_FILLER_AXES + GG_NAMED_AXES, ctr) 263 gv_check("A-tail-keyword-momentum-is-counted-whole" as *u8, gg_has(out, nA, "[OPPORTUNITY] mom=7 Tail momentum gap" as *u8), ctr) 264 gv_check("A-symbol-past-the-scratch-window-reads-COVERED" as *u8, gg_has(out, nA, "[COVERED ] mom=5 Tail symbol" as *u8), ctr) 265 gv_check_eq("A-covered-tally (small + tail symbol + escaped label + every filler)" as *u8, gg_num_after(out, nA, "covered=" as *u8), GG_FILLER_AXES + 3, ctr) 266 gv_check_eq("A-opportunity-tally (tail, homonym, case, whole word)" as *u8, gg_num_after(out, nA, "TALLY: opportunities=" as *u8), 4, ctr) 267 gv_check_eq("A-dormant-tally" as *u8, gg_num_after(out, nA, "dormant=" as *u8), 1, ctr) 268 gv_check("A-no-truncation-declared" as *u8, (gg_has(out, nA, "CORPUS-TRUNCATED-AT-CAP" as *u8) == 0) as i64, ctr) 269 gv_check("A-homonym-keyword-counts-only-at-a-word-start (cid=2, never inside decided or acid)" as *u8, gg_has(out, nA, "[OPPORTUNITY] mom=2 Homonym gap" as *u8) & gg_has(out, nA, "keywords: cid=2" as *u8), ctr) 270 gv_check("A-keyword-matches-any-letter-case (GraphRAG counts for graphrag)" as *u8, gg_has(out, nA, "[OPPORTUNITY] mom=2 Case gap" as *u8), ctr) 271 gv_check("A-whole-word-keyword-refuses-longer-words (fea counts once, feature and feasible do not)" as *u8, gg_has(out, nA, "[OPPORTUNITY] mom=1 Whole word gap" as *u8), ctr) 272 let rcAj: i64 = gg_run(gen, "fx" as *u8, "json" as *u8, out, ol) 273 let nAj: i64 = ol[0] 274 gv_check_eq("A-json-exit-0" as *u8, rcAj, 0, ctr) 275 gv_check_eq("A-json-banks_declared" as *u8, gg_num_after(out, nAj, "\"banks_declared\":" as *u8), 4, ctr) 276 gv_check_eq("A-json-banks_present" as *u8, gg_num_after(out, nAj, "\"banks_present\":" as *u8), 3, ctr) 277 gv_check_eq("A-json-corpus_truncated_at_cap-zero" as *u8, gg_num_after(out, nAj, "\"corpus_truncated_at_cap\":" as *u8), 0, ctr) 278 gv_check("A-json-carries-per-axis-keyword-counts" as *u8, gg_has(out, nAj, "\"keywords\":\"cid=2\"" as *u8), ctr) 279 // ---- A html: data is escaped where it enters markup, and the page shows the per-keyword counts ---- 280 let rcAh: i64 = gg_run(gen, "fx" as *u8, "html" as *u8, out, ol) 281 let nAh: i64 = ol[0] 282 gv_check_eq("A-html-exit-0" as *u8, rcAh, 0, ctr) 283 gv_check("A-html-escapes-the-label (lt, gt, amp)" as *u8, gg_has(out, nAh, "Escaped &lt;b&gt; &amp; label" as *u8) & ((gg_has(out, nAh, "Escaped <b>" as *u8) == 0) as i64), ctr) 284 gv_check("A-html-escapes-the-title" as *u8, gg_has(out, nAh, "Gapmap gate fixture &amp; &lt;x&gt;" as *u8), ctr) 285 gv_check("A-html-shows-per-keyword-counts" as *u8, gg_has(out, nAh, "cid=2" as *u8), ctr) 286 287 // ---- B: no bank on disk refuses and NAMES corpus-loaded ---- 288 let rcB: i64 = gg_run(gen, "fxnobank" as *u8, "" as *u8, out, ol) 289 let nB: i64 = ol[0] 290 gv_puts(" B(fxnobank) rc=" as *u8); gv_num(rcB); gv_puts(" bytes=" as *u8); gv_num(nB); gv_puts("\n" as *u8) 291 let b_red: i64 = ((rcB != 0) as i64) & gg_has(out, nB, "RED (failed: corpus-loaded" as *u8) 292 gv_check("B-no-banks-refuses-naming-corpus-loaded" as *u8, b_red, ctr) 293 gv_check("B-banks-0-of-2" as *u8, gg_has(out, nB, "banks=0/2" as *u8), ctr) 294 295 // ---- C: a leaked neg-control token refuses and NAMES neg-control-zero, while A (clean) passes ---- 296 let rcC: i64 = gg_run(gen, "fxneg" as *u8, "" as *u8, out, ol) 297 let nC: i64 = ol[0] 298 gv_puts(" C(fxneg) rc=" as *u8); gv_num(rcC); gv_puts(" bytes=" as *u8); gv_num(nC); gv_puts("\n" as *u8) 299 let c_fired: i64 = ((rcC != 0) as i64) & gg_has(out, nC, " neg-control-zero)" as *u8) & gg_has(out, nC, "corpus-loaded=1" as *u8) 300 gv_bite("neg-control-leaked-token the radar refuses a corpus holding its neg-control token and names that conjunct, and stays silent on the clean fixture" as *u8, c_fired, (rcA != 0) as i64, ctr) 301 302 gv_kv("corpus_bytes_planted" as *u8, s1 + s2 + s3) 303 gv_kv("tail_organ_bytes" as *u8, so) 304 gv_kv("axes_planted" as *u8, GG_FILLER_AXES + GG_NAMED_AXES) 305 return gv_verdict("nx_swcompare_gapmap_gate" as *u8, ctr, "the radar publishes a whole measurement or names what it could not load" as *u8) 306}