code wiki / (root) / nx_evidence_profile_gate.nx

nx_evidence_profile_gate.nx

buildroot/runtime/nx_evidence_profile_gate.nx

42575 B628 linesdepth 5pulls 8 transitivereach 0 importersview sourcekind gate/prooftopic evidence
docsdependenciesstructsconstsfunctions

about

nx_evidence_profile_gate.nx -- the referee for the /compare EVIDENCE PROFILE. SUBJECT: nx_swcompare_evidence (the producer) + nx_evprofile_lib (the one reader). Declared in knowledge/organ_gate.conf so nx_organ_ship resolves it BY DECLARATION rather than by the <target>_gate naming convention, whose silent skip is the vacuous-test defect this estate already fixed once. Check the ship receipt says resolved_by=organ_gate.conf-declaration. HOW IT PROVES ANYTHING, AND WHY THE PROOF IS NOT A MUTANT. The subject elf is an ARGUMENT with a default. Run it against the promoted binary and every profile tooth passes; run it against the banked PRE-CHANGE binary and every profile tooth fails, because that binary writes a v1 stamp with no profile keys at all. That is a real before/after control, obtained free, and it is strictly better evidence than a synthetic mutant: it is the actual incumbent. GREEN: nx_evidence_profile_gate RED : nx_evidence_profile_gate knowledge/status/bank_nx_swcompare_evidence_pre1788197071.elf EVERY FIXTURE LIVES IN /tmp/<gate>/ AND IS BUILT AT SETUP, never beside a production beat: a gate that shares its fixture with production measures the fixture, and a teardown does not run when a run crashes. The whole fixture estate -- a compare tree, an organ source, a status dir -- is assembled under one directory and the subject is forked with THAT as its working directory, so the referee grades a corpus this gate authored and touches not one published board. license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 5 imports · 0 importers

nx_syscalls.nx nx_gate_verdict.nx nx_tool_run.nx nx_estate_path.nx nx_evprofile_lib.nx nx_evidence_profile_gate.nx

imports: nx_syscalls.nxnx_gate_verdict.nxnx_tool_run.nxnx_estate_path.nxnx_evprofile_lib.nx

imported by: nobody (leaf or entry point)

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

main gv_head gv_puts sys_write gv_ctr 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 ↻ sys_mmap ↻ epg_cat gv_puts ↻ sys_mkdir epg_mk sys_mmap ↻ epg_fix epg_cat ↻ sys_mkdir ↻ epg_fix ↻ epg_write sys_openat_wr epg_slen sys_write ↻ sys_close evp_read sys_openat_rd sys_read sys_close ↻ gv_check

structs

none

consts

29const EPG_NAME: *u8 = "NX-EVIDENCE-PROFILE-GATE"
30const EPG_DIR: *u8 = "/tmp/nx_evidence_profile_gate"
31const EPG_MODE_DIR: i64 = 493 // 0755
32const EPG_MODE_FILE: i64 = 420 // 0644
33const EPG_PATH_CAP: i64 = 512
34const EPG_OUT_CAP: i64 = 262144
37const EPG_RUN_MS: i64 = 120000
38const EPG_DEFAULT_SUBJ: *u8 = "_offc/nx_swcompare_evidence.elf"
49const EPG_DEFAULT_EMIT: *u8 = "_offc/nx_swcompare_matrix.elf"
51const EPG_BAND_H2: *u8 = "Evidence profile"
52const EPG_BAND_PART: *u8 = "partition: grounded"
53const EPG_BAND_UNSTAMPED: *u8 = "Unstamped."
56const EPG_EMIT_AV: i64 = 5
60const EPG_AMBIG_DOM: *u8 = "mangagen"

functions

62func epg_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 1: epg_write
64func epg_cat(d: *u8, o: i64, s: *u8) -> i64
called by 2: epg_fixmain
72func epg_write(path: *u8, s: *u8) -> i64
82func epg_fix(out: *u8, rel: *u8) -> i64
called by 2: epg_mkmain calls 1: epg_cat
89func epg_mk(rel: *u8) -> i64
called by 1: main calls 3: sys_mmapepg_fixsys_mkdir
100func epg_profile_delta(a: *i64, b: *i64) -> i64
called by 1: main
115func epg_v1_order(buf: *u8, n: i64) -> i64
called by 1: main calls 2: sys_mmapevp_find
137func epg_has(buf: *u8, n: i64, s: *u8) -> i64 { if evp_find(buf, n, s) >= 0 { return 1 } return 0 }
called by 1: main calls 1: evp_find
139func main(argc: i64, argv: *i64) -> i64