code wiki / _hdl_build / nx_corpus_ingest_gate.nx

nx_corpus_ingest_gate.nx

buildroot/runtime/_hdl_build/nx_corpus_ingest_gate.nx

22657 B341 linesdepth 6pulls 15 transitivereach 0 importersview sourcekind gate/prooftopic corpus
docsdependenciesstructsconstsfunctions

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

nx_corpus_ingest.nx nx_g_puts_lib.nx nx_gate_verdict.nx nx_corpus_ingest_gate.nx

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

main g_puts sys_write gv_ctr sys_mmap nxa_die sys_write ↻ sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ g_write g_len ci_run dss_prefix ci_state_new ss_begin ss_begin_cap sys_mmap ↻ ci_next_segid ss_next_segid ss_max_segid sys_mmap ↻ ss_cat ss_readall ss_segid_ok ss_open ss_open2 ss_open3 sys_now_us sys_mmap ↻ ss_manifest_dyn

structs

none

consts

42const G_MODE_DIR: i64 = 0x1ed
43const G_COUNTS: i64 = 64
44const G_PREFIXBUF: i64 = 512
45const G_KEYBUF: i64 = 64
46const G_BOX: i64 = 16
47const G_TOP: i64 = 10
48const 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
49const G_JOURNAL_BYTES: i64 = 1000000 // T12: a journal fixture LARGER than CI_DOCCAP, so only its tail window can be the document
50const G_JOURNAL_TAILROOM: i64 = 32 // bytes held back for the tail marker

functions

12func g_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 2: g_containsmain
13func g_num(v: i64) -> i64
called by 1: main
22func g_contains(hay: *u8, hn: i64, needle: *u8) -> i64
called by 1: main calls 1: g_len
35func g_write(path: *u8, data: *u8, n: i64) -> i64
called by 1: main
52func main() -> i64