code wiki / (root) / nx_swcompare_evidence.nx

nx_swcompare_evidence.nx

buildroot/runtime/nx_swcompare_evidence.nx

134622 B1900 linesdepth 8pulls 22 transitivereach 0 importersview sourcekind tooltopic swcompare
docsdependenciesstructsconstsfunctions

about

nx_swcompare_evidence.nx -- the EVIDENCE layer under the SoftwareCompare matrices. Operator 2026-07-10: "compare ... doesnt provide evidence for all the capabilities we claim and generate those autonomously". For a <domain> this organ AUTONOMOUSLY produces two kinds of evidence and LIAR-KILLS a bare claim: (1) GROUNDING -- for every claimed-present axis in <domain>.matrix, it OPENS the named organ source on disk, finds the implementing symbol, and captures the ACTUAL source LINE + occurrence count. A claim whose symbol is NOT in its named file = UNGROUNDED -> RED (mechanically catches a fabricated cell). (2) EXECUTED PROOF -- it FORKS each gate in <domain>.gates (a real self-testing elf), captures its live "pass=N/M ... GREEN" verdict + exit code. Not a stored number: the gate RUNS every time. Modes: no-arg = console + liar-kill gate (exit 0/1); "json" = evidence JSON; "html" = the evidence page. Liar-kill: every PRESENT/Yes/Best/Part axis grounded, EVERY declared gate GREEN (quorum -- see below), a NEG-CONTROL bogus symbol NOT found. NOTE: no '#'/'!' in string literals (nx_cc trap) -> rgb() + emit those bytes. license_tier: ORIGINAL 2026-07-30 QUORUM CORRECTION: this header used to read ">=1 executed gate GREEN", and the code matched it. That was the defect, not a typo -- one green gate out of five stamped a whole domain PROVEN. The rule now comes from the shared evidence law (nx_evidence_verdict.nx) so no future reader can re-loosen it locally.

dependencies 10 imports · 0 importers

nx_syscalls.nx nx_evidence_verdict.nx nx_heavyio_lib.nx nx_sha256.nx nx_artifact_root.nx nx_comparetree_lib.nx nx_guarded_run.nx nx_evprofile_lib.nx nx_matrix_sym_lib.nx nx_symdecl_lib.nx nx_swcompare_evidence.nx

imports: nx_syscalls.nxnx_evidence_verdict.nxnx_heavyio_lib.nxnx_sha256.nxnx_artifact_root.nxnx_comparetree_lib.nxnx_guarded_run.nxnx_evprofile_lib.nxnx_matrix_sym_lib.nxnx_symdecl_lib.nx

imported by: nobody (leaf or entry point)

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

main w sys_write sys_exit streq 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 ↻ hio_admit sys_mmap ↻ hio_root sys_mmap ↻ hio_cat sys_openat_rd sys_close hio_cat ↻ hio_admit_conf_root sys_mmap ↻ hio_conf_read sys_openat_rd ↻ sys_mmap ↻ sys_read sys_close ↻ hio_eol hio_keyis hio_slot hio_atoi hio_running

structs

none

consts

42const EV_MAGIC_8192: i64 = 8192
43const EV_MAGIC_4096: i64 = 4096
44const EV_MAGIC_4095: i64 = 4095
45const EV_MAGIC_604800: i64 = 604800
46const EV_MAGIC_8388608: i64 = 8388608
47const EV_MAGIC_1024: i64 = 1024
48const EV_MAGIC_65536: i64 = 65536
49const EV_MAGIC_2097152: i64 = 2097152
50const EV_MAGIC_16384: i64 = 16384
51const EV_MAGIC_12345: i64 = 12345
59const EV_RC_SKIP: i64 = 3
60const EV_RC_TIMEOUT: i64 = 124 // nx_guarded_run deadline: the REFEREE's kill, never the gate's own verdict
129const EV_UNPR_NONE: i64 = 0
130const EV_UNPR_UNREADABLE: i64 = 1
131const EV_UNPR_CAPPED: i64 = 2
138const EV_UNPR_ALLSKIP: i64 = 3
143const EV_UNPR_NOGATE: i64 = 4
203const EV_PRE_MET: i64 = 0
204const EV_PRE_ABSENT: i64 = 1
205const EV_PRE_NODATA: i64 = 2
208const EV_PRE_UNPROVEN: i64 = 3
209const EV_PRE_CAP: i64 = 65536
210const EV_PRE_PATH_CAP: i64 = 512
211const EV_PRE_HASH: i64 = 35
212const EV_PRE_TAB: i64 = 9
213const EV_PRE_SPACE: i64 = 32
214const EV_PRE_NL: i64 = 10
217const EV_SYM_CAP: i64 = 256
607const EV_GR_DEADLINE_MS: i64 = 120000
608const EV_GR_DEADLINE_MIN: i64 = 1000
609const EV_GR_DEADLINE_CONF: *u8 = "knowledge/status/evidence_gate_deadline.conf"
641const EV_GR_OVR_CONF: *u8 = "knowledge/status/evidence_gate_deadline_overrides.conf"

