code wiki / _hdl_build / nx_nist_ingest.nx
nx_nist_ingest.nx
buildroot/runtime/_hdl_build/nx_nist_ingest.nx
about
nx_nist_ingest.nx -- NAS-side STRUCTURED ingester for NIST's data.nist.gov RMM DCAT catalog.
Pages the RMM API (sovereign fetch cascade), splits ResultData[] into per-dataset NERDm records,
prepends a clean title line, and ingests each into the domain's PUBLIC seg_store corpus via
dp_ingest -- the IDENTICAL path the docportal admin ingest uses (auto .terms BM25 => instantly
searchable by nishi_search / researcher / census). Idempotent (segid=CID): re-ingest is a no-op.
Runs in the tools-daemon (nishihost) CWD: data/mozilla_certdata.txt AND knowledge/store/ both resolve.
Reuses nx_fetch_any (S1 sovereign TLS cascade -> S2 Firefox-spoof) + dp_ingest. Nothing hand-rolled
that already exists. Anti-overfit: the record source is DCAT/schema.org (standard), so the same
splitter generalizes to any DCAT catalog (data.gov, EU portals).
usage: nx_nist_ingest <domain> <pages> [size] e.g. nx_nist_ingest nishifamily.com 3 100
license_tier: ORIGINAL | genealogy_id: nishi_nist_ingest_2026_07_14
dependencies 6 imports · 0 importers
imports: nx_syscalls.nxnx_x509_trust_store.nxnx_trust_store_load_from_certdata.nxnx_https_fetch_follow.nxnx_fetch_any.nxnx_docportal_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
| 20 | const K_MAGIC_4194304: i64 = 4194304 |
| 21 | const K_MAGIC_8388608: i64 = 8388608 |
| 22 | const K_MAGIC_8192: i64 = 8192 |
| 23 | const K_MAGIC_524288: i64 = 524288 |
functions
| 25 | func ni_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 27 | func ni_putn(v: i64) -> i64 |
| 42 | func ni_find(hay: *u8, hl: i64, start: i64, needle: *u8, nl: i64) -> i64 called by 1: main |
| 56 | func ni_atoi(s: *u8) -> i64 called by 1: main |
| 68 | func ni_scat(buf: *u8, o: i64, s: *u8) -> i64 called by 1: ni_build_url |
| 75 | func ni_ncat(buf: *u8, o: i64, v: i64) -> i64 calls 1: sys_mmap |
| 86 | func ni_build_url(buf: *u8, size: i64, page: i64) -> i64 |
| 99 | func ni_ingest_record(domain: *u8, out: *u8, hl: i64, recstart: i64, recend: i64, doc: *u8, cidp: *i64) -> i64 |
| 122 | func main(argc: i64, argv: *i64) -> i64 |