code wiki / (root) / nx_swcompare_evidence.nx

nx_swcompare_evidence.nx

buildroot/runtime/nx_swcompare_evidence.nx

46980 B844 linesdepth 5pulls 8 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 5 imports · 0 importers

nx_syscalls.nx nx_evidence_verdict.nx nx_sha256.nx nx_artifact_root.nx nx_guarded_run.nx nx_swcompare_evidence.nx

imports: nx_syscalls.nxnx_evidence_verdict.nxnx_sha256.nxnx_artifact_root.nxnx_guarded_run.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 wc sys_mmap sys_write ↻ kv_n wq wc ↻ w ↻ wc ↻ wn w ↻ sys_mmap ↻ sys_write ↻ kv_s wq ↻ w ↻ wc ↻ wj wc ↻ sys_mmap ↻ ev_gates sys_mmap ↻ ev_read sys_openat_rd sys_read sys_close w ↻ wc ↻ ev_split ev_fcopy ev_resolve ar_resolve ar_resolve_with ar_exists sys_openat_rd ↻ sys_close ↻

structs

none

consts

22const EV_MAGIC_8192: i64 = 8192
23const EV_MAGIC_4096: i64 = 4096
24const EV_MAGIC_4095: i64 = 4095
25const EV_MAGIC_604800: i64 = 604800
26const EV_MAGIC_8388608: i64 = 8388608
27const EV_MAGIC_1024: i64 = 1024
28const EV_MAGIC_65536: i64 = 65536
29const EV_MAGIC_2097152: i64 = 2097152
30const EV_MAGIC_16384: i64 = 16384
31const EV_MAGIC_12345: i64 = 12345
313const EV_GR_DEADLINE_MS: i64 = 120000
314const EV_GR_DEADLINE_MIN: i64 = 1000
315const EV_GR_DEADLINE_CONF: *u8 = "knowledge/status/evidence_gate_deadline.conf"
347const EV_GR_OVR_CONF: *u8 = "knowledge/status/evidence_gate_deadline_overrides.conf"

functions

54func ev_bite_fold(elf: *u8) -> i64
94func ev_num_after(buf: *u8, n: i64, key: *u8, kl: i64) -> i64
115func ev_ttl_sec() -> i64
129func ev_resolve(inp: *u8, out: *u8) -> i64 { return ar_resolve(inp, out) }
133func ev_prov_fold(elf: *u8) -> i64
147func 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 }
148func wc(fd: i64, code: i64) -> i64 { let t: *u8 = sys_mmap(2); t[0] = code as u8; sys_write(fd, t, 1); return 0 }
149func wn(fd: i64, v: i64) -> i64
155func wj(fd: i64, s: *u8) -> i64
called by 1: kv_s calls 1: wc
162func wq(fd: i64) -> i64 { wc(fd, 34); return 0 }
called by 2: kv_skv_n calls 1: wc
163func 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
164func 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
165func 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 2: ev_scanmain
166func slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
168func ev_read(path: *u8, buf: *u8, cap: i64) -> i64
177func ev_ident_ch(c: i64) -> i64
called by 1: ev_find_line
185func ev_find_line(buf: *u8, n: i64, needle: *u8, cnt: *i64) -> i64
221func ev_line_at(buf: *u8, n: i64, off: i64, dst: *u8, cap: i64) -> i64
called by 1: ev_scan
240func ev_num_after_endpos(ob: *u8, on: i64, needle: *u8, endpos: *i64) -> i64
called by 1: ev_parse_pass calls 1: slen
271func ev_parse_pass(ob: *u8, on: i64, outn: *i64, outm: *i64) -> i64
317func ev_gate_deadline_ms() -> i64
350func ev_basename(pth: *u8) -> *u8
359func ev_gate_deadline_for(elf: *u8) -> i64
405func ev_run(elf: *u8, outpath: *u8) -> i64
444func ev_split(line: *u8, ln: i64, fs: *i64, fe: *i64, maxf: i64) -> i64
called by 2: ev_scanev_gates
454func ev_fcopy(line: *u8, s: i64, e: i64, dst: *u8, cap: i64) -> i64
called by 2: ev_scanev_gates
463func ev_scan(domain: *u8, mode: i64, st: *i64) -> i64
called by 1: main calls 13: sys_mmapev_readwwcev_splitev_fcopy+7
585func ev_gates(domain: *u8, mode: i64, ran: *i64, st_out: *i64) -> i64
called by 1: main calls 15: sys_mmapev_readwwcev_splitev_fcopy+9
701func ev_stamp(domain: *u8, ok: i64, grounded: i64, present: i64, green: i64, ran: i64) -> i64
731func ev_write_host(fd: i64) -> i64
called by 1: ev_stamp calls 4: sys_mmapev_readwsys_write
744func ev_write_dig(fd: i64) -> i64
called by 1: ev_stamp calls 3: wsys_mmapsys_write
760func main(argc: i64, argv: *i64) -> i64