code wiki / _hdl_build / nx_tcratchet_gate.nx

nx_tcratchet_gate.nx

buildroot/runtime/_hdl_build/nx_tcratchet_gate.nx

3938 B90 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_tcratchet_gate.nx -- proves the toolchain ratchet REFUSES a shrink and BLESSES a growth, then runs it LIVE against the real toolchain artifacts. NON-VACUITY: T2 is the tooth that would have caught the 2026-07-30 incident -- it feeds the ACTUAL numbers (live 520103 vs banked 543126, the regressed compiler that was found running on the hub) and asserts REFUSE. If anyone loosens the floor, T2 goes RED with the real incident in its name. T5/T6 are the matched pair that keeps the guard honest in BOTH directions: unbanked must never read OK, and a legitimate GROWTH must never read REGRESSED (a ratchet that refuses everything is not a ratchet). license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 1 imports · 0 importers

nx_tcratchet_lib.nx nx_tcratchet_gate.nx

imports: nx_tcratchet_lib.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main tcr_puts sys_write tg_t tcr_puts ↻ tcr_verdict tcr_size sys_mmap sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close tg_report tcr_size ↻ tcr_puts ↻ tcr_puti sys_mmap ↻ sys_write ↻ tcr_puti ↻

structs

none

consts

12const TG_CC: *u8 = "buildroot/_offc/nx_cc_sovereign.elf" as *u8
13const TG_ASM: *u8 = "buildroot/_offc/nxasm_x86_main.elf" as *u8
14const TG_RUN: *u8 = "buildroot/_offc/nx_sov_build_run.elf" as *u8

functions

16func tg_t(name: *u8, cond: i64, ctr: *i64)
called by 1: main calls 1: tcr_puts
28func tg_report(label: *u8, path: *u8)
called by 1: main calls 3: tcr_sizetcr_putstcr_puti
39func main(argc: i64, argv: *i64) -> i64