code wiki / _hdl_build / nx_corpus_ingest_gate.nx
nx_corpus_ingest_gate.nx
buildroot/runtime/_hdl_build/nx_corpus_ingest_gate.nx
about
nx_corpus_ingest_gate.nx -- GATE for the corpus-ingest front door (dir -> searchable sovereign shard).
Builds a real test dir (/tmp) with: a raw .txt, an .html (tags/script/entities exercise nx_html_to_text),
a .bak (must be skipped), and TWO ~600KB files (forces the 1MB writer to batch across >=2 segments).
Assertions are RUN-INDEPENDENT (content-addressed skip-if-present makes re-runs clean): search truths +
the persisted manifest segment count, never per-run counters alone. On the gate base class (gv_check /
gv_verdict) since 2026-09-14 so /api/promote and /api/gate_run read the verdict from the exit code.
license_tier: ORIGINAL expect_exit: 0
dependencies 3 imports · 0 importers
imports: nx_corpus_ingest.nxnx_g_puts_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
| 42 | const G_MODE_DIR: i64 = 0x1ed |
| 43 | const G_COUNTS: i64 = 64 |
| 44 | const G_PREFIXBUF: i64 = 512 |
| 45 | const G_KEYBUF: i64 = 64 |
| 46 | const G_BOX: i64 = 16 |
| 47 | const G_TOP: i64 = 10 |
| 48 | const G_TREE_PRESENT: i64 = 7 // the tree fixture on a re-run: 4 files present (x.nx y.md w.nx b.plan) + b.plan's 3 rows (E3b), rows are content-addressed documents too |
| 49 | const G_JOURNAL_BYTES: i64 = 1000000 // T12: a journal fixture LARGER than CI_DOCCAP, so only its tail window can be the document |
| 50 | const G_JOURNAL_TAILROOM: i64 = 32 // bytes held back for the tail marker |
functions
| 12 | func g_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 13 | func g_num(v: i64) -> i64 called by 1: main |
| 22 | func g_contains(hay: *u8, hn: i64, needle: *u8) -> i64 |
| 35 | func g_write(path: *u8, data: *u8, n: i64) -> i64 called by 1: main |
| 52 | func main() -> i64 |