nx_ioconfirm_checked_test_20260907.nx
buildroot/runtime/nx_ioconfirm_checked_test_20260907.nx
about
nx_ioconfirm.nx -- THE CONFIRMED I/O-STORM LEVEL: maintained continuously, read in constant time.
Rung DG7, /compare/degradation.
WHY THIS EXISTS, MEASURED. The D-state witness that gates every build on this estate reads /proc/stat
ONCE. nx_blkprofile sampled 2,400 times at 100 ms on 2026-09-04 and found procs_blocked with median 4
against a bar of 8, p90 8, max 15, and 118 permil of SINGLE samples at or above the bar. So roughly one
build in eight is refused by a transient spike on a box whose sustained level is HALF the bar. Two
nx_dstate rosters 90 s apart shared only four pids: the D population is mostly churn over a small
persistent core.
AND THE OBVIOUS FIX IS THE WRONG ONE, WHICH IS THE POINT OF THIS ORGAN. Making the gate take a median
AT DECISION TIME is already built and wired (ioa_measure_median, armed by two keys in build_admit.conf)
and the same run shows why it must not be armed: the refusal curve is STILL FALLING at a 12,000 ms span
(118 -> 36 permil) and has not flattened, so any span wide enough to help costs SECONDS on EVERY
admission check -- the clock dispatcher's pre-dispatch call included. That does not remove the stall, it
relocates it onto every caller. build_admit.conf refuses arming for exactly this reason and asks for the
cost to be measured first. It now has been, and the answer is no.
THIS IS THE AEROSPACE ANSWER INSTEAD. Flight control does not confirm a fault inside the control law; a
monitor confirms CONTINUOUSLY and the law reads an already-confirmed state. So: a beat pays the whole
confirmation window once per cadence, off the critical path, and every consumer reads one small file in
constant time. The window costs the beat its span and costs the consumer nothing.
FRESHNESS IS PART OF THE ANSWER, NOT A FOOTNOTE. A stale level is WORSE than none: it decides with
authority about a box it last saw minutes ago. `read` returns FRESH, STALE and ABSENT as three distinct
exits so a consumer that cannot get FRESH falls back to its own single sample -- degrade to the
incumbent, never acquit on a reading nobody took.
KEY NAMES ARE DELIBERATELY NOT build_admit.conf's. That conf is parsed by PLAIN SUBSTRING with no
comment handling, and its own header records a measured incident where prose describing a key ARMED it.
This file uses confirm_samples and confirm_gap_ms so its bytes can never be mistaken for that envelope.
COMPOSES, DOES NOT RE-IMPLEMENT: ioa_measure_median is the same sampler nx_build_admit would use if it
were armed, so the level published here is the level that gate would have computed -- one ruler, not two.
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_ioadmit_lib.nxnx_atomic_rewrite.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
| 40 | const IC_STDOUT: i64 = 1 |
| 41 | const IC_STDERR: i64 = 2 |
| 42 | const IC_OUTCAP: i64 = 8192 |
| 43 | const IC_MEAS_BYTES: i64 = 64 |
| 44 | const IC_BOX_BYTES: i64 = 64 |
| 45 | const IC_MODE_644: i64 = 420 |
| 46 | const IC_UNREADABLE: i64 = 0 - 1 |
| 47 | const IC_EXIT_STALE: i64 = 1 |
| 48 | const IC_EXIT_USAGE: i64 = 2 |
| 49 | const IC_EXIT_ABSENT: i64 = 3 |
| 50 | const IC_EXIT_UNMEASURED: i64 = 4 |
| 51 | const IC_EXIT_BUSY: i64 = 5 |
| 52 | const IC_LOCK_SUFFIX_BYTES: i64 = 5 |
| 53 | const IC_NUL_BYTES: i64 = 1 |
| 58 | const IC_DEF_SAMPLES: i64 = 5 |
| 59 | const IC_DEF_GAP_MS: i64 = 3000 |
| 62 | const IC_DEF_MAX_AGE_S: i64 = 900 |
| 63 | const IC_STATUS: *u8 = "knowledge/status/ioconfirm.status" |
| 64 | const IC_STATUS_UP: *u8 = "../knowledge/status/ioconfirm.status" |
| 65 | const IC_CH_MINUS: i64 = 45 |
| 66 | const IC_CH_0: i64 = 48 |
| 67 | const IC_CH_9: i64 = 57 |
| 68 | const IC_CH_BEAT: i64 = 98 |
| 69 | const IC_CH_READ: i64 = 114 |
| 70 | const IC_KEY_TS: *u8 = "ts=" |
| 71 | const IC_KEY_CONF: *u8 = "blocked_confirmed=" |
functions
| 73 | func ic_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 74 | func ic_werr(s: *u8) -> i64 { sys_write(IC_STDERR, s, ic_slen(s)); return 0 } |
| 76 | func ic_puts(b: *u8, off: i64, s: *u8) -> i64 called by 1: main |
| 83 | func ic_puti(b: *u8, off: i64, v: i64) -> i64 called by 1: main |
| 100 | func ic_atoi(s: *u8) -> i64 |
| 117 | func ic_now() -> i64 |
| 129 | func ic_field(buf: *u8, n: i64, key: *u8) -> i64 |
| 167 | func main(argc: i64, argv: *i64) -> i64 |