code wiki / (root) / nx_claim_verify.nx

nx_claim_verify.nx

buildroot/runtime/nx_claim_verify.nx

5002 B88 linesdepth 21pulls 148 transitivereach 0 importersview sourcekind tooltopic claim
docsdependenciesstructsconstsfunctions

about

nx_claim_verify.nx -- AUTONOMOUS, GENERAL, sovereign claim verifier: the wired form of the evidence-grounded verification proven by nx_evidence_verify_gate. Given a claim (a number in tenths), a live source URL, and a text pattern the value follows, it FETCHES THE SOURCE ITSELF over the sovereign TLS-1.3 stack (no pasted fixture, no curl/python), extracts the real value, and emits a machine-readable EVIDENCE RECORD with a verdict: CONFIRMED (|extracted - claim| <= tolerance) / DISCREDITED (outside tolerance) / UNVERIFIABLE (pattern absent -> it invents NO number) / FETCH-FAILED. Exit code carries the verdict (0/3/4/2) so it composes in a pipeline. This is the anti-gaming discipline made autonomous: a claim is only CONFIRMED against a real fetched primary source, and a wrong claim is DISCREDITED. Reuses nx_https_fetch_follow (the researcher's proven fetch). usage: nx_claim_verify <url> <pattern> <claim_tenths> <tol_tenths> (run from a dir with data/mozilla_certdata.txt) e.g.: nx_claim_verify https://arxiv.org/abs/1606.05250 "human performance (" 870 30 -> CONFIRMED (86.8 ~ 87.0) license_tier: ORIGINAL expect_exit: 0

dependencies 6 imports · 0 importers

nx_syscalls.nx nx_itoa_lib.nx nx_x509_trust_store.nx nx_trust_store_load_from_certdata. nx_https_fetch_follow.nx nx_claim_verify_core.nx nx_claim_verify.nx

imports: nx_syscalls.nxnx_itoa_lib.nxnx_x509_trust_store.nxnx_trust_store_load_from_certdata.nxnx_https_fetch_follow.nxnx_claim_verify_core.nx

imported by: nobody (leaf or entry point)

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

main cv_puts sys_write parse_int nx_trust_store_load_from_c sys_mmap sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read 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 trust_store_alloc sys_mmap ↻ nx_x509_trust_store_load sys_mmap ↻ 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 ↻

structs

none

consts

18const K_MAGIC_4194304: i64 = 4194304
19const K_MAGIC_2000: i64 = 2000

functions

21func cv_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 1: main calls 1: sys_write
26func cv_putn(v: i64) -> i64 { nxi_out(v); return 0 }
called by 1: main calls 1: nxi_out
27func slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
30func parse_int(s: *u8) -> i64
called by 1: main
47func main(argc: i64, argv: *i64) -> i64