functions

145func ev_unpr_name(r: i64) -> *u8
called by 2: ev_stampmain
295func ev_bite_fold(elf: *u8) -> i64
335func ev_num_after(buf: *u8, n: i64, key: *u8, kl: i64) -> i64
356func ev_ttl_sec() -> i64
370func ev_resolve(inp: *u8, out: *u8) -> i64 { return ar_resolve(inp, out) }
374func ev_prov_fold(elf: *u8) -> i64
388func w(fd: i64, s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(fd, s, n); return 0 }
389func wc(fd: i64, code: i64) -> i64 { let t: *u8 = sys_mmap(2); t[0] = code as u8; sys_write(fd, t, 1); return 0 }
390func wn(fd: i64, v: i64) -> i64
396func wj(fd: i64, s: *u8) -> i64
called by 1: kv_s calls 1: wc
403func wq(fd: i64) -> i64 { wc(fd, 34); return 0 }
called by 2: kv_skv_n calls 1: wc
404func kv_s(fd: i64, key: *u8, val: *u8) -> i64 { wq(fd); w(fd, key); wq(fd); wc(fd, 58); wq(fd); wj(fd, val); wq(fd); return 0 }
called by 3: ev_scanev_gatesmain calls 4: wqwwcwj
405func kv_n(fd: i64, key: *u8, v: i64) -> i64 { wq(fd); w(fd, key); wq(fd); wc(fd, 58); wn(fd, v); return 0 }
called by 3: ev_scanev_gatesmain calls 4: wqwwcwn
406func streq(a: *u8, b: *u8) -> i64 { var i: i64 = 0; while a[i] != (0 as u8) { if a[i] != b[i] { return 0 } i = i + 1 } if b[i] != (0 as u8) { return 0 } return 1 }
called by 3: ev_runev_scanmain
407func slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
409func ev_read(path: *u8, buf: *u8, cap: i64) -> i64
418func ev_ident_ch(c: i64) -> i64
called by 1: ev_find_line
426func ev_find_line(buf: *u8, n: i64, needle: *u8, cnt: *i64) -> i64
462func ev_line_at(buf: *u8, n: i64, off: i64, dst: *u8, cap: i64) -> i64
called by 1: ev_scan
500func ev_rule_line(b: *u8, n: i64, rule: i64, ident: *u8, raw: *u8) -> i64
534func ev_num_after_endpos(ob: *u8, on: i64, needle: *u8, endpos: *i64) -> i64
called by 1: ev_parse_pass calls 1: slen
565func ev_parse_pass(ob: *u8, on: i64, outn: *i64, outm: *i64) -> i64
611func ev_gate_deadline_ms() -> i64
644func ev_basename(pth: *u8) -> *u8
653func ev_gate_deadline_for(elf: *u8) -> i64
699func ev_run(elf: *u8, outpath: *u8, extra: *u8) -> i64
782func ev_precondition(path: *u8, buf: *u8, cap: i64) -> i64
called by 1: ev_scan calls 3: sys_mmapev_resolveev_read
816func ev_split(line: *u8, ln: i64, fs: *i64, fe: *i64, maxf: i64) -> i64
called by 2: ev_scanev_gates
826func ev_fcopy(line: *u8, s: i64, e: i64, dst: *u8, cap: i64) -> i64
called by 2: ev_scanev_gates
835func ev_scan(domain: *u8, mode: i64, st: *i64) -> i64
1249func ev_gates(domain: *u8, mode: i64, ran: *i64, st_out: *i64) -> i64
1443func ev_recon_mark(sum: i64, tot: i64) -> *u8
called by 1: main
1448func ev_stamp(domain: *u8, ok: i64, grounded: i64, present: i64, green: i64, ran: i64, skipped: i64) -> i64
1553func ev_write_host(fd: i64) -> i64
called by 1: ev_stamp calls 4: sys_mmapev_readwsys_write
1566func ev_write_dig(fd: i64) -> i64
called by 1: ev_stamp calls 3: wsys_mmapsys_write
1582func main(argc: i64, argv: *i64) -> i64