nx_swcompare_evidence.nx
buildroot/runtime/nx_swcompare_evidence.nx
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
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
structs
| none |
consts
| 42 | const EV_MAGIC_8192: i64 = 8192 |
| 43 | const EV_MAGIC_4096: i64 = 4096 |
| 44 | const EV_MAGIC_4095: i64 = 4095 |
| 45 | const EV_MAGIC_604800: i64 = 604800 |
| 46 | const EV_MAGIC_8388608: i64 = 8388608 |
| 47 | const EV_MAGIC_1024: i64 = 1024 |
| 48 | const EV_MAGIC_65536: i64 = 65536 |
| 49 | const EV_MAGIC_2097152: i64 = 2097152 |
| 50 | const EV_MAGIC_16384: i64 = 16384 |
| 51 | const EV_MAGIC_12345: i64 = 12345 |
| 59 | const EV_RC_SKIP: i64 = 3 |
| 60 | const EV_RC_TIMEOUT: i64 = 124 // nx_guarded_run deadline: the REFEREE's kill, never the gate's own verdict |
| 129 | const EV_UNPR_NONE: i64 = 0 |
| 130 | const EV_UNPR_UNREADABLE: i64 = 1 |
| 131 | const EV_UNPR_CAPPED: i64 = 2 |
| 138 | const EV_UNPR_ALLSKIP: i64 = 3 |
| 143 | const EV_UNPR_NOGATE: i64 = 4 |
| 203 | const EV_PRE_MET: i64 = 0 |
| 204 | const EV_PRE_ABSENT: i64 = 1 |
| 205 | const EV_PRE_NODATA: i64 = 2 |
| 208 | const EV_PRE_UNPROVEN: i64 = 3 |
| 209 | const EV_PRE_CAP: i64 = 65536 |
| 210 | const EV_PRE_PATH_CAP: i64 = 512 |
| 211 | const EV_PRE_HASH: i64 = 35 |
| 212 | const EV_PRE_TAB: i64 = 9 |
| 213 | const EV_PRE_SPACE: i64 = 32 |
| 214 | const EV_PRE_NL: i64 = 10 |
| 217 | const EV_SYM_CAP: i64 = 256 |
| 607 | const EV_GR_DEADLINE_MS: i64 = 120000 |
| 608 | const EV_GR_DEADLINE_MIN: i64 = 1000 |
| 609 | const EV_GR_DEADLINE_CONF: *u8 = "knowledge/status/evidence_gate_deadline.conf" |
| 641 | const EV_GR_OVR_CONF: *u8 = "knowledge/status/evidence_gate_deadline_overrides.conf" |
functions
| 145 | func ev_unpr_name(r: i64) -> *u8 |
| 295 | func ev_bite_fold(elf: *u8) -> i64 called by 1: ev_gates calls 6: sys_mmapev_readev_find_lineev_num_aftersys_now_realtime_secev_ttl_sec |
| 335 | func ev_num_after(buf: *u8, n: i64, key: *u8, kl: i64) -> i64 |
| 356 | func ev_ttl_sec() -> i64 |
| 370 | func ev_resolve(inp: *u8, out: *u8) -> i64 { return ar_resolve(inp, out) } |
| 374 | func ev_prov_fold(elf: *u8) -> i64 |
| 388 | func 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 } |
| 389 | func wc(fd: i64, code: i64) -> i64 { let t: *u8 = sys_mmap(2); t[0] = code as u8; sys_write(fd, t, 1); return 0 } |
| 390 | func wn(fd: i64, v: i64) -> i64 |
| 396 | func wj(fd: i64, s: *u8) -> i64 |
| 403 | func wq(fd: i64) -> i64 { wc(fd, 34); return 0 } |
| 404 | func 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 } |
| 405 | func kv_n(fd: i64, key: *u8, v: i64) -> i64 { wq(fd); w(fd, key); wq(fd); wc(fd, 58); wn(fd, v); return 0 } |
| 406 | func 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 } |
| 407 | func slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 409 | func ev_read(path: *u8, buf: *u8, cap: i64) -> i64 called by 8: ev_bite_foldev_ttl_secev_prov_foldev_preconditionev_scanev_gates+2 calls 3: sys_openat_rdsys_readsys_close |
| 418 | func ev_ident_ch(c: i64) -> i64 called by 1: ev_find_line |
| 426 | func ev_find_line(buf: *u8, n: i64, needle: *u8, cnt: *i64) -> i64 |
| 462 | func ev_line_at(buf: *u8, n: i64, off: i64, dst: *u8, cap: i64) -> i64 called by 1: ev_scan |
| 500 | func ev_rule_line(b: *u8, n: i64, rule: i64, ident: *u8, raw: *u8) -> i64 |
| 534 | func ev_num_after_endpos(ob: *u8, on: i64, needle: *u8, endpos: *i64) -> i64 |
| 565 | func ev_parse_pass(ob: *u8, on: i64, outn: *i64, outm: *i64) -> i64 |
| 611 | func ev_gate_deadline_ms() -> i64 |
| 644 | func ev_basename(pth: *u8) -> *u8 called by 1: ev_gate_deadline_for |
| 653 | func ev_gate_deadline_for(elf: *u8) -> i64 called by 2: ev_runev_gates calls 6: ev_gate_deadline_mssys_openat_rdsys_mmapsys_readsys_closeev_basename |
| 699 | func ev_run(elf: *u8, outpath: *u8, extra: *u8) -> i64 called by 1: ev_gates calls 7: sys_mmapev_resolvesys_openat_wrstreqnx_guarded_runev_gate_deadline_for+1 |
| 782 | func ev_precondition(path: *u8, buf: *u8, cap: i64) -> i64 |
| 816 | func ev_split(line: *u8, ln: i64, fs: *i64, fe: *i64, maxf: i64) -> i64 |
| 826 | func ev_fcopy(line: *u8, s: i64, e: i64, dst: *u8, cap: i64) -> i64 |
| 835 | func ev_scan(domain: *u8, mode: i64, st: *i64) -> i64 |
| 1249 | func ev_gates(domain: *u8, mode: i64, ran: *i64, st_out: *i64) -> i64 |
| 1443 | func ev_recon_mark(sum: i64, tot: i64) -> *u8 called by 1: main |
| 1448 | func ev_stamp(domain: *u8, ok: i64, grounded: i64, present: i64, green: i64, ran: i64, skipped: i64) -> i64 |
| 1553 | func ev_write_host(fd: i64) -> i64 |
| 1566 | func ev_write_dig(fd: i64) -> i64 |
| 1582 | func main(argc: i64, argv: *i64) -> i64 |