code wiki / _hdl_build / nx_domain_admit_gate.nx

nx_domain_admit_gate.nx

buildroot/runtime/_hdl_build/nx_domain_admit_gate.nx

50727 B648 linesdepth 11pulls 16 transitivereach 0 importersview sourcekind gate/prooftopic domain
docsdependenciesstructsconstsfunctions

about

nx_domain_admit_gate.nx -- THE GATE FOR THE ADMISSION GATE. THE ABSENCE THIS CLOSES, quoted from the ship loop on 2026-08-25: "PROVE NO-GATE-FOUND -- a NAMED absence, NOT a pass: NOTHING about this target has been proven." nx_domain_admit decides whether every /compare domain may publish. It shipped TWO changes that day -- C3 (resolve <domain>.gates in BOTH trees) and C4 (fresh-kill read from the bite records) -- with no proof of its own. The organ that refuses on everyone else's behalf was the one thing nothing refused. WHAT IS UNDER TEST is the PURE decision core in nx_domain_admit_lib.nx, driven IN-PROCESS. This gate deliberately does NOT fork an admission run: forking the deployed elf would make every mutant come back NOT-REACHED, so the resulting GREEN would read exactly like a proof while proving nothing, and it would also measure whatever the live /compare tree happened to contain this minute rather than the code. Fixtures are built IN MEMORY where possible and under /tmp/nx_domain_admit_gate/ where a real file is genuinely required -- never under knowledge/store, because a gate that shares a fixture with a production beat measures the beat and not the code. THE ONE THING MEASURED AGAINST LIVE DATA is the C3 regression, and it is guarded by a PRECONDITION rather than asserted: if knowledge/compare/lang.gates ever moves, this gate SKIPs with the missing precondition named. A domain changing under the gate must never be able to turn it RED. ANTI-VACUITY, stated up front because "the classifier agrees with itself" is trivially true: - da_wfind is proven to REFUSE a prefix, a suffix and an inner substring, and to skip a prefix hit and find the real standalone occurrence later in the same buffer. A plain substring matcher passes every other wfind tooth on this gate and fails that one. - da_classify_row is proven to return FOUR DISTINCT values, so a constant classifier cannot pass. - da_c4_partition is proven to reach all three buckets AND to report nothing on the empty map. - every refusal is a gv_bite: it must fire on the crafted bad input and stay silent on the good one. 100 percent sovereign. No hardware writes (Rule 26). license_tier: ORIGINAL expect_exit: 0

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_gate_verdict.nx nx_domain_admit_lib.nx nx_domain_admit_gate.nx

imports: nx_syscalls.nxnx_gate_verdict.nxnx_domain_admit_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_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 ↻ gv_head gv_puts sys_write ↻ sys_mkdir dg_write sys_openat_wr da_slen sys_write ↻ sys_close sys_mmap ↻ da_w sys_write ↻ da_slen ↻ da_n sys_mmap ↻ sys_write ↻ gv_need gv_puts ↻ gv_check gv_puts ↻ dg_eq dg_pos da_isword

structs

none

consts

