code wiki / (root) / nx_evidence_verify_gate.nx

nx_evidence_verify_gate.nx

buildroot/runtime/nx_evidence_verify_gate.nx

8141 B136 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind gate/prooftopic evidence
docsdependenciesstructsconstsfunctions

about

nx_evidence_verify_gate.nx -- EVIDENCE-GROUNDED claim verification: the SOTA upgrade for the research/census/ adversary/critic stack. The old weakness (surfaced 2026-07-13): the research corpus is a general crawl with no ML papers, so census cells were TRAINING-KNOWLEDGE, not fetched-and-cited. But the sovereign HTTPS organ (nx_https_get) PROVABLY fetches external evidence live -- verified this session: GET arxiv.org/abs/1606.05250 -> 200, abstract carries the PRIMARY-SOURCE numbers "F1 score of 51.0%" and "human performance (86.8%)". This organ closes the loop: given FETCHED source text + a claim, it (1) EXTRACTS the real value, (2) ADVERSARY- tests: does it CONFIRM a true claim AND DISCREDIT a false one (a verifier is trustworthy only if it discriminates), (3) CRITIC: is the source authoritative + is the value the right metric. The fixture below is the REAL fetched SQuAD abstract text (not invented) -- the gate proves extraction+verification on genuine external evidence. Wire = nx_https_get (fetch, proven) -> this (extract+verify) -> evidence record -> census cell citation. license_tier: ORIGINAL expect_exit: 0

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_evidence_verify_gate.nx

imports: nx_syscalls.nx

imported by: nobody (leaf or entry point)

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

main sys_mmap g_puts sys_write slen extract_after find_after slen ↻ parse_tenths g_n sys_write ↻ sys_mmap ↻ chk g_puts ↻ g_n ↻ iabs

structs

none

consts

none

functions

15func g_puts(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 2: chkmain calls 1: sys_write
16func g_n(v: i64) -> i64
called by 2: chkmain calls 2: sys_writesys_mmap
24func slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 2: find_aftermain
25func chk(name: *u8, got: i64, want: i64, st: *i64) -> i64
called by 1: main calls 2: g_putsg_n
33func find_after(buf: *u8, blen: i64, pat: *u8) -> i64
called by 1: extract_after calls 1: slen
48func parse_tenths(buf: *u8, blen: i64, off: i64) -> i64
called by 1: extract_after
72func extract_after(buf: *u8, blen: i64, pat: *u8) -> i64
called by 1: main calls 2: find_afterparse_tenths
79func iabs(x: i64) -> i64 { if x < 0 { return 0-x } return x }
called by 1: main
81func main() -> i64