nx_parquet_gate.nx
buildroot/runtime/nx_parquet_gate.nx
about
nx_parquet_gate.nx -- GATE for the sovereign parquet reader (nx_parquet_lib), driven IN-PROCESS.
Every wire rule the reader relies on is proven on PLANTED bytes with a known answer and a neg-control that must
refuse: thrift varints and zigzag (a 150, a -1, an eleven-byte overrun, a truncated one), field headers (short and
long form, delta accumulation, STOP), list headers (short and long form), the container skipper (a nested struct,
a map, and a nesting deeper than the bound), the RLE and bit-packed hybrid (an RLE run, a bit-packed group, a mixed
stream, width zero, a truncated run, a count over capacity), snappy (literal plus copies of all three offset widths,
an overlapping copy, an offset before the buffer, a declared length the stream does not produce, an output that
does not fit), and pq_open (not a parquet file, a footer length past the file, a truncated tail, a footer length
bumped by five bytes). Then the REAL bytes: the BRIGHT pony examples and documents files (search.refs brightds26,
pinned in knowledge/fetched) must reproduce the counts the dataset card declares (112 examples, 7894 documents),
resolve a list column by its column name and not by its element name, reconstruct 2219 gold_ids over 112 rows with
repetition levels, decode the first query and the first ids to their known bytes, refuse an out-of-range leaf or row
group, and write the documents TSV deterministically (two writes byte-identical, 7894 rows, no null rows, the first
row starting with the first document id). The real-file teeth SKIP, never acquit, when the fixtures are absent.
license_tier: ORIGINAL No hw writes (Rule 26).
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_gate_verdict.nxnx_parquet_lib.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
| 21 | const G_ROOT: *u8 = "/tmp/nx_parquet_gate" |
| 22 | const G_NOTPQ: *u8 = "/tmp/nx_parquet_gate/not_parquet.bin" |
| 23 | const G_BADLEN: *u8 = "/tmp/nx_parquet_gate/footer_past_eof.parquet" |
| 24 | const G_TRUNC: *u8 = "/tmp/nx_parquet_gate/truncated.parquet" |
| 25 | const G_BUMPED: *u8 = "/tmp/nx_parquet_gate/footer_bumped.parquet" |
| 26 | const G_TSV_A: *u8 = "/tmp/nx_parquet_gate/docs_a.tsv" |
| 27 | const G_TSV_B: *u8 = "/tmp/nx_parquet_gate/docs_b.tsv" |
| 28 | const G_EX_A: *u8 = "knowledge/fetched/cmp_search_bright_examples_pony.parquet" |
| 29 | const G_EX_B: *u8 = "../knowledge/fetched/cmp_search_bright_examples_pony.parquet" |
| 30 | const G_DOC_A: *u8 = "knowledge/fetched/cmp_search_bright_documents_pony.parquet" |
| 31 | const G_DOC_B: *u8 = "../knowledge/fetched/cmp_search_bright_documents_pony.parquet" |
| 32 | const G_NOTPQ_BYTES: *u8 = "hello world, not a parquet file" |
| 33 | const G_MODE_DIR: i64 = 0x1ed |
| 34 | const G_I64: i64 = 8 |
| 35 | const G_FIX_CAP: i64 = 128 |
| 36 | const G_OUT_CAP: i64 = 64 |
| 37 | const G_OUT_SMALL: i64 = 4 |
| 38 | const G_TRUNC_KEEP: i64 = 20000 |
| 39 | const G_BUMP: i64 = 5 |
| 40 | const G_DEEP: i64 = 70 |
| 41 | const G_CH_A: i64 = 97 |
| 42 | const G_CH_B: i64 = 98 |
| 43 | const G_CH_C: i64 = 99 |
| 44 | const G_CH_D: i64 = 100 |
| 45 | const G_CH_E: i64 = 101 |
| 46 | const G_CH_F: i64 = 102 |
| 47 | const G_CH_X: i64 = 120 |
| 48 | const G_CH_Z: i64 = 122 |
| 49 | const G_BAD_LEAF: i64 = 99 |
| 50 | const G_BAD_RG: i64 = 5 |
| 52 | const G_EX_ROWS: i64 = 112 |
| 53 | const G_EX_LEAVES: i64 = 7 |
| 54 | const G_EX_RGS: i64 = 1 |
| 55 | const G_EX_LEAF_QUERY: i64 = 0 |
| 56 | const G_EX_LEAF_ID: i64 = 2 |
| 57 | const G_EX_LEAF_GOLD: i64 = 5 |
| 58 | const G_EX_GOLD_ENTRIES: i64 = 2219 |
| 59 | const G_EX_GOLD_DICT: i64 = 43 |
| 60 | const G_EX_PAGES: i64 = 2 |
| 61 | const G_EX_ENCMASK_RLE_DICT: i64 = 256 |
| 62 | const G_EX_QUERY0_LEN: i64 = 237 |
| 63 | const G_QUERY_PREFIX: *u8 = "I will use the programming language pony" |
| 64 | const G_DOC_ROWS: i64 = 7894 |
| 65 | const G_DOC_RGS: i64 = 8 |
| 66 | const G_DOC_LEAVES: i64 = 2 |
| 67 | const G_DOC_TSV_BYTES: i64 = 2317793 |
| 68 | const G_DOC_FIRST_ID: *u8 = "Pony/src-builtin-runtime_options-_1.txt" |
| 69 | const G_SNAPPY_OUT: *u8 = "abcdefabcdz" |
| 70 | const G_SNAPPY_OUT_LEN: i64 = 11 |
| 71 | const G_SNAPPY2_OUT: *u8 = "abcdabcd" |
| 72 | const G_SNAPPY2_OUT_LEN: i64 = 8 |
| 73 | const G_SNAPPY3_OUT: *u8 = "aaaaa" |
| 74 | const G_SNAPPY3_OUT_LEN: i64 = 5 |
| 75 | const G_HYBRID_N: i64 = 8 |
| 76 | const G_HYBRID_MIXED_N: i64 = 10 |
| 77 | const G_RLE_N: i64 = 5 |
| 78 | const G_RLE_VALUE: i64 = 3 |
| 79 | const G_VARINT_150: i64 = 150 |
| 80 | const G_LIST_LONG: i64 = 20 |
functions
| 82 | func g_slen(s: *u8) -> i64 |
| 87 | func g_write_bytes(path: *u8, buf: *u8, n: i64) -> i64 |
| 100 | func g_starts(buf: *u8, off: i64, len: i64, s: *u8) -> i64 |
| 107 | func g_bytes_are(buf: *u8, off: i64, len: i64, s: *u8) -> i64 |
| 111 | func g_files_equal(a: *u8, b: *u8) -> i64 |
| 126 | func g_open2(pq: *i64, a: *u8, b: *u8) -> i64 |
| 132 | func g_read2(a: *u8, b: *u8, lenp: *i64) -> *u8 |
| 140 | func main() -> i64 |