code wiki / (root) / sketch_types_gate.nx

sketch_types_gate.nx

buildroot/runtime/sketch_types_gate.nx

5041 B93 linesdepth 4pulls 5 transitivereach 0 importersview sourcekind gate/prooftopic sketch
docsdependenciesstructsconstsfunctions

about

sketch_types_gate.nx -- the gate for the typed loss-envelope 139 modules import. WHY: nx_gensota's gen-3 worklist rank 1 after the first three closures. This module is the substrate's honesty contract for approximate primitives -- every sketch ships its loss NAMED, BOUNDED and QUERYABLE -- so a defect here silently un-bounds every approximate answer. THE TWO TEETH THAT ACTUALLY MATTER: (a) DISCRIMINATOR DISTINCTNESS. envelope_kind, maturity and adv_safety are enums whose whole job is to be TOLD APART at a composition boundary ("refuse Theoretical in production", "never substitute Honest-only where Adversarial is required"). If two constants collide, every such refusal silently passes the wrong thing and NOTHING else would notice. ★A DISCRIMINATOR WHOSE VALUES CAN COLLIDE IS NOT A DISCRIMINATOR. (b) 6-FIELD STRUCT ROUND-TRIP with SIX DISTINCT values. This ecosystem has a banked compiler defect class where struct field offsets mis-resolve; a constructor test using repeated values would pass straight through a swapped pair. Every field here gets a unique witness, so any offset error surfaces as a specific mismatch. license_tier: ORIGINAL expect_exit: 0 No hw writes (Rule 26).

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_gate_verdict.nx sketch_types.nx sketch_types_gate.nx

imports: nx_syscalls.nxnx_gate_verdict.nxsketch_types.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 gv_head gv_puts sys_write gv_check gv_puts ↻ nx_approx_new gv_verdict gv_puts ↻ gv_num sys_mmap ↻ sys_write ↻ sys_munmap gv_journal sys_openat_append sys_mmap ↻ gv_catn sys_mmap ↻ sys_munmap ↻ sys_now_realtime_sec sys_mmap ↻ sys_clock_gettime_real gv_cat sys_write ↻ sys_close sys_munmap ↻ sys_exit

structs

none

consts

21const STG_W_VALUE: i64 = 111
22const STG_W_PARAM: i64 = 16200000
23const STG_W_CONF: i64 = 682700000

functions

25func main() -> i64