code wiki / (root) / nx_commons_defect_gate.nx

nx_commons_defect_gate.nx

buildroot/runtime/nx_commons_defect_gate.nx

4962 B85 linesdepth 3pulls 4 transitivereach 0 importersview sourcekind gate/prooftopic commons
docsdependenciesstructsconstsfunctions

about

nx_commons_defect_gate.nx -- proves, against the REAL shipped organs, that the estate's pairwise reciprocity audit SILENTLY STOPS DETECTING EXTRACTION once the flows get large. WHY THIS CALLS THE REAL FUNCTIONS AND NEVER A COPY: a hand-copied differential probe is evidence only if proven character-identical, and this estate has already paid for that lesson -- a copied probe silently FIXED the bug it was meant to expose and exonerated an innocent compiler for four rounds. So this gate imports nx_mycorrhiza.nx and calls nx_my_audit_kind on a real NxMycorrhiza built by the real constructor. If the audit is fixed, this gate goes green without being touched. THE DEFECT (read from source, then made to fire here): nx_my_audit_kind computes (native_gives_q * NX_MAGIC_1024) / foreign_gives_q. native_gives_q * 1024 overflows i64 above ~9.0e15 units. On overflow the product goes NEGATIVE, every `> tolerance` test is false, both net-giver/net-taker tests are false, and the function falls through to OK_BALANCED. IT FAILS TOWARD "NO EXTRACTION DETECTED", AND IT DOES SO ON THE LARGEST FLOWS FIRST. 9.0e15 is 9 PB of DISK_BYTES, or 285 CPU-years of CPU_MICROSECONDS -- reachable by a fleet, and reachable soonest by exactly the actor moving the most volume. T1/T3 are the NEGATIVE CONTROLS: the same extraction at ordinary scale MUST still be caught. If T1/T3 ever fail the fix broke the detector rather than extending it. license_tier: ORIGINAL expect_exit: 0

dependencies 2 imports · 0 importers

nx_gate_verdict.nx nx_mycorrhiza.nx nx_commons_defect_gate.nx

imports: nx_gate_verdict.nxnx_mycorrhiza.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 ↻ dg_audit nx_my_new sys_mmap ↻ nx_my_record_flow nx_my_kind_is_valid nx_my_dir_is_valid nx_my_audit_kind nx_my_kind_is_valid ↻ nx_my_total_by_kind_dir _my_flow_at _my_ratio_q10 gv_puts ↻ gv_num sys_mmap ↻ sys_write ↻ sys_munmap gv_check gv_puts ↻ gv_verdict gv_note_bare_rate

structs

none

consts

25const DG_TOL_Q10: i64 = 2048 // 2.0x slack, the mycorrhiza-style admit window
26const DG_SMALL: i64 = 10000 // ordinary scale
27const DG_HUGE: i64 = 10000000000000000 // 1e16 units -- past the 9.0e15 overflow cliff
28const DG_CAP: i64 = 8

functions

31func dg_audit(native_gives: i64, foreign_gives: i64) -> i64
39func main() -> i64