nx_incumbent_gate.nx
buildroot/runtime/nx_incumbent_gate.nx
about
nx_incumbent_gate.nx -- GATE for the incumbents ruler (nx_incumbent_lib, engineshift ES28), driven IN-PROCESS on a
planted fixture tree under /tmp: thirteen fake organs (a dense-judge twin naming a knowledge/ asset and carrying a
rejection line, a cross-encoder twin, a voxel organ, nine fillers, one whose header overruns the read window) and two
fake assets. Proves: the index envelope (files, assets, truncation counted, corpus_complete), a rerank contract names
both rerank twins and neither the voxel organ nor the excluded organ, the asset named in a matched header is listed,
the rejection line is listed, a voxel contract names the voxel organ alone, a nonsense contract prints NONE with its
terms, a contract made only of words every header carries is dropped as non-discriminating, the index states
(FRESH, STALE by age, ABSENT, MALFORMED), and THE DECLARED ACCEPT RULE on the live tree: the search board's R0
contract, answered from a live index built into /tmp, names nx_dr_densejudge, embed_v1.bin and the DR-13 rejection
with no seat input. Every fixture asserts its own condition first.
license_tier: ORIGINAL Writes only under /tmp/nx_incumbent_gate. No hw writes (Rule 26).
dependencies 4 imports · 0 importers
imports: nx_syscalls.nxnx_gatekit_lib.nxnx_incumbent_lib.nxnx_gate_verdict.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
| 17 | const G_ROOT: *u8 = "/tmp/nx_incumbent_gate" |
| 18 | const G_RA: *u8 = "/tmp/nx_incumbent_gate/ra" |
| 19 | const G_RB: *u8 = "/tmp/nx_incumbent_gate/rb" |
| 20 | const G_IDXDIR: *u8 = "/tmp/nx_incumbent_gate/idx" |
| 21 | const G_INDEX: *u8 = "/tmp/nx_incumbent_gate/incumbent_index.txt" |
| 22 | const G_LIVE_INDEX: *u8 = "/tmp/nx_incumbent_gate/live_index.txt" |
| 23 | const G_JUNK: *u8 = "/tmp/nx_incumbent_gate/junk.txt" |
| 24 | const G_ABSENT: *u8 = "/tmp/nx_incumbent_gate/absent.txt" |
| 25 | const G_DENSE: *u8 = "/tmp/nx_incumbent_gate/ra/nx_fake_densejudge.nx" |
| 26 | const G_CROSS: *u8 = "/tmp/nx_incumbent_gate/rb/nx_fake_crossenc.nx" |
| 27 | const G_VOXEL: *u8 = "/tmp/nx_incumbent_gate/ra/nx_fake_voxel.nx" |
| 28 | const G_LONG: *u8 = "/tmp/nx_incumbent_gate/rb/nx_fake_longhead.nx" |
| 29 | const G_ASSET1: *u8 = "/tmp/nx_incumbent_gate/idx/fake_embed_v1.bin" |
| 30 | const G_ASSET2: *u8 = "/tmp/nx_incumbent_gate/idx/unrelated.tsv" |
| 31 | const G_DENSE_SRC: *u8 = "// nx_fake_densejudge.nx -- TRAINED DENSE representation for the reranker judge (a sovereign fixture twin of DR-13).\n// Three measured rejections localised the ceiling to the features themselves: learned fusion over PPMI does not transfer.\n// This uses the trained dense embeddings (knowledge/index/fake_embed_v1.bin) produced by the trainer.\nimport \"nx_syscalls.nx\"\nfunc dj_fake_maxsim() -> i64 { return 0 }\n" |
| 32 | const G_CROSS_SRC: *u8 = "// nx_fake_crossenc.nx -- cross-encoder rerank over the top candidates, a sovereign fixture.\n// A rerank arm that must beat the BM25 arm before it is wired.\nimport \"nx_syscalls.nx\"\nfunc ce_fake_score() -> i64 { return 0 }\n" |
| 33 | const G_VOXEL_SRC: *u8 = "// nx_fake_voxel.nx -- voxel exterior flood fill with a pad, a sovereign fixture.\n// The flood seeds from the pad and the exterior cells are counted.\nimport \"nx_syscalls.nx\"\nfunc vx_fake_flood() -> i64 { return 0 }\n" |
| 34 | const G_FILLER_HEAD: *u8 = "// nx_fake_f" |
| 35 | const G_FILLER_MID: *u8 = ".nx -- sovereign fixture organ about " |
| 36 | const G_FILLER_TAIL: *u8 = ".\nimport \"nx_syscalls.nx\"\nfunc fk_noop() -> i64 { return 0 }\n" |
| 37 | const G_LONG_LINE: *u8 = "// sovereign fixture filler line with granite words to overrun the header window of the reader\n" |
| 38 | const G_LONG_LINES: i64 = 220 |
| 39 | const G_FILLERS: i64 = 9 |
| 40 | const G_FIXTURE_FILES: i64 = 14 // dense twin, cross twin, voxel, prose-only, nine fillers, one long header |
| 41 | const G_PROSE: *u8 = "/tmp/nx_incumbent_gate/rb/nx_fake_prose.nx" |
| 42 | const G_PROSE_SRC: *u8 = "// nx_fake_prose.nx -- notes on the reranker, dense and trained, over the years, a sovereign fixture.\n// It matches exactly the bag words the dense twin matches and carries none of them in its name.\nimport \"nx_syscalls.nx\"\nfunc pr_fake_notes() -> i64 { return 0 }\n" |
| 43 | const G_FIXTURE_ASSETS: i64 = 2 |
| 44 | const G_OUT_CAP: i64 = 16384 |
| 45 | const G_I64: i64 = 8 |
| 46 | const G_LIVE_PLAN_A: *u8 = "buildroot/knowledge/compare/search.plan" |
| 47 | const G_LIVE_PLAN_B: *u8 = "knowledge/compare/search.plan" |
| 48 | const G_LIVE_RUNG: *u8 = "rung|R0|" |
| 49 | const G_LIVE_EXCL: *u8 = "nx_neural_reranker" |
| 50 | const G_LIVE_WANT_ORGAN: *u8 = "nx_dr_densejudge" |
| 51 | const G_LIVE_WANT_ASSET: *u8 = "embed_v1.bin" |
| 52 | const G_LIVE_WANT_REJ: *u8 = "rejections" |
| 53 | const G_LIVE_MIN_FILES: i64 = 1000 |
| 54 | const G_R0_TITLE: *u8 = "Neural rerank that beats BM25" |
| 55 | const G_R0_SYM: *u8 = "nr_rerank" |
| 56 | const G_R0_NOTE: *u8 = "A trained cross-encoder or dense reranker over the top-k" |
| 57 | const G_VX_TITLE: *u8 = "Voxel exterior flood" |
| 58 | const G_NONSENSE: *u8 = "Zzzq qqxx wwvv" |
| 59 | const G_COMMON: *u8 = "sovereign fixture" |
functions
| 61 | func g_topic(k: i64) -> *u8 |
| 72 | func g_has(hay: *u8, needle: *u8) -> i64 { return inc_contains(hay, inc_slen(hay), needle) } |
| 74 | func g_result_has(g: *i64, r: *i64, name: *u8) -> i64 |
| 82 | func g_field(line: *u8, k: i64, dst: *u8, cap: i64) -> i64 |
| 99 | func main() -> i64 |