code wiki / (root) / nx_swcompare_gapmap_gate.nx

nx_swcompare_gapmap_gate.nx

buildroot/runtime/nx_swcompare_gapmap_gate.nx

19506 B306 linesdepth 5pulls 6 transitivereach 0 importersview sourcekind gate/prooftopic swcompare
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_gate_verdict.nx nx_tool_run.nx nx_swcompare_gapmap_gate.nx

imports: nx_syscalls.nxnx_gate_verdict.nxnx_tool_run.nx

imported by: nobody (leaf or entry point)

structs

none

consts

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
33const GG_OLD_CORPUS_CAP: i64 = 4194304
34const GG_OLD_SCRATCH_CAP: i64 = 262144
35const GG_OLD_AXIS_SLOTS: i64 = 512
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
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"

functions

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
69func gg_find(buf: *u8, n: i64, needle: *u8) -> i64
called by 2: gg_hasgg_num_after calls 1: gg_slen
82func gg_has(buf: *u8, n: i64, needle: *u8) -> i64 { if gg_find(buf, n, needle) >= 0 { return 1 } return 0 }
called by 1: gg_tail_organ calls 1: gg_find
84func gg_num_after(buf: *u8, n: i64, key: *u8) -> i64
called by 1: gg_tail_organ calls 2: gg_findgg_slen
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 }
called by 1: gg_tail_organ calls 1: gg_cat
102func gg_write_all(fd: i64, s: *u8, n: i64) -> i64
called by 2: gg_writegg_bank calls 1: sys_write
107func gg_write(path: *u8, text: *u8) -> i64
114func gg_size(path: *u8) -> i64
122func gg_bank(path: *u8, total: i64, head_kw: *u8, head: i64, tail_kw: *u8, tail: i64) -> i64
141func gg_tail_organ(path: *u8, pad: i64, sym: *u8) -> i64
155func gg_resolve_gen(out: *u8, argc: i64, argv: *i64) -> i64
178func gg_run(gen: *u8, dom: *u8, mode: *u8, out: *u8, outlen: *i64) -> i64
185func main(argc: i64, argv: *i64) -> i64