nx_capcensus_gate.nx
buildroot/runtime/nx_capcensus_gate.nx
about
nx_capcensus_gate.nx -- THE GATE FOR THE PICKED-CAP CENSUS.
Subject: ./nx_capcensus.elf (the serving-root binary; e2e fork via nx_gatekit_lib's PROVEN
capture primitive -- never a hand-rolled pipe/fork/wait, which deadlocked a sibling gate in
production TODAY: pid 2240 sat 50+ minutes in pipe_wait with a frozen 91-byte artifact).
WHAT THIS PROVES, and why each tooth exists:
1. the census DISCRIMINATES. A classifier that lumps every bound into one bucket is worthless,
so the fixture plants one of EACH class and the teeth assert the exact split. This is the
anti-vacuity tooth: a trivial "everything is PICKED" implementation CANNOT pass it.
2. it does not FALSELY ACCUSE. A derived-only fixture must yield PICKED=0 -- bitten as a
neg-control pair (fires on the planted picked cap, silent on the derived one).
3. it cannot pass on the EMPTY SET. An empty directory yields population=0, and the tooth
binds the population count IN its condition rather than printing it alongside.
4. the RATCHET cannot launder itself. cg_rise / cg_newbase are PURE functions of (live, base),
so all three required directions are unit-provable and uncheatable by a live number:
- fires on a rise cg_rise(30,20)==1
- tightens on a fall cg_newbase(10,20)==10
- REFUSES to rewrite the baseline on a rise cg_newbase(30,20)==20
That third one is the self-laundering defect the estate has banked; it is the reason the
ratchet is expressed as a pure function instead of inline arithmetic at the call site.
*** THE RATCHET GOVERNS PICKED CAPS ONLY -- NEVER A CAPABILITY AXIS. ***
Operator, 2026-08-23: "a worse score with higher capabilities isnt worse its part of iteration as
long as we have a roadmap to best of breed." A texture resolution raised 2048 -> 8192, a triangle
budget grown to carry real surface detail, or an arena that grew because the asset grew are all
CAPABILITY GROWTH and this ratchet must never be able to forbid them. It counts only bounds whose
subject size is knowable at runtime and was PICKED anyway. The tooth is named for that limit so a
future reader cannot mistake it for a capability ceiling -- which is exactly how the clay-figure
mistake was made once already today.
NOT ROSTER-ADMITTED: the full census forks a recursive 18k-file walk (~60 s). The gate roster beat
kills at ~1,800 ms, so admitting this would manufacture a permanent timeout. Same precedent as the
voxchunk gate. Run it via nx_job_run or /api/gate_run with the fixture-only verbs.
license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_gate_verdict.nxnx_gatekit_lib.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 CG_ELF: *u8 = "./nx_capcensus.elf" |
| 41 | const CG_DIR: *u8 = "/tmp/nxcapgate" |
| 42 | const CG_MIX: *u8 = "/tmp/nxcapgate/mix" |
| 43 | const CG_DER: *u8 = "/tmp/nxcapgate/der" |
| 44 | const CG_EMPTY: *u8 = "/tmp/nxcapgate/empty" |
| 45 | const CG_BASECONF: *u8 = "knowledge/capcensus_ratchet.conf" |
| 48 | const CG_WIN: i64 = 262144 |
| 52 | const CG_CENSUS_DEADLINE_MS: i64 = 600000 |
| 55 | const CG_CONF_SCRATCH: i64 = 4096 |
functions
| 58 | func cg_rise(live: i64, base: i64) -> i64 { if live > base { return 1 } return 0 } |
| 59 | func cg_newbase(live: i64, base: i64) -> i64 { if live < base { return live } return base } |
| 61 | func cg_num_after(b: *u8, n: i64, key: *u8) -> i64 |
| 95 | func cg_ratchet_live() -> i64 |
| 164 | func main(argc: i64, argv: *i64) -> i64 |