code wiki / _hdl_build / nx_domain_admit_gate.nx
nx_domain_admit_gate.nx
buildroot/runtime/_hdl_build/nx_domain_admit_gate.nx
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
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
structs
| none |
consts
| 35 | const DG_MODE_DIR: i64 = 493 |
| 36 | const DG_MODE_FILE: i64 = 420 |
| 37 | const DG_ROOT: *u8 = "/tmp/nx_domain_admit_gate" |
| 38 | const DG_D1: *u8 = "/tmp/nx_domain_admit_gate/d1" |
| 39 | const DG_D2: *u8 = "/tmp/nx_domain_admit_gate/d2" |
| 41 | const DG_D1S: *u8 = "/tmp/nx_domain_admit_gate/d1/" |
| 42 | const DG_D2S: *u8 = "/tmp/nx_domain_admit_gate/d2/" |
| 43 | const DG_ORGAN: *u8 = "/tmp/nx_domain_admit_gate/organ_a.nx" |
| 46 | const DG_MISSING_ORGAN: *u8 = "/tmp/nx_domain_admit_gate/organ_absent.nx" |
| 47 | const DG_BITEPFX: *u8 = "/tmp/nx_domain_admit_gate/bite_" |
| 48 | const DG_BITE_PROVEN: *u8 = "/tmp/nx_domain_admit_gate/bite_g_proven.verdict" |
| 49 | const DG_BITE_ZERO: *u8 = "/tmp/nx_domain_admit_gate/bite_g_zero.verdict" |
| 50 | const DG_BITE_NEVER: *u8 = "/tmp/nx_domain_admit_gate/bite_g_never.verdict" |
| 53 | const DG_ORGAN_SRC: *u8 = "func da_landed_sym(a: i64) -> i64 { return 0 }\n" |
| 54 | const DG_BUF: i64 = 4096 |
| 55 | const DG_SMALL: i64 = 256 |
| 57 | const DG_CLS_GAP: i64 = 0 |
| 58 | const DG_CLS_GROUNDED: i64 = 1 |
| 59 | const DG_CLS_UNGROUNDED: i64 = 2 |
| 60 | const DG_CLS_UNREADABLE: i64 = 3 |
| 63 | const DG_CLS_WATCHNEW: i64 = 4 |
| 66 | const DG_REC_PROVEN: *u8 = "killed=2 valid_mutants=3 invalid=0 epoch=17 host=probe\n" |
| 67 | const DG_REC_ZERO: *u8 = "killed=0 valid_mutants=1 invalid=0 epoch=17 host=probe\n" |
| 70 | const DG_D1_BODY: *u8 = "AAA\n" |
| 71 | const DG_D2_BODY: *u8 = "BBBBBBBB\n" |
| 72 | const DG_D2_ONLY: *u8 = "BB\n" |
| 73 | const DG_CH_A: i64 = 65 |
| 74 | const DG_CH_B: i64 = 66 |
| 79 | const 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" |
| 82 | const DG_EV_UNKNOWNCLASS: *u8 = "class=vibes verdict=pass scope=s witness=w signer=x\n" |
| 83 | const DG_LIVE_EVCLASS: *u8 = "knowledge/status/evclass_typography.conf" |
| 84 | const DG_SCOPETAG: *u8 = "scope=" |
| 85 | const DG_HEX0: i64 = 48 |
| 86 | const DG_EVCAP: i64 = 65536 |
| 88 | const 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" |
| 89 | const 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" |
| 91 | const 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" |
| 92 | const DG_MATBODY: *u8 = "L|runtime/x.nx|s|c1\n" |
| 93 | const DG_AXESBODY: *u8 = "axis|a\n" |
| 94 | const DG_BOARD_MAT_FIX: *u8 = "/tmp/nx_domain_admit_gate/d1/probe.matrix" |
| 95 | const DG_BOARD_AXES_FIX: *u8 = "/tmp/nx_domain_admit_gate/d1/axesonly.axes" |
| 97 | const DG_C5_PAIRS: i64 = 6 |
| 98 | const DG_C6_PAIRS: i64 = 6 |
| 99 | const DG_STAMP_ABSENT_FIELDS: i64 = 5 |
functions
| 101 | func dg_eq(a: i64, b: i64) -> i64 { if a == b { return 1 } return 0 } called by 1: main |
| 102 | func dg_pos(v: i64) -> i64 { if v > 0 { return 1 } return 0 } called by 1: main |
| 103 | func dg_neg(v: i64) -> i64 { if v < 0 { return 1 } return 0 } called by 1: main |
| 104 | func dg_streq(a: *u8, b: *u8) -> i64 called by 1: main |
| 110 | func dg_write(path: *u8, content: *u8) -> i64 |
| 124 | func dg_find(hay: *u8, ned: *u8) -> i64 { return da_wfind(hay, da_slen(hay), ned, 0, da_slen(ned)) } |
| 127 | func dg_row(buf: *u8, organ: *u8, sym: *u8, pp: *i64) -> i64 |
| 138 | func dg_cls(buf: *u8, pp: *i64, sb: *u8, organ: *u8, sym: *u8) -> i64 |
| 143 | func dg_tenths(s: *u8) -> i64 { return da_tenths(s, 0, da_slen(s)) } |
| 145 | func dg_has(set: *u8, cand: *u8) -> i64 { return da_hasline(set, da_slen(set), cand, 0, da_slen(cand)) } |
| 146 | func dg_kv(buf: *u8, key: *u8) -> i64 { return da_kv(buf, da_slen(buf), key) } |
| 149 | func dg_den(s: *u8, key: *u8) -> i64 { return da_kv_den(s, da_slen(s), key) } |
| 150 | func dg_rowclass(s: *u8) -> i64 { return da_row_class(s, 0, da_slen(s)) } |
| 151 | func dg_shape(s: *u8, e: i64) -> i64 { return da_row_signed_shape(s, 0, e) } |
| 153 | func main(argc: i64, argv: *i64) -> i64 |