code wiki / (root) / nx_crawlaudit.nx

nx_crawlaudit.nx

buildroot/runtime/nx_crawlaudit.nx

13493 B243 linesdepth 24pulls 157 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_crawlaudit.nx -- INDEPENDENT validator for the crawl outcome log. The anti-navel-gazing organ. WHY IT EXISTS. nx_crawlmine reads OUR OWN log, so it can only ever confirm what the crawler already believes. If the classifier is wrong, the miner reports the wrong thing CONFIDENTLY -- a closed loop that measures itself and calls the result evidence. Operator 2026-08-06: "a secondary system to validate we arent navel gazing like we have in all kinds of other systems." INDEPENDENCE IS THE ENTIRE POINT, so this organ deliberately shares NO decision logic with the crawler. The crawler classifies a bot-wall by PHRASE MATCH ("Just a moment", "Attention Required"). Re-using those phrases here would be circular -- it would agree with itself by construction and prove nothing. Instead this judges by TEXT YIELD: strip the HTML and measure how much prose comes out. A challenge interstitial yields almost nothing; a real page yields thousands of characters. Different mechanism, different failure modes, so agreement is INFORMATIVE. SEPARATING FLAKINESS FROM MISCLASSIFICATION. A re-fetch happens at a different time, so disagreement alone proves nothing -- MEASURED on this very estate: the same v2ph url ingested 2,176 chars one night and returned a 403 challenge the next morning. So each sampled url is fetched TWICE in this run: if the two fetches disagree WITH EACH OTHER the HOST is unstable (not our bug); if they agree with each other but disagree with what we RECORDED, that is a classifier candidate worth reading. u2605A DISAGREEMENT IS A FLAG, NEVER A VERDICT -- and a validator that forgets that just relocates the overconfidence it was built to catch. nx_crawlaudit [log-path] [max-samples] license_tier: ORIGINAL expect_exit: 0

dependencies 2 imports · 0 importers

nx_research_engine.nx nx_html_to_text.nx nx_crawlaudit.nx

imports: nx_research_engine.nxnx_html_to_text.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main ca_w ca_n rf_init nx_trust_store_load_from_c 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 ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_munmap 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 sys_mkdir

structs

none

consts

26const CA_MAGIC_4096: i64 = 4096
27const CA_MAGIC_4090: i64 = 4090
29const CA_LOG: *u8 = "knowledge/status/crawl_outcomes.log"
30const CA_CAP: i64 = 4194304
31const CA_FETCH: i64 = 1048576
32const CA_TEXT: i64 = 262144
33const CA_MAXS: i64 = 8 // declared: sampled urls per run (each costs 2 live fetches)
36const CA_TEXTMIN: i64 = 400
37const CA_MAXROWS: i64 = 65536 // declared: line-index capacity; a longer log is sampled from its newest rows

functions

39func ca_w(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
40func ca_n(v: i64) -> i64
called by 1: main
49func ca_observe(store: *TrustStore, url: *u8, stbox: *i64, txbox: *i64) -> i64
called by 1: main calls 1: nx_html_to_text
67func main(argc: i64, argv: *i64) -> i64