35const DG_MODE_DIR: i64 = 493
36const DG_MODE_FILE: i64 = 420
37const DG_ROOT: *u8 = "/tmp/nx_domain_admit_gate"
38const DG_D1: *u8 = "/tmp/nx_domain_admit_gate/d1"
39const DG_D2: *u8 = "/tmp/nx_domain_admit_gate/d2"
41const DG_D1S: *u8 = "/tmp/nx_domain_admit_gate/d1/"
42const DG_D2S: *u8 = "/tmp/nx_domain_admit_gate/d2/"
43const DG_ORGAN: *u8 = "/tmp/nx_domain_admit_gate/organ_a.nx"
46const DG_MISSING_ORGAN: *u8 = "/tmp/nx_domain_admit_gate/organ_absent.nx"
47const DG_BITEPFX: *u8 = "/tmp/nx_domain_admit_gate/bite_"
48const DG_BITE_PROVEN: *u8 = "/tmp/nx_domain_admit_gate/bite_g_proven.verdict"
49const DG_BITE_ZERO: *u8 = "/tmp/nx_domain_admit_gate/bite_g_zero.verdict"
50const DG_BITE_NEVER: *u8 = "/tmp/nx_domain_admit_gate/bite_g_never.verdict"
53const DG_ORGAN_SRC: *u8 = "func da_landed_sym(a: i64) -> i64 { return 0 }\n"
54const DG_BUF: i64 = 4096
55const DG_SMALL: i64 = 256
57const DG_CLS_GAP: i64 = 0
58const DG_CLS_GROUNDED: i64 = 1
59const DG_CLS_UNGROUNDED: i64 = 2
60const DG_CLS_UNREADABLE: i64 = 3
63const DG_CLS_WATCHNEW: i64 = 4
66const DG_REC_PROVEN: *u8 = "killed=2 valid_mutants=3 invalid=0 epoch=17 host=probe\n"
67const DG_REC_ZERO: *u8 = "killed=0 valid_mutants=1 invalid=0 epoch=17 host=probe\n"
70const DG_D1_BODY: *u8 = "AAA\n"
71const DG_D2_BODY: *u8 = "BBBBBBBB\n"
72const DG_D2_ONLY: *u8 = "BB\n"
73const DG_CH_A: i64 = 65
74const DG_CH_B: i64 = 66
79const DG_EV_UNSIGNED: *u8 = "class=experiential verdict=fail scope=a-real-scope ran=r witness=an-outside-engine observed=o signer=nishi-machine-attestor\n"
82const DG_EV_UNKNOWNCLASS: *u8 = "class=vibes verdict=pass scope=s witness=w signer=x\n"
83const DG_LIVE_EVCLASS: *u8 = "knowledge/status/evclass_typography.conf"
84const DG_SCOPETAG: *u8 = "scope="
85const DG_HEX0: i64 = 48
86const DG_EVCAP: i64 = 65536
88const DG_STAMP_OK: *u8 = "ok=1 epoch=17 grounded=18/18 gates=1/1 declared=1 hashed=1 redseen=1 host=h dig=d\n"
89const DG_STAMP_RED: *u8 = "ok=0 epoch=17 grounded=17/18 gates=0/1 declared=1 hashed=1 redseen=1 host=h dig=d\n"
91const DG_STAMP_BLIND: *u8 = "ok=0 epoch=17 grounded=0/0 gates=6/6 declared=6 hashed=6 redseen=6 host=h dig=d\n"
92const DG_MATBODY: *u8 = "L|runtime/x.nx|s|c1\n"
93const DG_AXESBODY: *u8 = "axis|a\n"
94const DG_BOARD_MAT_FIX: *u8 = "/tmp/nx_domain_admit_gate/d1/probe.matrix"
95const DG_BOARD_AXES_FIX: *u8 = "/tmp/nx_domain_admit_gate/d1/axesonly.axes"
97const DG_C5_PAIRS: i64 = 6
98const DG_C6_PAIRS: i64 = 6
99const DG_STAMP_ABSENT_FIELDS: i64 = 5

functions

101func dg_eq(a: i64, b: i64) -> i64 { if a == b { return 1 } return 0 }
called by 1: main
102func dg_pos(v: i64) -> i64 { if v > 0 { return 1 } return 0 }
called by 1: main
103func dg_neg(v: i64) -> i64 { if v < 0 { return 1 } return 0 }
called by 1: main
104func dg_streq(a: *u8, b: *u8) -> i64
called by 1: main
110func dg_write(path: *u8, content: *u8) -> i64
124func dg_find(hay: *u8, ned: *u8) -> i64 { return da_wfind(hay, da_slen(hay), ned, 0, da_slen(ned)) }
called by 1: main calls 2: da_wfindda_slen
127func dg_row(buf: *u8, organ: *u8, sym: *u8, pp: *i64) -> i64
called by 1: dg_cls calls 1: da_cat
138func dg_cls(buf: *u8, pp: *i64, sb: *u8, organ: *u8, sym: *u8) -> i64
called by 1: main calls 2: dg_rowda_classify_row
143func dg_tenths(s: *u8) -> i64 { return da_tenths(s, 0, da_slen(s)) }
called by 1: main calls 2: da_tenthsda_slen
145func dg_has(set: *u8, cand: *u8) -> i64 { return da_hasline(set, da_slen(set), cand, 0, da_slen(cand)) }
called by 1: main calls 2: da_haslineda_slen
146func dg_kv(buf: *u8, key: *u8) -> i64 { return da_kv(buf, da_slen(buf), key) }
called by 1: main calls 2: da_kvda_slen
149func dg_den(s: *u8, key: *u8) -> i64 { return da_kv_den(s, da_slen(s), key) }
called by 1: main calls 2: da_kv_denda_slen
150func dg_rowclass(s: *u8) -> i64 { return da_row_class(s, 0, da_slen(s)) }
called by 1: main calls 2: da_row_classda_slen
151func dg_shape(s: *u8, e: i64) -> i64 { return da_row_signed_shape(s, 0, e) }
called by 1: main calls 1: da_row_signed_shape
153func main(argc: i64, argv: *i64) -> i64