code wiki / _hdl_build / _galx_prod_ingest.nx

_galx_prod_ingest.nx

buildroot/runtime/_hdl_build/_galx_prod_ingest.nx

4058 B79 linesdepth 7pulls 10 transitivereach 0 importersview sourcekind tooltopic galx
docsdependenciesstructsconstsfunctions

about

_galx_prod_ingest.nx -- PRODUCTION corpus ingest driver (sovereign, idempotent, additive). Reads knowledge/status/galx_corpus_full.txt (one absolute PNG path per line) and ingests the LINE RANGE [start, start+count) via the proven nx_store_ingest_ingest_cid organ into the stable namespace "knowledge/store/galx-prod-", APPENDING <CID>\t<path> rows to the sidecar. The range arg lets the sovereign Nishi batch-runner (nx_galx_fill) drive the whole corpus in memory-bounded slices: one fresh process per slice, so the kernel reclaims all mmaps on exit (sys_munmap is unavailable, so process- batching is the sovereign memory bound -- NO bash split/awk). Usage: _galx_prod_ingest <start> <count> (no args = whole file). license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_store_ingest.nx nx_seg_store.nx nx_syscalls.nx _galx_prod_ingest.nx

imports: nx_store_ingest.nxnx_seg_store.nxnx_syscalls.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main gi_atoi sys_mmap sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close pw sys_write sys_exit sys_openat_append nx_store_ingest_ingest_cid sys_mmap ↻ nx_store_ingest_compute_ci sys_mmap ↻ nx_store_ingest_harvest sys_mmap ↻ _pe_pngchunk_rdbe _pe_pngtext_locate nx_store_ingest_keq canon_encode sys_mmap ↻ cc_cmp cc_w32 cc_len sys_munmap cid_of sys_mmap ↻ sha256_digest sys_mmap ↻ sha256_init sys_mmap ↻ sha256_k sha256_update sha256_compress_ni_blocks blk_set_byte sha256_compress sha256_final

structs

none

consts

none

functions

13func pw(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
called by 1: main calls 1: sys_write
14func pn(v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m}; let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=48;k=1}; while m>0{t[k]=(48+(m%10)) as u8;m=m/10;k=k+1}; var i: i64=0; while i<k{bb[i]=t[k-1-i];i=i+1}; sys_write(1,bb,k); return 0 }
called by 1: main calls 2: sys_mmapsys_write
15func gi_atoi(s: *u8) -> i64 { var v: i64=0; var i: i64=0; while s[i]!=(0 as u8){ if s[i]>=(48 as u8){ if s[i]<=(57 as u8){ v=v*10+((s[i]-(48 as u8)) as i64) } } i=i+1 } return v }
called by 1: main
17func main(argc: i64, argv: *i64) -> i64