code wiki / _hdl_build / nx_nist_ingest.nx

nx_nist_ingest.nx

buildroot/runtime/_hdl_build/nx_nist_ingest.nx

7226 B175 linesdepth 23pulls 155 transitivereach 0 importersview sourcekind tooltopic nist
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_x509_trust_store.nx nx_trust_store_load_from_certdata. nx_https_fetch_follow.nx nx_fetch_any.nx nx_docportal_lib.nx nx_nist_ingest.nx

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

main ni_puts sys_write ni_atoi nx_trust_store_load_from_c sys_mmap sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close nx_nss_certdata_parse sys_mmap ↻ _pat_class_cert _pat_value_octal _pat_end _find_newline _starts_with _parse_octal_line sys_mmap ↻ _is_space _decode_octal_escape _is_octal trust_store_alloc sys_mmap ↻ nx_x509_trust_store_load sys_mmap ↻ x509_parse sys_mmap ↻ asn1_cursor_init asn1_expect_tag sys_mmap ↻ asn1_read_tlv_header asn1_read_tag asn1_read_length asn1_read_length ↻ x509_read_tlv sys_mmap ↻ asn1_expect_tag ↻

structs

none

consts

20const K_MAGIC_4194304: i64 = 4194304
21const K_MAGIC_8388608: i64 = 8388608
22const K_MAGIC_8192: i64 = 8192
23const K_MAGIC_524288: i64 = 524288

functions

25func 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 }
called by 1: main calls 1: sys_write
27func ni_putn(v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
42func ni_find(hay: *u8, hl: i64, start: i64, needle: *u8, nl: i64) -> i64
called by 1: main
56func ni_atoi(s: *u8) -> i64
called by 1: main
68func ni_scat(buf: *u8, o: i64, s: *u8) -> i64
called by 1: ni_build_url
75func ni_ncat(buf: *u8, o: i64, v: i64) -> i64
calls 1: sys_mmap
86func ni_build_url(buf: *u8, size: i64, page: i64) -> i64
called by 1: main calls 2: ni_scatdp_ingest
99func ni_ingest_record(domain: *u8, out: *u8, hl: i64, recstart: i64, recend: i64, doc: *u8, cidp: *i64) -> i64
122func main(argc: i64, argv: *i64) -> i64