code wiki / (root) / nx_selfsuff_gate.nx

nx_selfsuff_gate.nx

buildroot/runtime/nx_selfsuff_gate.nx

20134 B303 linesdepth 5pulls 6 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_selfsuff_gate.nx -- the referee for the SOVEREIGNTY LEDGER (nx_selfsuff) and for the ranker term it feeds (nx_compare_rank rk_selfsuff_term, PR11). THE TOOTH THAT MATTERS IS THE POSITIVE CONTROL. A dependency penalty that fires on EVERY rung passes every negative test ever written for it -- it demotes the bad rungs, and nobody notices it demoted the good ones too, because a uniform multiplier is a no-op on ORDERING wearing the costume of rigour. So the first tooth here is an IDENTITY: with a ledger that says zero dependency, the ranked priorities must be BYTE-FOR-BYTE the same sequence as with no ledger at all. Fixtures live under /tmp/<gate>/ (a gate must not share its fixture with a production beat), except the fixture DOMAIN, which must sit beside the real compare data because nx_compare_rank resolves buildroot/knowledge/compare/<dom> itself. It is named _ssgatefix so it is unmistakable, it is in no regen/radar list so no generator consumes it, and it deliberately carries NO ver| ladder so the ranker files NOTHING into the production pm intake journal on a gate run. END-TO-END: this gate fork/execs the DEPLOYED ./nx_selfsuff.elf and ./nx_compare_rank.elf, so nx_gate_bite needs its 4th argument (subject target) or every mutant survives by construction.

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_gate_verdict.nx nx_tool_run.nx nx_selfsuff_gate.nx

imports: nx_syscalls.nxnx_gate_verdict.nxnx_tool_run.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_chdir sys_mmap ↻ sys_mkdir sg_write sys_openat_wr sg_slen sys_write ↻ sys_close gv_need gv_puts ↻ gv_verdict gv_note_bare_rate gv_bare_rate gv_at gv_obj_has_n gv_at ↻ gv_puts ↻ gv_num sys_mmap ↻ sys_write ↻

structs

none

consts

22const SG_CAP: i64 = 262144
23const SG_MAXP: i64 = 64
24const SG_MODE_755: i64 = 493
25const SG_MODE_644: i64 = 420
26const SG_NL: i64 = 10
37const SG_CHILD_TMO_MS: i64 = 90000

functions

39func sg_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
40func sg_cat(d: *u8, o: i64, s: *u8) -> i64 { var i: i64 = 0; var p: i64 = o; while s[i] != (0 as u8) { d[p] = s[i]; p = p + 1; i = i + 1 } d[p] = 0 as u8; return p }
41func sg_write(path: *u8, body: *u8) -> i64
50func sg_has(hay: *u8, n: i64, needle: *u8) -> i64
called by 1: main calls 1: sg_slen
67func sg_pris(buf: *u8, n: i64, out: *i64, cap: i64) -> i64
called by 1: main calls 1: sg_slen
93func sg_run(elf: *u8, a1: *u8, a2: *u8, a3: *u8, buf: *u8, lenout: *i64) -> i64
called by 1: main calls 2: sys_mmaptr_run_capture_to
105func main(argc: i64, argv: *i64) -> i64