code wiki / _hdl_build / nx_page_ingest.nx
nx_page_ingest.nx
buildroot/runtime/_hdl_build/nx_page_ingest.nx
about
nx_page_ingest.nx -- ENTITY-DEPTH live ingester: ONE operator-chosen seed page + up to N of its
SAME-HOST outlinks -> the dp-web-pub- web shard. The targeted complement to the bulk CC pipeline
(breadth) and the frontier crawler (which stalls on stale frontiers -- debt seq628): every URL here
is FRESH (seed + its own live links), fetches are sequential + politely paced, the job is bounded.
usage: nx_page_ingest <seed-url> [maxfollow]
Seed is ingested UNCONDITIONALLY (operator chose it; only a minimal length floor applies);
followed links pass the normal thin filter. Writes doc:/url: + out: edges (same node identity as
serve/pagerank). No loc: row (live pages have no CC locator; absent loc is a supported state).
exit 0 + verdict=PASS when the seed ingested (or was already present). 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_outlink_harvest.nxnx_gzip_wrap.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
| 16 | const PI_MAGIC_1048576: i64 = 1048576 |
| 17 | const PI_MAGIC_4194304: i64 = 4194304 |
| 18 | const PI_MAGIC_8192: i64 = 8192 |
| 19 | const PI_MAGIC_2048: i64 = 2048 |
| 20 | const PI_MAGIC_1500: i64 = 1500 |
| 22 | const PI_MAXFOLLOW: i64 = 60 // hard cap on followed links per run (bounded job by design) |
| 23 | const PI_FETCHCAP: i64 = 4194304 // page byte cap |
| 24 | const PI_MINSEED: i64 = 100 // seed min extracted chars (operator chose it -- floor only) |
| 25 | const PI_MINFOLLOW: i64 = 300 // followed-page min extracted chars (thin filter) |
| 26 | const PI_PACE_MS: i64 = 500 // politeness delay between same-host fetches |
| 27 | const PI_SEGCAP: i64 = 16777216 // writer segment size |
| 33 | const PI_SEGID_SANE: i64 = 100000000 |
functions
| 35 | func pi_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 36 | func pi_num(v: i64) -> i64 |
| 45 | func pi_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 46 | func pi_atoi(s: *u8) -> i64 called by 1: main |
| 52 | func pi_host(u: *u8, ul: i64, ob: *i64) -> i64 called by 1: pi_samehost |
| 67 | func pi_samehost(a: *u8, al: i64, b: *u8, bl: i64) -> i64 |
| 79 | func pi_one(url: *u8, store: *TrustStore, h: *i64, w: *i64, prefix: *u8, segbox: *i64, |
| 127 | func main(argc: i64, argv: *i64) -> i64 |