nx_sota_drift_gate.nx
buildroot/runtime/nx_sota_drift_gate.nx
about
nx_sota_drift_gate.nx -- THE REFEREE for MEASURED BINDINGS in the SOTA emitter (2026-09-01).
Subject: the promoted nx_swcompare_matrix generator END TO END -- since 2026-09-02 the ONE assembler, which
composes the SOTA field from nx_swcompare_sota_lib (this gate used to drive nx_swcompare_sota). The defect this guards: a sota page is
hand-graded and rots the moment an organ ships (lang.sota said "no LSP, formatter, incremental builds or
stepping debugger" a week after all four landed, and the same class recurred within a week of a hand fix).
The emitter now lets a grade row carry `=<organ>:<symbol>` before its note and re-measures it on every
publish with the one symbol ruler. This gate PLANTS every drift class on a fixture domain in its own /tmp
tree (never in the estate's knowledge tree: a gate must not share a fixture with a production beat) and
forks the generator in census, html and json modes:
STALE-UNDER (grade No, symbol present) -> counted, named, page badge, census still exit 0
UNBACKED (grade Yes, symbol absent) -> counted, named, census REFUSES (exit 1) -- the liar-kill class
UNRESOLVED (symbol-only binding, no matrix) and UNREADABLE (organ path absent) -> counted and named
an unbound row is NOT counted (the neg-control that keeps the count honest)
the drift partition sums to bound
The fixture is ASSERTED to have reached its condition before any outcome is asserted, and gv_bite proves the
refusal fires on the unbacked fixture and stays silent on the consistent one.
exit: 0 GREEN . 1 RED . 3 SKIP (generator or fixture unavailable) license_tier: ORIGINAL No hw writes.
dependencies 3 imports · 0 importers
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
structs
| none |
consts
| 22 | const SG_PATH: i64 = 1024 |
| 23 | const SG_FIX: i64 = 16384 |
| 24 | const SG_CAP: i64 = 1048576 |
| 25 | const SG_WORD: i64 = 8 |
| 26 | const SG_ARGV: i64 = 8 |
| 27 | const SG_MODE_RWX: i64 = 493 |
| 28 | const SG_MODE_RW: i64 = 420 |
| 29 | const SG_TIMEOUT_MS: i64 = 60000 |
| 30 | const SG_ROWS: i64 = 22 // above the generator's rows>=20 liar-kill floor |
| 31 | const SG_NUM_ROWS: i64 = 3 // its quantitative>=3 floor |
| 32 | const SG_ROOT: *u8 = "/tmp/nx_sota_drift_gate" |
| 33 | const SG_NL: i64 = 10 |
| 34 | const SG_ZERO: i64 = 48 |
| 35 | const SG_NINE: i64 = 57 |
| 36 | const SG_MINUS: i64 = 45 |
functions
| 38 | func sg_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 39 | func sg_cat(dst: *u8, off: i64, s: *u8) -> i64 { var o: i64 = off; var i: i64 = 0; while s[i] != (0 as u8) { dst[o] = s[i]; o = o + 1; i = i + 1 } dst[o] = 0 as u8; return o } |
| 40 | func sg_put(dst: *u8, off: i64, c: i64) -> i64 { dst[off] = c as u8; dst[off + 1] = 0 as u8; return off + 1 } called by 1: sg_catn |
| 41 | func sg_catn(dst: *u8, off: i64, v: i64) -> i64 |
| 54 | func sg_find(buf: *u8, n: i64, needle: *u8) -> i64 |
| 67 | func sg_has(buf: *u8, n: i64, needle: *u8) -> i64 { if sg_find(buf, n, needle) >= 0 { return 1 } return 0 } |
| 69 | func sg_num_after(buf: *u8, n: i64, key: *u8) -> i64 |
| 86 | func sg_write(path: *u8, text: *u8) -> i64 |
| 95 | func sg_exists(path: *u8) -> i64 { let fd: i64 = sys_openat_rd(path); if fd < 0 { return 0 } sys_close(fd); return 1 } |
| 98 | func sg_resolve_gen(out: *u8) -> i64 |
| 118 | func sg_fixture(dst: *u8, kind: i64) -> i64 |
| 141 | func sg_subject_from_argv(a1: *u8, out: *u8) -> i64 |
| 152 | func sg_run(gen: *u8, mode: *u8, out: *u8, outlen: *i64) -> i64 |
| 159 | func main(argc: i64, argv: *i64) -> i64 |