code wiki / _hdl_build / nx_cc_ingest.nx
nx_cc_ingest.nx
buildroot/runtime/_hdl_build/nx_cc_ingest.nx
about
nx_cc_ingest.nx -- THE CC BRIDGE: ingest REAL Common Crawl records into the web scope, INDEX-ONLY, serve-LIVE.
Per the operator's July-2026 architecture (store index not pages; link the live url; CC = index-source + rot
fallback): CDX-query CC-MAIN-2026-25 for <domain> -> for each record: range-fetch the exact byte-slice ->
gz-inflate the member -> pull the HTTP body out of the WARC record -> html->text -> ss_add into dp-web-pub-:
doc:<cid> = extracted TEXT (snippet + BM25; NOT the full page) ยท url:<cid> = the LIVE captured url
loc:<cid> = "<warcfile>|<offset>|<length>" = the CDX locator for the rot-fallback (dead-live re-fetch)
Idempotent by content cid. Composes nx_commoncrawl_query's endpoint + nx_https_fetch_range + nx_gzip_inflate +
nx_html_to_text + the seg_store writer. usage: nx_cc_ingest <domain> [max_records]. license_tier: ORIGINAL
dependencies 6 imports · 0 importers
imports: nx_corpus_ingest.nxnx_x509_trust_store.nxnx_trust_store_load_from_certdata.nxnx_https_fetch_follow.nxnx_gzip_wrap.nxnx_outlink_harvest.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
| none |
functions
| 16 | func gw(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 |
| 17 | func gn(v: i64) -> i64 { if v==0 { sys_write(1,"0" as *u8,1); return 0 } var m: i64=v; if m<0 { sys_write(1,"-" as *u8,1); m=0-m } let t: *u8=sys_mmap(24); var k: i64=0; while m>0 { t[k]=(48+(m%10)) as u8; m=m/10; k=k+1 } let o: *u8=sys_mmap(24); var q: i64=k-1; var x: i64=0; while q>=0 { o[x]=t[q]; x=x+1; q=q-1 } sys_write(1,o,x); return 0 } called by 1: main |
| 18 | func slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } |
| 19 | func atoin(s: *u8) -> i64 { var v: i64=0; var i: i64=0; while s[i]!=(0 as u8){ let c: i64=s[i] as i64; if c>=48 { if c<=57 { v=v*10+(c-48) } } i=i+1 } return v } called by 1: main |
| 21 | func json_str(hay: *u8, hn: i64, key: *u8, out: *u8, cap: i64) -> i64 calls 1: slen |
| 46 | func warc_body_start(b: *u8, n: i64) -> i64 called by 1: main |
| 58 | func mk_lockey(cid: i64, out: *u8) -> i64 called by 1: main |
| 66 | func main(argc: i64, argv: *i64) -> i64 |