code wiki / (root) / nx_bright_reasoned_import_gate.nx

nx_bright_reasoned_import_gate.nx source

↩ module page · 279 lines · 17460 B

1// nx_bright_reasoned_import_gate.nx -- GATE for nx_bright_reasoned_import (the referee-replay importer), driven 2// IN-PROCESS on a fixture tree under /tmp: a three-pair JSON whose key carries an escaped newline and whose value 3// carries an escaped quote, an escaped backslash, a two-byte \u escape, a surrogate-pair \u escape and an escaped 4// tab; a biology queries.tsv whose second row ends in CRLF; an economics queries.tsv whose only row has no rewrite 5// (the neg-control). Every expected byte string is BUILT at run time from named pieces and byte constants, so no 6// tooth depends on the lexer's escape contract. Proves: both walk passes agree on the pair count, the decoded key 7// equals the prep organ's flattened cell, the decoded value carries the exact UTF-8 bytes, reason and concat rows 8// are byte-exact, a CRLF row still matches, staging is idempotent, a BOM is skipped, an unmatched row is COUNTED 9// and the ONE decision function refuses it, an unreadable split refuses, a truncated object is malformed, and the 10// split table is nx_beir_eval's. license_tier: ORIGINAL No hw writes (Rule 26). 11import "nx_syscalls.nx" 12import "nx_gate_verdict.nx" 13import "nx_bright_reasoned_import.nx" 14 15const X_ROOT: *u8 = "/tmp/nx_bright_reasoned_import_gate" 16const X_BRIGHT: *u8 = "/tmp/nx_bright_reasoned_import_gate/bright" 17const X_D_BIO: *u8 = "/tmp/nx_bright_reasoned_import_gate/bright/biology" 18const X_D_ECON: *u8 = "/tmp/nx_bright_reasoned_import_gate/bright/economics" 19const X_Q_BIO: *u8 = "/tmp/nx_bright_reasoned_import_gate/bright/biology/queries.tsv" 20const X_Q_ECON: *u8 = "/tmp/nx_bright_reasoned_import_gate/bright/economics/queries.tsv" 21const X_JSON: *u8 = "/tmp/nx_bright_reasoned_import_gate/reasoned.json" 22const X_JSON_BOM: *u8 = "/tmp/nx_bright_reasoned_import_gate/reasoned_bom.json" 23const X_JSON_CUT: *u8 = "/tmp/nx_bright_reasoned_import_gate/reasoned_cut.json" 24const X_OUT_REASON: *u8 = "queries.fx_reason.tsv" 25const X_OUT_CONCAT: *u8 = "queries.fx_concat.tsv" 26const X_TMP_REASON: *u8 = "/tmp/nx_bright_reasoned_import_gate/bright/biology/queries.fx_reason.tsv.tmp" 27const X_TMP_CONCAT: *u8 = "/tmp/nx_bright_reasoned_import_gate/bright/biology/queries.fx_concat.tsv.tmp" 28const X_TMP_REASON2: *u8 = "/tmp/nx_bright_reasoned_import_gate/bright/biology/queries.fx_reason2.tsv.tmp" 29const X_OUT_REASON2: *u8 = "queries.fx_reason2.tsv" 30const X_MODE_DIR: i64 = 0x1ed 31const X_CELL: i64 = 8 32const X_CAP: i64 = 4096 33const X_PAIRS: i64 = 3 34const X_BOM_0: i64 = 0xEF 35const X_BOM_1: i64 = 0xBB 36const X_BOM_2: i64 = 0xBF 37const X_E_ACUTE_0: i64 = 0xC3 38const X_E_ACUTE_1: i64 = 0xA9 39const X_SMILE_0: i64 = 0xF0 40const X_SMILE_1: i64 = 0x9F 41const X_SMILE_2: i64 = 0x98 42const X_SMILE_3: i64 = 0x80 43// pieces: the JSON is spelled without any escape inside a literal; every backslash and quote is a byte constant 44const X_W_ALPHA: *u8 = "alpha" 45const X_W_BETA: *u8 = "beta" 46const X_W_GAMMA: *u8 = "gamma" 47const X_W_DELTA: *u8 = "delta" 48const X_W_SECOND: *u8 = "second" 49const X_W_UNUSED: *u8 = "unused" 50const X_W_V: *u8 = "v" 51const X_W_1: *u8 = "1" 52const X_W_TAIL: *u8 = "tail" 53const X_W_NOPE: *u8 = "nope" 54const X_W_ID0: *u8 = "0" 55const X_W_ID1: *u8 = "1" 56const X_H_E9: *u8 = "00e9" 57const X_H_D83D: *u8 = "d83d" 58const X_H_DE00: *u8 = "de00" 59const X_W_N: *u8 = "n" 60const X_W_T: *u8 = "t" 61const X_W_U: *u8 = "u" 62const X_SPLIT0: *u8 = "biology" 63const X_SPLIT11: *u8 = "theoremqa_theorems" 64 65func x_slen(s: *u8) -> i64 { var n: i64 = 0; while ((s[n] as i64) & RI_BYTE) != 0 { n = n + 1 } return n } 66func x_cat(dst: *u8, off: i64, s: *u8) -> i64 { let n: i64 = x_slen(s); var i: i64 = 0; while i < n { dst[off + i] = s[i]; i = i + 1 } dst[off + n] = 0 as u8; return off + n } 67func x_catb(dst: *u8, off: i64, b: i64) -> i64 { dst[off] = b as u8; dst[off + 1] = 0 as u8; return off + 1 } 68// an escaped byte in JSON spelling: backslash then the character 69func x_esc(dst: *u8, off: i64, s: *u8) -> i64 { var o: i64 = x_catb(dst, off, RI_BACKSLASH); return x_cat(dst, o, s) } 70func x_write(path: *u8, buf: *u8, n: i64) -> i64 { 71 let fd: i64 = sys_openat_wr(path, MODE_0644) 72 if fd < 0 { return RI_NONE } 73 var off: i64 = 0 74 while off < n { let r: i64 = sys_write(fd, ((buf as i64) + off) as *u8, n - off); if r <= 0 { sys_close(fd); return RI_NONE } off = off + r } 75 sys_close(fd) 76 return n 77} 78func x_read(path: *u8, lenp: *i64) -> *u8 { lenp[0] = 0; return sys_read_file(path, lenp) } 79func x_bytes_eq(a: *u8, an: i64, b: *u8, bn: i64) -> i64 { if an != bn { return 0 } return ri_memeq(a, b, an) } 80func x_file_eq(path: *u8, want: *u8, wn: i64) -> i64 { 81 let lp: *i64 = sys_mmap(X_CELL) as *i64 82 let got: *u8 = x_read(path, lp) 83 if (got as i64) == 0 { return 0 } 84 return x_bytes_eq(got, lp[0], want, wn) 85} 86// the value pair A decodes to: v " 1 \ SPACE e-acute SPACE smile SPACE t a i l 87func x_expect_value_a(dst: *u8) -> i64 { 88 var o: i64 = x_cat(dst, 0, X_W_V) 89 o = x_catb(dst, o, RI_QUOTE) 90 o = x_cat(dst, o, X_W_1) 91 o = x_catb(dst, o, RI_BACKSLASH) 92 o = x_catb(dst, o, RI_SPACE) 93 o = x_catb(dst, o, X_E_ACUTE_0) 94 o = x_catb(dst, o, X_E_ACUTE_1) 95 o = x_catb(dst, o, RI_SPACE) 96 o = x_catb(dst, o, X_SMILE_0) 97 o = x_catb(dst, o, X_SMILE_1) 98 o = x_catb(dst, o, X_SMILE_2) 99 o = x_catb(dst, o, X_SMILE_3) 100 o = x_catb(dst, o, RI_SPACE) 101 return x_cat(dst, o, X_W_TAIL) 102} 103// the key pair A decodes to: alpha SPACE beta 104func x_expect_key_a(dst: *u8) -> i64 { var o: i64 = x_cat(dst, 0, X_W_ALPHA); o = x_catb(dst, o, RI_SPACE); return x_cat(dst, o, X_W_BETA) } 105// the fixture JSON in JSON spelling; returns its length 106func x_build_json(dst: *u8, bom: i64) -> i64 { 107 var o: i64 = 0 108 if bom == 1 { o = x_catb(dst, o, X_BOM_0); o = x_catb(dst, o, X_BOM_1); o = x_catb(dst, o, X_BOM_2) } 109 o = x_catb(dst, o, RI_LBRACE) 110 o = x_catb(dst, o, RI_QUOTE); o = x_cat(dst, o, X_W_ALPHA); o = x_esc(dst, o, X_W_N); o = x_cat(dst, o, X_W_BETA); o = x_catb(dst, o, RI_QUOTE) 111 o = x_catb(dst, o, RI_COLON); o = x_catb(dst, o, RI_SPACE) 112 o = x_catb(dst, o, RI_QUOTE) 113 o = x_cat(dst, o, X_W_V); o = x_catb(dst, o, RI_BACKSLASH); o = x_catb(dst, o, RI_QUOTE); o = x_cat(dst, o, X_W_1) 114 o = x_catb(dst, o, RI_BACKSLASH); o = x_catb(dst, o, RI_BACKSLASH); o = x_catb(dst, o, RI_SPACE) 115 o = x_esc(dst, o, X_W_U); o = x_cat(dst, o, X_H_E9); o = x_catb(dst, o, RI_SPACE) 116 o = x_esc(dst, o, X_W_U); o = x_cat(dst, o, X_H_D83D); o = x_esc(dst, o, X_W_U); o = x_cat(dst, o, X_H_DE00) 117 o = x_esc(dst, o, X_W_T); o = x_cat(dst, o, X_W_TAIL) 118 o = x_catb(dst, o, RI_QUOTE) 119 o = x_catb(dst, o, RI_COMMA); o = x_catb(dst, o, RI_NL) 120 o = x_catb(dst, o, RI_QUOTE); o = x_cat(dst, o, X_W_GAMMA); o = x_catb(dst, o, RI_QUOTE); o = x_catb(dst, o, RI_COLON); o = x_catb(dst, o, RI_SPACE); o = x_catb(dst, o, RI_QUOTE); o = x_cat(dst, o, X_W_SECOND); o = x_catb(dst, o, RI_QUOTE) 121 o = x_catb(dst, o, RI_COMMA); o = x_catb(dst, o, RI_NL) 122 o = x_catb(dst, o, RI_QUOTE); o = x_cat(dst, o, X_W_DELTA); o = x_catb(dst, o, RI_QUOTE); o = x_catb(dst, o, RI_COLON); o = x_catb(dst, o, RI_SPACE); o = x_catb(dst, o, RI_QUOTE); o = x_cat(dst, o, X_W_UNUSED); o = x_catb(dst, o, RI_QUOTE) 123 o = x_catb(dst, o, RI_NL); o = x_catb(dst, o, RI_RBRACE); o = x_catb(dst, o, RI_NL) 124 return o 125} 126// biology queries.tsv: 0 TAB alpha SPACE beta NL, 1 TAB gamma CR NL (the second row edited on another host) 127func x_build_q_bio(dst: *u8) -> i64 { 128 var o: i64 = x_cat(dst, 0, X_W_ID0); o = x_catb(dst, o, RI_TAB); o = x_cat(dst, o, X_W_ALPHA); o = x_catb(dst, o, RI_SPACE); o = x_cat(dst, o, X_W_BETA); o = x_catb(dst, o, RI_NL) 129 o = x_cat(dst, o, X_W_ID1); o = x_catb(dst, o, RI_TAB); o = x_cat(dst, o, X_W_GAMMA); o = x_catb(dst, o, RI_CR); o = x_catb(dst, o, RI_NL) 130 return o 131} 132func x_build_q_econ(dst: *u8) -> i64 { var o: i64 = x_cat(dst, 0, X_W_ID0); o = x_catb(dst, o, RI_TAB); o = x_cat(dst, o, X_W_NOPE); return x_catb(dst, o, RI_NL) } 133// expected reason output: 0 TAB valueA NL 1 TAB second NL 134func x_expect_reason(dst: *u8, va: *u8, val: i64) -> i64 { 135 var o: i64 = x_cat(dst, 0, X_W_ID0); o = x_catb(dst, o, RI_TAB) 136 var i: i64 = 0; while i < val { dst[o] = va[i]; o = o + 1; i = i + 1 } 137 o = x_catb(dst, o, RI_NL); o = x_cat(dst, o, X_W_ID1); o = x_catb(dst, o, RI_TAB); o = x_cat(dst, o, X_W_SECOND); return x_catb(dst, o, RI_NL) 138} 139// expected concat output: 0 TAB alpha SPACE beta SPACE valueA NL 1 TAB gamma SPACE second NL 140func x_expect_concat(dst: *u8, va: *u8, val: i64) -> i64 { 141 var o: i64 = x_cat(dst, 0, X_W_ID0); o = x_catb(dst, o, RI_TAB); o = x_cat(dst, o, X_W_ALPHA); o = x_catb(dst, o, RI_SPACE); o = x_cat(dst, o, X_W_BETA); o = x_catb(dst, o, RI_SPACE) 142 var i: i64 = 0; while i < val { dst[o] = va[i]; o = o + 1; i = i + 1 } 143 o = x_catb(dst, o, RI_NL); o = x_cat(dst, o, X_W_ID1); o = x_catb(dst, o, RI_TAB); o = x_cat(dst, o, X_W_GAMMA); o = x_catb(dst, o, RI_SPACE); o = x_cat(dst, o, X_W_SECOND); return x_catb(dst, o, RI_NL) 144} 145// decode the fixture at path into fresh tables; returns pairs (RI_NONE malformed); the tables come back through out[] 146func x_decode(path: *u8, out: *i64) -> i64 { 147 let lp: *i64 = sys_mmap(X_CELL) as *i64 148 let raw: *u8 = x_read(path, lp) 149 if (raw as i64) == 0 { return RI_NONE } 150 let n: i64 = lp[0] 151 let none: *i64 = sys_mmap(X_CELL) as *i64 152 let pairs: i64 = ri_walk(raw, n, RI_MODE_COUNT, none, none, none, none, raw, none) 153 out[0] = pairs 154 if pairs <= 0 { return pairs } 155 let koff: *i64 = sys_mmap(pairs * RI_CELL) as *i64 156 let klen: *i64 = sys_mmap(pairs * RI_CELL) as *i64 157 let voff: *i64 = sys_mmap(pairs * RI_CELL) as *i64 158 let vlen: *i64 = sys_mmap(pairs * RI_CELL) as *i64 159 let alen: i64 = n + pairs + pairs + RI_ARENA_SLACK 160 let arena: *u8 = sys_mmap(alen) 161 let ap: *i64 = sys_mmap(RI_CELL) as *i64 162 ap[0] = 0 163 let p2: i64 = ri_walk(raw, n, RI_MODE_DECODE, koff, klen, voff, vlen, arena, ap) 164 out[1] = p2 165 out[2] = koff as i64 166 out[3] = klen as i64 167 out[4] = voff as i64 168 out[5] = vlen as i64 169 out[6] = arena as i64 170 out[7] = alen 171 out[8] = ap[0] 172 return pairs 173} 174 175func main() -> i64 { 176 gv_head("=== nx_bright_reasoned_import_gate -- the referee-replay importer proven on a built fixture tree ===" as *u8) 177 let c: *i64 = gv_ctr() 178 sys_mkdir(X_ROOT, X_MODE_DIR) 179 sys_mkdir(X_BRIGHT, X_MODE_DIR) 180 sys_mkdir(X_D_BIO, X_MODE_DIR) 181 sys_mkdir(X_D_ECON, X_MODE_DIR) 182 // ---- fixtures ---- 183 let jb: *u8 = sys_mmap(X_CAP) 184 let jn: i64 = x_build_json(jb, 0) 185 let jbb: *u8 = sys_mmap(X_CAP) 186 let jbn: i64 = x_build_json(jbb, 1) 187 let qb: *u8 = sys_mmap(X_CAP) 188 let qbn: i64 = x_build_q_bio(qb) 189 let qe: *u8 = sys_mmap(X_CAP) 190 let qen: i64 = x_build_q_econ(qe) 191 gv_check("fixture-json-written" as *u8, (x_write(X_JSON, jb, jn) == jn) as i64, c) 192 gv_check("fixture-json-with-bom-written" as *u8, (x_write(X_JSON_BOM, jbb, jbn) == jbn) as i64, c) 193 gv_check("fixture-json-truncated-written" as *u8, (x_write(X_JSON_CUT, jb, jn - 3) == jn - 3) as i64, c) 194 gv_check("fixture-biology-queries-written" as *u8, (x_write(X_Q_BIO, qb, qbn) == qbn) as i64, c) 195 gv_check("fixture-economics-queries-written" as *u8, (x_write(X_Q_ECON, qe, qen) == qen) as i64, c) 196 gv_check("fixture-reached-the-condition-second-biology-row-ends-in-crlf" as *u8, (((qb[qbn - 2] as i64) & RI_BYTE) == RI_CR) as i64, c) 197 // ---- the walk: both passes agree, the decoded strings are the prep organ's cells ---- 198 let t: *i64 = sys_mmap(RI_CELL * 12) as *i64 199 let pairs: i64 = x_decode(X_JSON, t) 200 gv_kv("pairs_count_pass" as *u8, t[0]) 201 gv_kv("pairs_decode_pass" as *u8, t[1]) 202 gv_kv("decoded_bytes" as *u8, t[8]) 203 gv_check_eq("count-pass-sees-three-pairs" as *u8, t[0], X_PAIRS, c) 204 gv_check_eq("decode-pass-agrees-with-count-pass" as *u8, t[1], t[0], c) 205 let koff: *i64 = t[2] as *i64 206 let klen: *i64 = t[3] as *i64 207 let voff: *i64 = t[4] as *i64 208 let vlen: *i64 = t[5] as *i64 209 let arena: *u8 = t[6] as *u8 210 let ka: *u8 = sys_mmap(X_CAP) 211 let kan: i64 = x_expect_key_a(ka) 212 gv_check("key-with-escaped-newline-decodes-to-the-flattened-cell" as *u8, x_bytes_eq(((arena as i64) + koff[0]) as *u8, klen[0], ka, kan), c) 213 gv_check("second-key-decodes-plain" as *u8, x_bytes_eq(((arena as i64) + koff[1]) as *u8, klen[1], X_W_GAMMA, x_slen(X_W_GAMMA)), c) 214 let va: *u8 = sys_mmap(X_CAP) 215 let van: i64 = x_expect_value_a(va) 216 gv_kv("value_a_expected_bytes" as *u8, van) 217 gv_kv("value_a_decoded_bytes" as *u8, vlen[0]) 218 gv_check("value-decodes-quote-backslash-u00e9-surrogate-pair-and-tab-byte-exact" as *u8, x_bytes_eq(((arena as i64) + voff[0]) as *u8, vlen[0], va, van), c) 219 gv_check("decoded-value-carries-the-four-byte-smile" as *u8, (vlen[0] > 12) as i64, c) 220 // ---- find: exact match, and the CRLF row's text (without its CR) matches ---- 221 gv_check_eq("find-locates-the-flattened-key" as *u8, ri_find(ka, kan, arena, koff, klen, pairs), 0, c) 222 gv_check_eq("find-refuses-an-unknown-text" as *u8, ri_find(X_W_NOPE, x_slen(X_W_NOPE), arena, koff, klen, pairs), RI_NONE, c) 223 // ---- stage biology in reason mode ---- 224 let used: *i64 = sys_mmap(pairs * RI_CELL) as *i64 225 let st: *i64 = sys_mmap(RI_CELL * 3) as *i64 226 let tmpp: *u8 = sys_mmap(RI_PATH_CAP) 227 let outp: *u8 = sys_mmap(RI_PATH_CAP) 228 let r1: i64 = ri_stage_split(X_BRIGHT, X_SPLIT0, X_OUT_REASON, 0, arena, t[7], koff, klen, voff, vlen, used, pairs, st, tmpp, outp) 229 gv_kv("reason_staged_bytes" as *u8, r1) 230 gv_check("reason-stage-returns-bytes" as *u8, (r1 > 0) as i64, c) 231 gv_check_eq("reason-stage-rows" as *u8, st[0], 2, c) 232 gv_check_eq("reason-stage-matched-including-the-crlf-row" as *u8, st[1], 2, c) 233 gv_check_eq("reason-stage-missed" as *u8, st[2], 0, c) 234 gv_check("reason-stage-tmp-path-is-the-declared-one" as *u8, ri_streq(tmpp, X_TMP_REASON), c) 235 let er: *u8 = sys_mmap(X_CAP) 236 let ern: i64 = x_expect_reason(er, va, van) 237 gv_check("reason-rows-are-byte-exact-id-tab-rewrite-nl" as *u8, x_file_eq(X_TMP_REASON, er, ern), c) 238 // ---- stage biology in concat mode ---- 239 let used2: *i64 = sys_mmap(pairs * RI_CELL) as *i64 240 let r2: i64 = ri_stage_split(X_BRIGHT, X_SPLIT0, X_OUT_CONCAT, 1, arena, t[7], koff, klen, voff, vlen, used2, pairs, st, tmpp, outp) 241 gv_kv("concat_staged_bytes" as *u8, r2) 242 let ec: *u8 = sys_mmap(X_CAP) 243 let ecn: i64 = x_expect_concat(ec, va, van) 244 gv_check("concat-rows-are-byte-exact-id-tab-original-space-rewrite-nl" as *u8, x_file_eq(X_TMP_CONCAT, ec, ecn), c) 245 gv_check("concat-rows-are-longer-than-reason-rows-by-the-originals" as *u8, (r2 == r1 + kan + 1 + x_slen(X_W_GAMMA) + 1) as i64, c) 246 // ---- key census after staging biology: alpha and gamma used once, delta unused ---- 247 gv_check_eq("key-alpha-used-once" as *u8, used[0], 1, c) 248 gv_check_eq("key-gamma-used-once" as *u8, used[1], 1, c) 249 gv_check_eq("key-delta-unused" as *u8, used[2], 0, c) 250 // ---- idempotence: a second reason stage is byte-identical ---- 251 let used3: *i64 = sys_mmap(pairs * RI_CELL) as *i64 252 let r3: i64 = ri_stage_split(X_BRIGHT, X_SPLIT0, X_OUT_REASON2, 0, arena, t[7], koff, klen, voff, vlen, used3, pairs, st, tmpp, outp) 253 gv_check_eq("second-stage-same-bytes" as *u8, r3, r1, c) 254 gv_check("second-stage-file-identical" as *u8, x_file_eq(X_TMP_REASON2, er, ern), c) 255 // ---- neg-control: a row with no rewrite is counted as missed and the decision refuses ---- 256 let usedn: *i64 = sys_mmap(pairs * RI_CELL) as *i64 257 let rn: i64 = ri_stage_split(X_BRIGHT, "economics" as *u8, X_OUT_REASON, 0, arena, t[7], koff, klen, voff, vlen, usedn, pairs, st, tmpp, outp) 258 gv_check("neg-control-unmatched-split-still-stages-its-matched-rows" as *u8, (rn >= 0) as i64, c) 259 gv_check_eq("neg-control-unmatched-row-rows" as *u8, st[0], 1, c) 260 gv_check_eq("neg-control-unmatched-row-matched" as *u8, st[1], 0, c) 261 gv_check_eq("neg-control-unmatched-row-missed" as *u8, st[2], 1, c) 262 gv_check_eq("neg-control-decision-refuses-a-miss" as *u8, ri_decide(1, 0), RI_REFUSED, c) 263 gv_check_eq("neg-control-decision-refuses-an-unreadable-split" as *u8, ri_decide(0, 1), RI_REFUSED, c) 264 gv_check_eq("decision-accepts-a-full-match" as *u8, ri_decide(0, 0), RI_OK, c) 265 // ---- neg-control: an absent split directory is unreadable, not silently empty ---- 266 let usedu: *i64 = sys_mmap(pairs * RI_CELL) as *i64 267 let ru: i64 = ri_stage_split(X_BRIGHT, "pony" as *u8, X_OUT_REASON, 0, arena, t[7], koff, klen, voff, vlen, usedu, pairs, st, tmpp, outp) 268 gv_check_eq("neg-control-absent-split-reads-unreadable" as *u8, ru, RI_NONE, c) 269 // ---- a BOM is skipped; a truncated object is malformed ---- 270 let tb: *i64 = sys_mmap(RI_CELL * 12) as *i64 271 gv_check_eq("bom-prefixed-object-still-parses-three-pairs" as *u8, x_decode(X_JSON_BOM, tb), X_PAIRS, c) 272 let tc: *i64 = sys_mmap(RI_CELL * 12) as *i64 273 gv_check_eq("neg-control-truncated-object-is-malformed" as *u8, x_decode(X_JSON_CUT, tc), RI_NONE, c) 274 // ---- the split table is nx_beir_eval's twelve ---- 275 gv_check("split-table-first-is-biology" as *u8, ri_streq(ri_split(0), X_SPLIT0), c) 276 gv_check("split-table-last-is-theoremqa-theorems" as *u8, ri_streq(ri_split(11), X_SPLIT11), c) 277 gv_check_eq("split-table-has-twelve" as *u8, RI_SPLITS, 12, c) 278 return gv_verdict("nx_bright_reasoned_import_gate" as *u8, c, "referee-replay importer: decode, match, stage, refuse" as *u8) 279}