code wiki / _hdl_build / nx_evidence_gather.nx

nx_evidence_gather.nx

buildroot/runtime/_hdl_build/nx_evidence_gather.nx

8672 B199 linesdepth 21pulls 129 transitivereach 0 importersview sourcekind tooltopic evidence
docsdependenciesstructsconstsfunctions

about

nx_evidence_gather.nx -- the ANALYST's EVIDENCE GATHER (AN9, the irrefutability rung): every load-bearing source URL is fetched over the team's OWN validated HTTPS (sovereign DNS+TCP+ TLS1.3+X.509 -- the proven nx_https_get path), content-hashed (sha256), stored content- addressed under knowledge/analyst/evidence/, self-verified by re-read+re-hash, and recorded in an append-only provenance ledger. A cited number stops being a citation and becomes BYTES ON DISK with a pin -- re-fetchable, diffable, irrefutable. Refusals (bot walls, redirects, TLS alerts) are recorded HONESTLY per URL, never papered over; the run is GREEN if every row got a definite verdict (FETCHED or REFUSED) and at least one FETCHED+VERIFIED. URL list = DATA: knowledge/analyst/evidence_urls.txt (`tag | url`). Polite: 1.5s pacing. x86-lane only (mkdirat 258 direct, the media-gather lesson). license_tier: ORIGINAL

dependencies 7 imports · 0 importers

nx_str.nx nx_syscalls.nx nx_csprng.nx nx_x509_trust_store.nx nx_pem_loader.nx nx_https_get.nx nx_sha256.nx nx_evidence_gather.nx

imports: nx_str.nxnx_syscalls.nxnx_csprng.nxnx_x509_trust_store.nxnx_pem_loader.nxnx_https_get.nxnx_sha256.nx

imported by: nobody (leaf or entry point)

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

main eg_puts sys_write nx_str_len trust_store_alloc sys_mmap nx_pem_trust_load_file sys_mmap ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close nx_pem_trust_load nx_str_len ↻ _pem_find nx_str_len ↻ sys_mmap ↻ b64_decode b64_grab b64_dec_char 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 ↻ x509_read_alg_id sys_mmap ↻ asn1_expect_tag ↻ trust_store_add eg_pi sys_mmap ↻

structs

none

consts

18const EG_MAGIC_4096: i64 = 4096
19const EG_MAGIC_1500: i64 = 1500
21const EG_PAGE_CAP: i64 = 4194304
22const EG_MAX_URLS: i64 = 32

functions

24func eg_puts(s: *u8) -> i64 { sys_write(1, s, nx_str_len(s)); return 0 }
called by 2: eg_onemain calls 2: sys_writenx_str_len
25func eg_pi(v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m;sys_write(1,"-" as *u8,1)} let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=48 as u8;k=1} while m>0{t[k]=(48+(m%10)) as u8;m=m/10;k=k+1} var i: i64=0; while i<k{bb[i]=t[k-1-i];i=i+1} sys_write(1,bb,k); return 0 }
called by 2: eg_onemain calls 2: sys_mmapsys_write
26func eg_w(fd: i64, s: *u8) -> i64 { sys_write(fd, s, nx_str_len(s)); return 0 }
called by 2: eg_onemain calls 2: sys_writenx_str_len
27func eg_wn(fd: i64, v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m;sys_write(fd,"-" as *u8,1)} let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=48 as u8;k=1} while m>0{t[k]=(48+(m%10)) as u8;m=m/10;k=k+1} var i: i64=0; while i<k{bb[i]=t[k-1-i];i=i+1} sys_write(fd,bb,k); return 0 }
called by 2: eg_onemain calls 2: sys_mmapsys_write
28func eg_cat(dst: *u8, off: i64, s: *u8) -> i64 { var i: i64=0; while s[i]!=(0 as u8){dst[off+i]=s[i];i=i+1} return off+i }
called by 1: eg_one
29func eg_mkdir(path: *u8) -> i64 { return __syscall(258, -100, path, 0x1ed, 0, 0, 0) }
called by 1: main
31func eg_hex(d: *u8, out: *u8) -> i64
called by 1: eg_one
44func eg_line_end(b: *u8, i: i64, n: i64) -> i64
called by 1: main
49func eg_skip(b: *u8, i0: i64, e: i64) -> i64
called by 1: main
54func eg_pipe(b: *u8, i: i64, e: i64) -> i64
called by 1: main
60func eg_slice(b: *u8, i: i64, e: i64, dst: *u8) -> i64
called by 1: main
75func eg_write_file(path: *u8, buf: *u8, n: i64) -> i64
89func eg_one(tag: *u8, url: *u8, store: *TrustStore, lg: i64) -> i64
136func main() -> i64