code wiki / _hdl_build / nx_docportal_ingest_gate.nx

nx_docportal_ingest_gate.nx

buildroot/runtime/_hdl_build/nx_docportal_ingest_gate.nx

7714 B133 linesdepth 6pulls 18 transitivereach 0 importersview sourcekind gate/prooftopic docportal
docsdependenciesstructsconstsfunctions

about

nx_docportal_ingest_gate.nx -- the REAL, MEASURED gate for the per-domain document-portal ingest primitive. Self-contained (in-process; no forked CLI, no /tmp staging) per the sovereign-exec doctrine: it drives dp_ingest/dp_read directly against the sovereign seg_store and MEASURES the exceed dimensions of the standard (knowledge/research/2026-06-28-legaldocs-portal-exceed-standard.md): T1 PUBLIC ingest -> stored byte-exact in the public shard AND findable via the SOVEREIGN store-native search (dss_search over the shard's own .terms postings -- NO derived tsv). T2 PRIVATE isolation -> stored in the private shard, NOT in the public shard, and a public dss_search for a private-only term returns 0 (the -prv- shard is physically never opened). [dim #3] T3 CID determinism -> re-ingesting identical bytes yields the SAME content id (idempotent). [dimension #8] T4 cross-domain -> a doc in domain dptest is NOT readable from domain dpother's shard. [dimension #6] T5 integrity -> the private doc reads back byte-exact (immutable, never-delete). [dimension #2] Verdict MEASURED from real store reads + live queries, never asserted. GREEN iff 5/5. Appends to knowledge/status/docportal_ingest_gate.log. license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_docportal_lib.nx nx_g_puts_lib.nx nx_docportal_search_seg.nx nx_docportal_ingest_gate.nx

imports: nx_docportal_lib.nxnx_g_puts_lib.nxnx_docportal_search_seg.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 dp_len dp_ingest dp_ingest_policy dpr_http_body dpr_load_conf dpr_conf_one lc_geti dpr_find_ci dpr_lc dpr_is_html dpr_load_conf ↻ dpr_http_body ↻ dpr_find_ci ↻ 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 ↻ bd_fit_text bd_load_conf bd_conf_one lc_geti ↻ bd_count_lt sys_mmap ↻ bd_scan bd_set bd_rec

structs

none

consts

none

functions

18func g_num(v: i64) -> i64
called by 1: main
26func g_w(fd: i64, s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(fd, s, n); return 0 }
called by 1: main
27func g_wn(fd: i64, v: i64) -> i64
called by 1: main
34func g_eq(a: *u8, al: i64, b: *u8, bl: i64) -> i64 { if al != bl { return 0 } var i: i64 = 0; while i < al { if a[i] != b[i] { return 0 } i = i + 1 } return 1 }
called by 1: main
35func g_contains(hay: *u8, n: i64, ndl: *u8, nl: i64) -> i64
47func g_search1(domain: *u8, term: *u8, topout: *i64) -> i64
called by 1: main calls 1: dss_search
56func main() -> i64