nx_rigor_envelope_gate.nx
buildroot/runtime/nx_rigor_envelope_gate.nx
about
nx_rigor_envelope_gate.nx -- TEETH FOR THE RIGOR ENVELOPE (AD1, 2026-08-27).
SUBJECT: nx_gate_verdict.gv_envelope / gv_wilson_permil / gv_boot_hier / gv_bare_rate /
gv_envelope_comparable, driven IN-PROCESS (they are pure functions of their arguments), plus the
conf half in nx_stage_path.sp_rigor_params (a precondition: knowledge/rigor.conf must resolve).
WHY THESE TEETH: /compare/autograde published "92 percent" with no denominator; the plan's AD1
done rule says the row publishes through the envelope or reads REFUSED, the hand-typed percent is
refused BY NAME, and the interval width target is a conf row. Every tooth below is one of those
clauses made mechanical, and the anti-vacuity tooth (T9) is the one a plain bootstrap cannot pass.
TEETH
T1-T5 Wilson known-answer values, checked by hand against the closed form before shipping
T6 n=0 is UNMEASURED, never a rate, and the JSON says so
T7 the bootstrap is seed-deterministic (two runs, identical bounds)
T8 a single-cluster bootstrap interval contains the point rate
T9 ANTI-VACUITY: two heterogeneous clusters (10 of 10, 0 of 10) WIDEN the envelope beyond
Wilson on both sides -- a flat bootstrap over the 20 outcomes cannot do this
T10 neg-control-partition-mismatch-refused: clusters that do not sum to (k,n) are refused
T11 BITE: gv_bare_rate FIRES on a hand-typed "92 percent" object and is SILENT on gv_envelope_json
T12 the refusal names the offender by byte offset, and "%" is caught as well as " percent"
T13 precondition: knowledge/rigor.conf resolves (gv_need -> SKIP, never a false RED)
T14 the conf z equals the base-class default (the same quantile spelled once in each place)
T15 the July batch (13 of 14) reads width_ok=0 against the conf target -- n=14 cannot resolve
a ten-point difference, and the gate says so rather than flattering the number
T16 neg-control-harness-mismatch-refuses-comparison (equal hashes compare; different, empty and
UNDECLARED refuse)
license_tier: ORIGINAL No fixtures on disk. No hw writes (Rule 26). expect_exit: 0
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_gate_verdict.nxnx_stage_path.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
| 33 | const RG_JULY_K: i64 = 13 |
| 34 | const RG_JULY_N: i64 = 14 |
| 35 | const RG_BUF: i64 = 4096 |
| 37 | const RG_FX_CLUSTER_N: i64 = 10 |
functions
| 39 | func rg_kat(name: *u8, k: i64, n: i64, want_lo: i64, want_hi: i64, ctr: *i64) -> i64 |
| 48 | func main() -> i64 |