code wiki / _hdl_build / _driver_exceed_gate.nx
_driver_exceed_gate.nx
buildroot/runtime/_hdl_build/_driver_exceed_gate.nx
about
_driver_exceed_gate.nx -- gate for DRIVER-EXCEEDS-LINUX (X-DRV-W3). Enforces NO-OVERCLAIM.
(1) AUTHORED -- runs the REAL nx_driver_exceed; it must exit GREEN (>=1 measured win, no blob).
(2) NO-OVERCLAIM (the core W3 discipline) -- the throughput-blockio + latency-per-io rows MUST
be OPEN, never WIN (we have no common substrate with a real Linux driver, so a perf "win"
would be a wave). POSITIVE control: the real panel's perf rows carry no WIN. NEGATIVE
control: a synthetic panel that marks a perf row WIN MUST be caught as an overclaim (proves
the check bites -- it is not a rubber stamp).
(3) MEASURED-WIN RE-DERIVE -- at least one WIN, and its basis re-derives from the artifact: the
minimal-standalone-tcb value equals the ACTUAL stat of _drv_proto_blk.bin (re-measured here),
and the retarget basis (bound_working=2) is present in driver_bind.log. A win not backed by
a re-derivable artifact value is rejected.
NATIVE-STORE MIGRATION (operator directive 2026-06-20 "stop using tsv, nishi ecosystem only"):
the panel is no longer parsed from a flat .tsv. This gate is SELF-CONTAINED -- it MEASURES the
same real artifacts the organ measures (re-stat _drv_proto_blk.bin = standalone-tcb bytes,
re-confirm bound_working=2 in driver_bind.log), SEEDS those measured rows into a fresh
content-addressed seg_store under /tmp, and runs every check by reading that NATIVE store via
nx_native_config (ncfg). The negative control seeds a SEPARATE tampered store (a perf-WIN) and
proves the same check flags it. No TSV, no SQL -- nishi ecosystem only.
Evidence -> knowledge/status/driver_exceed.log (DRVEXCEEDGATE row). Sovereign. license_tier: ORIGINAL
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_native_config.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
| 26 | const GX_ORGAN: *u8 = "_offc/nx_driver_exceed.elf" |
| 27 | const GX_BLK: *u8 = "runtime/_hdl_build/_drv_proto_blk.bin" |
| 28 | const GX_BIND: *u8 = "knowledge/status/driver_bind.log" |
functions
| 30 | func g_p(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 31 | func g_fp(fd: i64, s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(fd,s,n); return 0 } |
| 32 | func g_fn(fd: i64, v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m}; let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=48;k=1}; while m>0{t[k]=(48+(m%10)) as u8;m=m/10;k=k+1}; var i: i64=0; while i<k{bb[i]=t[k-1-i];i=i+1}; sys_write(fd,bb,k); return 0 } |
| 34 | func g_run(prog: *u8, outpath: *u8) -> i64 |
| 52 | func g_read(path: *u8, buf: *u8, cap: i64) -> i64 |
| 62 | func g_strlen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } |
| 63 | func g_streq(a: *u8, b: *u8) -> i64 { var i: i64=0; while a[i]!=(0 as u8){ if a[i]!=b[i]{return 0} i=i+1 } if b[i]!=(0 as u8){return 0} return 1 } |
| 65 | func g_has(buf: *u8, n: i64, pat: *u8, pl: i64) -> i64 |
| 76 | func g_hasz(buf: *u8, n: i64, pat: *u8) -> i64 { return g_has(buf, n, pat, g_strlen(pat)) } |
| 79 | func g_strstr(hay: *u8, pat: *u8) -> i64 |
| 84 | func g_itoa(v: i64, out: *u8) -> i64 |
| 94 | func g_fresh_prefix(out: *u8, base: *u8) -> i64 |
| 110 | func g_panel_row(w: *i64, idx: i64, axis: *u8, nishi: *u8, incumbent: *u8, verdict: *u8, evidence: *u8) -> i64 |
| 123 | func g_seed_real(prefix: *u8, tcb_nishi: *u8, retarget: i64) -> i64 |
| 137 | func g_seed_tamper(prefix: *u8) -> i64 |
| 146 | func g_field_of_axis(h: *i64, want: *u8, field: *u8, out: *u8) -> i64 |
| 170 | func g_axis_verdict_is_win(h: *i64, want: *u8) -> i64 |
| 178 | func g_any_win(h: *i64) -> i64 |
| 194 | func main() -> i64 |