code wiki / (root) / nx_sota_drift_gate.nx

nx_sota_drift_gate.nx

buildroot/runtime/nx_sota_drift_gate.nx

20157 B291 linesdepth 5pulls 6 transitivereach 0 importersview sourcekind gate/prooftopic sota
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_gate_verdict.nx nx_tool_run.nx nx_sota_drift_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_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_mmap ↻ sg_subject_from_argv sys_mmap ↻ sys_getcwd sys_mmap ↻ sg_cat sg_exists sys_openat_rd sys_close sg_resolve_gen sys_mmap ↻ sys_getcwd ↻ sg_cat ↻ sg_exists ↻ gv_puts ↻ gv_need gv_puts ↻ gv_verdict gv_note_bare_rate gv_bare_rate

structs

none

consts

22const SG_PATH: i64 = 1024
23const SG_FIX: i64 = 16384
24const SG_CAP: i64 = 1048576
25const SG_WORD: i64 = 8
26const SG_ARGV: i64 = 8
27const SG_MODE_RWX: i64 = 493
28const SG_MODE_RW: i64 = 420
29const SG_TIMEOUT_MS: i64 = 60000
30const SG_ROWS: i64 = 22 // above the generator's rows>=20 liar-kill floor
31const SG_NUM_ROWS: i64 = 3 // its quantitative>=3 floor
32const SG_ROOT: *u8 = "/tmp/nx_sota_drift_gate"
33const SG_NL: i64 = 10
34const SG_ZERO: i64 = 48
35const SG_NINE: i64 = 57
36const SG_MINUS: i64 = 45

functions

38func sg_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
39func 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 }
40func 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
41func sg_catn(dst: *u8, off: i64, v: i64) -> i64
called by 1: sg_fixture calls 2: sg_putsys_mmap
54func sg_find(buf: *u8, n: i64, needle: *u8) -> i64
called by 2: sg_hassg_num_after calls 1: sg_slen
67func sg_has(buf: *u8, n: i64, needle: *u8) -> i64 { if sg_find(buf, n, needle) >= 0 { return 1 } return 0 }
called by 1: main calls 1: sg_find
69func sg_num_after(buf: *u8, n: i64, key: *u8) -> i64
called by 1: main calls 2: sg_findsg_slen
86func sg_write(path: *u8, text: *u8) -> i64
95func sg_exists(path: *u8) -> i64 { let fd: i64 = sys_openat_rd(path); if fd < 0 { return 0 } sys_close(fd); return 1 }
98func sg_resolve_gen(out: *u8) -> i64
118func sg_fixture(dst: *u8, kind: i64) -> i64
called by 1: main calls 2: sg_catsg_catn
141func sg_subject_from_argv(a1: *u8, out: *u8) -> i64
152func sg_run(gen: *u8, mode: *u8, out: *u8, outlen: *i64) -> i64
159func main(argc: i64, argv: *i64) -> i64