code wiki / (root) / nx_rigor_envelope_gate.nx

nx_rigor_envelope_gate.nx

buildroot/runtime/nx_rigor_envelope_gate.nx

10635 B155 linesdepth 4pulls 5 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_gate_verdict.nx nx_stage_path.nx nx_rigor_envelope_gate.nx

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

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 ↻ rg_kat sys_mmap ↻ gv_wilson_permil gv_isqrt gv_puts ↻ gv_num sys_mmap ↻ sys_write ↻ sys_munmap gv_check gv_puts ↻ sys_mmap ↻ gv_envelope sys_mmap ↻ gv_wilson_permil ↻ gv_boot_hier sys_mmap ↻ gv_rng_next sys_munmap ↻ gv_envelope_json

structs

none

consts

33const RG_JULY_K: i64 = 13
34const RG_JULY_N: i64 = 14
35const RG_BUF: i64 = 4096
37const RG_FX_CLUSTER_N: i64 = 10

functions

39func rg_kat(name: *u8, k: i64, n: i64, want_lo: i64, want_hi: i64, ctr: *i64) -> i64
48func main() -> i64