code wiki / (root) / nx_mirrorintegrity_gate.nx

nx_mirrorintegrity_gate.nx

buildroot/runtime/nx_mirrorintegrity_gate.nx

11073 B206 linesdepth 5pulls 7 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_mirrorintegrity_gate.nx -- teeth for the mirror-completeness census. IN-PROCESS BY CONSTRUCTION: it imports nx_mirrorintegrity_lib.nx and calls mi_classify directly, so it exercises THE SAME CODE the census runs instead of parsing the census's stdout. That also means it has no NOT-DEPLOYED failure mode -- a gate that forks a deployed elf reports INCONCLUSIVE when the subject is merely un-promoted, which reads as the gate's fault. EVERY FIXTURE IS ASSEMBLED AT RUNTIME UNDER /tmp/mirrorintegrity_gate/ -- never checked in, never shared with a production beat. A gate that shares its fixture with a beat reports on the fixture, not the code. Setup unlinks before it creates, so a crashed previous run cannot make this one pass or fail differently: A GATE THAT IS NOT IDEMPOTENT REPORTS ON ITS FIRST RUN AND LIES ABOUT EVERY RUN AFTER. THE FIRST TOOTH IS THE ANTI-VACUITY ONE. The trivial wrong implementation of this census is "flag everything", which would pass every detection tooth below. Only the positive controls -- complete bodies that must NOT be flagged -- can refute it. A GUARD THAT REFUSES EVERYTHING PASSES EVERY NEGATIVE TEST. license_tier: ORIGINAL expect_exit: 0

dependencies 2 imports · 0 importers

nx_mirrorintegrity_lib.nx nx_gate_verdict.nx nx_mirrorintegrity_gate.nx

imports: nx_mirrorintegrity_lib.nxnx_gate_verdict.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 ↻ mig_path mi_cat mig_put mi_classify sys_openat_rd sys_lseek sys_close mi_read_at sys_lseek ↻ sys_read mi_find mi_slen mi_digits_at mi_html_tail_verdict mi_is_ws mi_is_ws ↻ gv_check gv_puts ↻ gv_bite gv_puts ↻

structs

none

consts

20const MIG_DIR: *u8 = "/tmp/mirrorintegrity_gate\x00"
21const MIG_MODE644: i64 = 420
22const MIG_MODE755: i64 = 493
23const MIG_DECLARED: i64 = 999999 // the length the planted linearized header CLAIMS

functions

25func mig_put(path: *u8, data: *u8) -> i64
called by 1: main
35func mig_path(buf: *u8, name: *u8) -> i64
called by 1: main calls 1: mi_cat
43func main(argc: i64, argv: *i64) -> i64