nx_swcompare_gapmap_gate.nx
buildroot/runtime/nx_swcompare_gapmap_gate.nx
about
nx_swcompare_gapmap_gate.nx -- THE REFEREE for the frontier radar generator nx_swcompare_gapmap (2026-09-16).
Subject: the promoted nx_swcompare_gapmap END TO END, forked with its CWD inside a /tmp fixture tree (never the
estate's knowledge tree: a gate must not share a fixture with a production beat). The defects this guards were
four guessed caps that each read as a clean MEASURED-HONEST while publishing a partial measurement:
the frontier corpus was loaded into a fixed 4,194,304-byte buffer -> a keyword banked past it counted 0
every organ source was read through a 262,144-byte scratch window -> a symbol defined past it read ABSENT
the axis tables were one 4 KiB page (512 slots) -> axis 513 and later wrote past the table
a RED printed every possible cause -> the reader had to guess which conjunct failed
The fixture PLANTS each condition, ASSERTS the plant reached it (file sizes, offsets, row counts) before asserting
the outcome, and carries two negative controls: a domain with no banks on disk must refuse naming corpus-loaded,
and a corpus holding the radar's neg-control token must refuse naming neg-control-zero while the clean one passes.
argv[1], when given, is the generator to drive instead of the promoted one, so a staged build is provable before
promote. exit: 0 GREEN . 1 RED . 3 SKIP (generator or fixture unavailable) license_tier: ORIGINAL No hw writes.
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_gate_verdict.nxnx_tool_run.nx
imported by: nobody (leaf or entry point)
structs
| none |
consts
| 18 | const GG_PATH: i64 = 1024 |
| 19 | const GG_CAP: i64 = 1048576 |
| 20 | const GG_WORD: i64 = 8 |
| 21 | const GG_ARGV: i64 = 8 |
| 22 | const GG_MODE_RWX: i64 = 493 |
| 23 | const GG_MODE_RW: i64 = 420 |
| 24 | const GG_TIMEOUT_MS: i64 = 120000 |
| 25 | const GG_ROOT: *u8 = "/tmp/nx_swcompare_gapmap_gate" |
| 26 | const GG_ZERO: i64 = 48 |
| 27 | const GG_NINE: i64 = 57 |
| 28 | const GG_MINUS: i64 = 45 |
| 29 | const GG_SEEK_END: i64 = 2 |
| 30 | const GG_SPACE: i64 = 32 |
| 31 | const GG_SLASH: i64 = 47 |
| 33 | const GG_OLD_CORPUS_CAP: i64 = 4194304 |
| 34 | const GG_OLD_SCRATCH_CAP: i64 = 262144 |
| 35 | const GG_OLD_AXIS_SLOTS: i64 = 512 |
| 38 | const GG_BANK_BYTES: i64 = 2300000 |
| 39 | const GG_FILL_CHUNK: i64 = 65536 |
| 40 | const GG_HEAD_HITS: i64 = 5 |
| 41 | const GG_TAIL_HITS: i64 = 7 |
| 42 | const GG_ORGAN_PAD: i64 = 300000 |
| 43 | const GG_FILLER_AXES: i64 = 600 |
| 44 | const GG_NAMED_AXES: i64 = 8 |
| 47 | const GG_WORDS_TEXT: *u8 = "decided acid undecided CID cid-based GraphRAG graphrag fea feature feasible\n" |
| 48 | const GG_FILL_TEXT: *u8 = "lorem ipsum dolor sit amet " |
| 49 | const GG_HEAD_KW: *u8 = "alphakw" |
| 50 | const GG_TAIL_KW: *u8 = "omegakw" |
| 51 | const GG_TAIL_SYM: *u8 = "fx_tail_symbol" |
functions
| 53 | func gg_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 54 | func 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 } |
| 55 | func gg_catn(dst: *u8, off: i64, v: i64) -> i64 |
| 69 | func gg_find(buf: *u8, n: i64, needle: *u8) -> i64 |
| 82 | func gg_has(buf: *u8, n: i64, needle: *u8) -> i64 { if gg_find(buf, n, needle) >= 0 { return 1 } return 0 } |
| 84 | func gg_num_after(buf: *u8, n: i64, key: *u8) -> i64 |
| 101 | func gg_path(dst: *u8, rel: *u8) -> *u8 { var o: i64 = gg_cat(dst, 0, GG_ROOT); o = gg_cat(dst, o, rel); return dst } |
| 102 | func gg_write_all(fd: i64, s: *u8, n: i64) -> i64 |
| 107 | func gg_write(path: *u8, text: *u8) -> i64 |
| 114 | func gg_size(path: *u8) -> i64 |
| 122 | func gg_bank(path: *u8, total: i64, head_kw: *u8, head: i64, tail_kw: *u8, tail: i64) -> i64 |
| 141 | func gg_tail_organ(path: *u8, pad: i64, sym: *u8) -> i64 |
| 155 | func gg_resolve_gen(out: *u8, argc: i64, argv: *i64) -> i64 |
| 178 | func gg_run(gen: *u8, dom: *u8, mode: *u8, out: *u8, outlen: *i64) -> i64 |
| 185 | func main(argc: i64, argv: *i64) -> i64 |