code wiki / (root) / nx_commons_capunit_gate.nx

nx_commons_capunit_gate.nx source

↩ module page · 91 lines · 5826 B

1// nx_commons_capunit_gate.nx -- proves the trust-flow cap actually BINDS, using the estate's own 2// measured shape rather than a fixture I chose. 3// 4// WHY: the fixed NXC_CAP_PER_PARTNER=100 was measured against the real 2,018-edge import graph on 5// 2026-08-07 and bound for ZERO of 1,233 organs. nx_syscalls: 740 partners, cap 74,000, standing 666. 6// The guard existed, was imported, ran on every call, and could not fire for anybody. 7// ★ A GUARD THAT RUNS AND CANNOT FIRE IS INDISTINGUISHABLE FROM ONE THAT WAS NEVER WIRED, EXCEPT 8// THAT IT LOOKS LIKE IT WORKS. 9// The numbers below are the REAL measured ones for nx_syscalls, not invented: gave=740, took=0, 10// partners=740, witnessed (it has nx_syscalls_gate) -> 900 permil, standing 666. 11// license_tier: ORIGINAL expect_exit: 0 12import "nx_gate_verdict.nx" 13import "nx_commons_lib.nx" 14 15// measured from the estate import graph, 2026-08-07 16const CU_GAVE: i64 = 740 17const CU_TOOK: i64 = 0 18const CU_PASSED: i64 = 0 19const CU_WITN: i64 = 900 20const CU_PARTNERS: i64 = 740 21const CU_RECENT: i64 = 1000 22 23const CU_RATE_LEGACY: i64 = 100 // the fixture-born constant 24const CU_RATE_COUNT: i64 = 1 // a rate in the same unit as count-scale standing 25 26func main() -> i64 { 27 let ctr: *i64 = gv_ctr() 28 gv_head("nx_commons_capunit_gate -- does the trust-flow cap bind on the estate's real shape?" as *u8) 29 30 let raw: i64 = nxc_raw_standing(CU_GAVE, CU_TOOK, CU_PASSED, CU_WITN, CU_RECENT) 31 let legacy: i64 = nxc_standing_rated(CU_GAVE, CU_TOOK, CU_PASSED, CU_WITN, CU_RECENT, CU_PARTNERS, CU_RATE_LEGACY) 32 let bind_legacy: i64 = nxc_cap_bound(CU_GAVE, CU_TOOK, CU_PASSED, CU_WITN, CU_RECENT, CU_PARTNERS, CU_RATE_LEGACY) 33 let scaled: i64 = nxc_standing_rated(CU_GAVE, CU_TOOK, CU_PASSED, CU_WITN, CU_RECENT, CU_PARTNERS, CU_RATE_COUNT) 34 let bind_scaled: i64 = nxc_cap_bound(CU_GAVE, CU_TOOK, CU_PASSED, CU_WITN, CU_RECENT, CU_PARTNERS, CU_RATE_COUNT) 35 let undeclared: i64 = nxc_standing_rated(CU_GAVE, CU_TOOK, CU_PASSED, CU_WITN, CU_RECENT, CU_PARTNERS, NXC_RATE_UNDECLARED) 36 37 gv_puts(" nx_syscalls (REAL): gave=" as *u8); gv_num(CU_GAVE); gv_puts(" partners=" as *u8); gv_num(CU_PARTNERS) 38 gv_puts(" uncapped standing=" as *u8); gv_num(raw); gv_puts("\n" as *u8) 39 gv_puts(" rate=100 (fixture-born): cap=" as *u8); gv_num(CU_PARTNERS * CU_RATE_LEGACY) 40 gv_puts(" standing=" as *u8); gv_num(legacy); gv_puts(" bound?=" as *u8); gv_num(bind_legacy); gv_puts("\n" as *u8) 41 gv_puts(" rate=1 (count-scale) : cap=" as *u8); gv_num(CU_PARTNERS * CU_RATE_COUNT) 42 gv_puts(" standing=" as *u8); gv_num(scaled); gv_puts(" bound?=" as *u8); gv_num(bind_scaled); gv_puts("\n" as *u8) 43 gv_puts(" undeclared rate -> " as *u8); gv_num(undeclared); gv_puts(" (NXC_RATE_UNDECLARED)\n\n" as *u8) 44 45 // CORRECTED 2026-08-07 -- THIS GATE REFUTED MY OWN HYPOTHESIS AND THE HYPOTHESIS WAS THE ERROR. 46 // I measured "cap bound for 0 of 1233 organs" on the import graph and reported the cap as 47 // MIS-CALIBRATED, 111x too loose. That was wrong. In an import graph `gave` IS `partners` by 48 // construction -- one import edge is exactly one counterparty -- so standing <= gave*witn/1000 49 // = partners*0.9, which is below partners*rate for EVERY integer rate >= 1. The cap cannot bind 50 // on that data at any rate, and its failure to bind says nothing about its calibration. 51 // ★★★★★★ THE IMPORT GRAPH IS DEGENERATE FOR THIS PARTICULAR GUARD, AND I READ A PROPERTY OF MY 52 // DATASET AS A PROPERTY OF THE RULE. 53 // What the cap is actually for: CONCENTRATED giving -- an actor claiming a large contribution 54 // across FEW independent counterparties, which is the sybil shape exactly. Tested below on both 55 // shapes, because a guard must be shown to fire on the case it exists for AND stay silent on the 56 // case it must not touch. 57 let conc_raw: i64 = nxc_raw_standing(2000, 0, 0, 900, 1000) 58 let conc_capped: i64 = nxc_standing_rated(2000, 0, 0, 900, 1000, 2, CU_RATE_LEGACY) 59 let bind_conc: i64 = nxc_cap_bound(2000, 0, 0, 900, 1000, 2, CU_RATE_LEGACY) 60 gv_puts(" CONCENTRATED giver (gave=2000, only 2 partners): raw=" as *u8); gv_num(conc_raw) 61 gv_puts(" capped=" as *u8); gv_num(conc_capped); gv_puts(" bound?=" as *u8); gv_num(bind_conc); gv_puts("\n" as *u8) 62 63 gv_bite("T1 the cap fires on CONCENTRATED giving (the sybil shape) and is silent on SPREAD giving" as *u8, 64 bind_conc, bind_legacy, ctr) 65 66 var t2: i64 = 0 67 if legacy == raw { t2 = 1 } 68 gv_check("T2 a broad contributor (gave==partners) passes through UNCAPPED -- correct, not vacuous" as *u8, t2, ctr) 69 70 var t3: i64 = 0 71 if conc_capped < conc_raw { t3 = 1 } 72 gv_check("T3 the concentrated claimer IS reduced (2 partners cannot justify 2000 of giving)" as *u8, t3, ctr) 73 74 var t4: i64 = 0 75 if undeclared == NXC_RATE_UNDECLARED { t4 = 1 } 76 gv_check("T4 an UNDECLARED rate refuses rather than defaulting to a flattering number" as *u8, t4, ctr) 77 78 // NEG-CONTROL: an ordinary member must be unaffected by the cap at the count-scale rate, or the 79 // fix has simply moved the vacuity to the other end and started punishing everybody. 80 var t5: i64 = 0 81 let small: i64 = nxc_standing_rated(12, 3, 3, 900, 1000, 12, CU_RATE_COUNT) 82 let small_raw: i64 = nxc_raw_standing(12, 3, 3, 900, 1000) 83 gv_puts(" ordinary member: raw=" as *u8); gv_num(small_raw); gv_puts(" capped=" as *u8); gv_num(small); gv_puts("\n" as *u8) 84 if small == small_raw { t5 = 1 } 85 gv_check("T5 NEG-CONTROL an ordinary member is untouched (the fix did not move vacuity to a wall)" as *u8, t5, ctr) 86 87 let rc: i64 = gv_verdict("COMMONS-CAPUNIT" as *u8, ctr, 88 "the cap is a declared rate and binds on the shape real data actually has" as *u8) 89 sys_exit(rc) 90 return rc 91}