code wiki / _hdl_build / nx_omniforge_census.nx

nx_omniforge_census.nx source

↩ module page · 167 lines · 20374 B

1// nx_omniforge_census.nx -- R0 GENESIS GATE of the OMNIFORGE doomsday->automated-fabrication arc. 2// Operator 2026-06-20: "rebuild from a doomsday scenario, every step up ... from nothing to an 3// automated future state with NO FLOAT" -- ALL legs (mechanical bootstrap, 3D-print, CAD kernel, 4// PCB/EDA, silicon, no-float compute substrate, materials/supply, self-replication). This is the 5// honest, data-driven MATURITY SCORECARD: one row per (pillar x capability), graded 6// ABSENT->PRESENT->PARITY->EXCEEDS from EVIDENCE. The gate LIAR-KILLS any PARITY/EXCEEDS row 7// lacking measured evidence (has_ev=1 only when a real gate / head-to-head backs it) -- so no 8// "exceeds KiCad / Fusion / a commercial fab" can be claimed without proof, BY CONSTRUCTION. 9// Negative control proves the liar-kill fires. EVERY ev-backed cell cites a gate RE-RUN THIS 10// SESSION 2026-06-20 (nx_cad_exceed_gate 8/8, nx_dcc_slice_watertight_gate 10/10, 11// nx_stl_write_mesh_test 12/12, nx_print_exceed_compose_test run-exit=0 -- all SOVEREIGN nx_cc->nxasm). 12// Everything unbuilt is honestly ABSENT with its cited real-world yardstick (a later rung EARNS a 13// grade by attaching a measured gate). Mirrors nx_connect_census.nx (proven R0 idiom). 100% sovereign. 14// license_tier: ORIGINAL expect_exit: 0 15import "nx_syscalls.nx" 16 17const G_ABSENT: i64 = 0 18const G_PRESENT: i64 = 1 19const G_PARITY: i64 = 2 20const G_EXCEEDS: i64 = 3 21 22func sw(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } 23func sn(v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m;sys_write(1,"-" as *u8,1)} let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=48 as u8;k=1} while m>0{t[k]=(48+(m%10)) as u8;m=m/10;k=k+1} var i: i64=0; while i<k{bb[i]=t[k-1-i];i=i+1} sys_write(1,bb,k); return 0 } 24 25func grade_name(g: i64) -> i64 { 26 if g==G_ABSENT { sw("ABSENT " as *u8) } 27 if g==G_PRESENT { sw("PRESENT" as *u8) } 28 if g==G_PARITY { sw("PARITY " as *u8) } 29 if g==G_EXCEEDS { sw("EXCEEDS" as *u8) } 30 return 0 31} 32 33// the LIAR-KILL rule: PARITY/EXCEEDS (grade>=2) REQUIRE has_ev==1. ABSENT/PRESENT do not. 34func cap_valid(grade: i64, has_ev: i64) -> i64 { 35 if grade >= G_PARITY { if has_ev == 0 { return 0 } } 36 return 1 37} 38 39func row(pillar: *u8, cap: *u8, grade: i64, base: *u8, evidence: *u8, has_ev: i64, tot: *i64) -> i64 { 40 sw(" " as *u8); sw(pillar); sw(" | " as *u8); sw(cap); sw(" -> " as *u8); grade_name(grade) 41 if cap_valid(grade, has_ev) == 0 { sw(" <== INVALID: PARITY/EXCEEDS without evidence (LIAR-KILL)" as *u8); tot[4] = tot[4] + 1 } 42 else { if has_ev == 1 { sw(" [ev: " as *u8); sw(evidence); sw("]" as *u8) } } 43 sw(" {vs " as *u8); sw(base); sw("}" as *u8) 44 sw("\n" as *u8) 45 tot[grade] = tot[grade] + 1 46 return 0 47} 48 49func main() -> i64 { 50 let tot: *i64 = sys_mmap(64) as *i64 51 tot[0]=0; tot[1]=0; tot[2]=0; tot[3]=0; tot[4]=0 // ABSENT,PRESENT,PARITY,EXCEEDS,INVALID 52 53 sw("=== nx_omniforge_census R0 -- doomsday->automated-fabrication maturity scorecard (honest 2026-06-20) ===\n" as *u8) 54 sw("grades: ABSENT < PRESENT < PARITY < EXCEEDS (PARITY/EXCEEDS REQUIRE measured evidence)\n" as *u8) 55 sw("ratchet: a cell flips to PRESENT with a passing gate; PARITY/EXCEEDS only with a measured head-to-head. {vs ...} = cited yardstick.\n" as *u8) 56 sw("LAW: every rung sovereign .nx, integer-only NO-FLOAT, never-brick (#26). Goal = from nothing -> self-replicating forge.\n" as *u8) 57 58 sw("-- MB MECHANICAL BOOTSTRAP (tools that make tools) --\n" as *u8) 59 row("MB" as *u8, "precision-bootstrap chain planner (low->high precision, 3-plate flat ref)" as *u8, G_ABSENT, "Gingery scrap shop; Moore 'Foundations of Mechanical Accuracy'" as *u8, "none" as *u8, 0, tot) 60 row("MB" as *u8, "metal casting / charcoal-foundry process model" as *u8, G_ABSENT, "Gingery charcoal foundry -> cast lathe" as *u8, "none" as *u8, 0, tot) 61 row("MB" as *u8, "machine-tool capability registry (lathe/mill/drill)" as *u8, G_ABSENT, "OSE Global Village Construction Set (50 machines)" as *u8, "none" as *u8, 0, tot) 62 row("MB" as *u8, "self-replication BOM (printable parts vs bought 'vitamins')" as *u8, G_ABSENT, "RepRap ~50% self-printed mass" as *u8, "none" as *u8, 0, tot) 63 64 sw("-- PR 3D PRINTING (the 'printers' leg) --\n" as *u8) 65 row("PR" as *u8, "watertight slicer STL->G-code (arbitrary slanted/curved geometry)" as *u8, G_PRESENT, "Cura/PrusaSlicer/OrcaSlicer" as *u8, "nx_dcc_slice_watertight_gate 10/10 (this session)" as *u8, 1, tot) 66 row("PR" as *u8, "composed adaptive/load-aware slicing (3 caps no slicer emits together)" as *u8, G_EXCEEDS, "no single slicer composes these" as *u8, "nx_print_exceed_compose_test run-exit=0 (this session)" as *u8, 1, tot) 67 row("PR" as *u8, "integrated model->slice->complete-G-code pipeline (one tool)" as *u8, G_PRESENT, "CAD+slicer toolchain (multi-tool)" as *u8, "nx_cad_exceed_gate INTEGRATED 687981B (this session)" as *u8, 1, tot) 68 row("PR" as *u8, "Klipper-class motion + G-code validation" as *u8, G_PRESENT, "Klipper/Moonraker" as *u8, "geometry-fab arc (not re-run this session)" as *u8, 0, tot) 69 row("PR" as *u8, "runtime safety monitors (thermal/runout/shift/z-back)" as *u8, G_PRESENT, "Klipper safety + firmware limits" as *u8, "geometry-fab arc (not re-run this session)" as *u8, 0, tot) 70 row("PR" as *u8, "closed-loop camera correction (self-correcting prints)" as *u8, G_ABSENT, "Obico (AGPL) + CAXTON (Nature 2022, ~84%)" as *u8, "none" as *u8, 0, tot) 71 row("PR" as *u8, "multi-printer fleet control at scale" as *u8, G_ABSENT, "OctoPrint/Fleet; QIDI farm tooling" as *u8, "none" as *u8, 0, tot) 72 row("PR" as *u8, "printer self-replication (prints its own parts)" as *u8, G_ABSENT, "RepRap self-replicating printer" as *u8, "none" as *u8, 0, tot) 73 74 sw("-- CK CAD / GEOMETRY KERNEL (the design driver, shared substrate) --\n" as *u8) 75 row("CK" as *u8, "no-float DETERMINISTIC geometry kernel (byte-identical reruns)" as *u8, G_EXCEEDS, "float B-rep (Fusion/FreeCAD non-deterministic)" as *u8, "nx_cad_exceed_gate DETERMINISM (this session)" as *u8, 1, tot) 76 row("CK" as *u8, "robust CSG booleans (SDF, never-fail, one param)" as *u8, G_EXCEEDS, "B-rep booleans fail on edge cases" as *u8, "nx_cad_exceed_gate ROBUST-CSG (this session)" as *u8, 1, tot) 77 row("CK" as *u8, "robust fillets (smooth-min)" as *u8, G_EXCEEDS, "B-rep fillet operations fail/abort" as *u8, "nx_cad_exceed_gate ROBUST-FILLETS (this session)" as *u8, 1, tot) 78 row("CK" as *u8, "parametric sketch->extrude->solid (box/cyl/cone/torus/rbox)" as *u8, G_PRESENT, "Fusion/FreeCAD/Siemens NX" as *u8, "nx_cad_exceed_gate INTEGRATED (this session)" as *u8, 1, tot) 79 row("CK" as *u8, "binary STL export writer (model->file, Q14 units-exact)" as *u8, G_PRESENT, "mesh/CAD exporters" as *u8, "nx_stl_write_mesh_test 12/12 (this session)" as *u8, 1, tot) 80 row("CK" as *u8, "DCC mesh-edit + sculpt (Blender/ZBrush-class verbs)" as *u8, G_PRESENT, "Blender / ZBrush" as *u8, "nx_mesh_edit/sculpt gates (not re-run this session)" as *u8, 0, tot) 81 row("CK" as *u8, "interactive parametric GUI editor (sliders->regen)" as *u8, G_ABSENT, "Fusion/FreeCAD GUI (the #1 behind axis)" as *u8, "none" as *u8, 0, tot) 82 row("CK" as *u8, "constraint solver (sketch geometric constraints)" as *u8, G_ABSENT, "SolveSpace / Fusion constraint solver" as *u8, "none" as *u8, 0, tot) 83 row("CK" as *u8, "STEP/IGES/DWG interchange interop" as *u8, G_ABSENT, "Siemens NX / KiCad / AutoCAD" as *u8, "none" as *u8, 0, tot) 84 85 sw("-- ED PCB / EDA (the near-term 'chips' leg -- GREENFIELD) --\n" as *u8) 86 row("ED" as *u8, "board copper-geometry data model (layers/pads/traces)" as *u8, G_PRESENT, "KiCad pcbnew" as *u8, "nx_pcb_gerber_gate 11/11 (R1, this session)" as *u8, 1, tot) 87 row("ED" as *u8, "Gerber RS-274X export (the fab seam)" as *u8, G_PRESENT, "KiCad / Altium Gerber" as *u8, "nx_pcb_gerber_gate 11/11 (R1, integer round-trip + neg-ctrl)" as *u8, 1, tot) 88 row("ED" as *u8, "Excellon drill-file export" as *u8, G_PRESENT, "KiCad drill export" as *u8, "nx_pcb_drill_gate 9/9 (R1b, integer round-trip + neg-ctrl)" as *u8, 1, tot) 89 row("ED" as *u8, "schematic capture -> netlist" as *u8, G_PRESENT, "KiCad eeschema" as *u8, "nx_schematic_gate 6/6 GREEN 2026-06-29: schematic->netlist front-end (voltage divider J1+R1+R2), exact connectivity + ERC (no floating/single-pin nets) + routable HANDOFF to place-and-route; SOVEREIGN no eeschema" as *u8, 1, tot) 90 row("ED" as *u8, "design-rule check (DRC)" as *u8, G_PRESENT, "KiCad / Altium DRC" as *u8, "nx_pcb_drc_gate 5/5 GREEN 2026-06-29: real-fab-rule DRC TWIN in real mils (6/6 std class) -- clearance (gap=pitch-width) + width rules; catches real short risk + too-thin trace; route->verify; SOVEREIGN no KiCad" as *u8, 1, tot) 91 row("ED" as *u8, "autorouter / interactive router" as *u8, G_PRESENT, "KiCad / Freerouting" as *u8, "nx_pcb_autoroute_gate 5/5 GREEN 2026-06-29: single-layer Lee/BFS copper router REUSING the silicon pnr_route_net_ex (SHARED router); node-disjoint DRC-clean + detour + liar-kill + congestion; SOVEREIGN no KiCad/Freerouting" as *u8, 1, tot) 92 row("ED" as *u8, "isolation-milling CAM (PCB->G-code, in-house etch-free)" as *u8, G_PRESENT, "FlatCAM (reuse our slicer/CAM toolpath patterns)" as *u8, "nx_pcb_cam_gate 11/11 (R2, offset toolpaths + neg-ctrl)" as *u8, 1, tot) 93 row("ED" as *u8, "component library + supply-chain BOM" as *u8, G_PRESENT, "KiCad/LibrePCB library + Octopart" as *u8, "nx_bom_gate 5/5 GREEN 2026-06-29: parts library (mpn/price-cents/stock) -> BOM aggregate + EXACT integer cost (divider=12c) + supply-chain shortfall flag; SOVEREIGN" as *u8, 1, tot) 94 row("ED" as *u8, "pick-and-place placement file + closed-loop feedback" as *u8, G_ABSENT, "OpenPnP/LumenPnP (placement specs unverified, measure)" as *u8, "none" as *u8, 0, tot) 95 96 sw("-- SI SILICON (the literal 'chip' leg; nishi-silicon repo, sim-only) --\n" as *u8) 97 row("SI" as *u8, "RV64IM-min soft-core HDL (ALU+decoder)" as *u8, G_PRESENT, "commercial RISC-V cores" as *u8, "rv64im_min_alu_proof + rv64im_min_decoder_proof OK (RE-VERIFIED this session)" as *u8, 1, tot) 98 row("SI" as *u8, "single-cycle CPU sim + kernel boot (runs a real program)" as *u8, G_PRESENT, "Verilator/QEMU" as *u8, "rv64im_min_cpu_crosscheck PASS (UART SUM=2870) + kernel_boot_smoke GREEN (RE-VERIFIED, fixed /c->/mnt/c path)" as *u8, 1, tot) 99 row("SI" as *u8, "sovereign .nxgate synthesis emit (Verilog-free, divider-backed)" as *u8, G_PRESENT, "Yosys/Verilog" as *u8, "synth_emit_alu_gates_smoke 4125 cells on-enum GREEN (built the missing smoke; rc=102 was library-no-main, not an emitter bug)" as *u8, 1, tot) 100 row("SI" as *u8, "gate-level FUNCTIONAL equivalence (netlist == behavioral)" as *u8, G_PRESENT, "Yosys+SymbiYosys formal/sim equivalence" as *u8, "nx_alu_select_mem_test div=28 ALL ops MATCH (divider-backed) + nx_alu_divider_proof_test exact (re-verified)" as *u8, 1, tot) 101 row("SI" as *u8, "FULL decoder gate emit: fields + KIND + I/S/B/U/J immediates (functionally verified)" as *u8, G_PRESENT, "Yosys decoder RTL synth" as *u8, "nx_decoder_{fields,kind,imm}_mem_test ALL GREEN: fields 1200 + kind 200+6KAT + imm 1000 checks, 0 mismatch -> whole RV64IM decoder emittable as .nxgate" as *u8, 1, tot) 102 row("SI" as *u8, "top-level R-type DATAPATH compose (decode->control->ALU, gate-level)" as *u8, G_PRESENT, "full CPU RTL synth + gate-sim equivalence" as *u8, "nx_cpu_rtype_exec_test 120 checks 0 mismatch + add/mul KATs (decoder+R-type-control+ALU compose); METAL-03 CLOSED rs2[5:0] shift-mask (gate masks shamt to low 6 bits): KATs sll(1,65)=2 srl(256,64)=256 verified 2026-06-29" as *u8, 1, tot) 103 row("SI" as *u8, "place-and-route" as *u8, G_PRESENT, "nextpnr (M4 sovereign replacement)" as *u8, "nx_fpga_pnr_gate 6/6 GREEN 2026-06-29: levelize+place on 2D grid + Lee/BFS capacity-gated routing; faithful (full-adder+chain==golden exhaustive) + load-bearing (liar-kill) + resource-gated (cap=0 UNROUTABLE) + infeasible-rejected; SOVEREIGN no Verilog/nextpnr" as *u8, 1, tot) 104 row("SI" as *u8, "bitstream encoder" as *u8, G_PRESENT, "prjtrellis (M4 sovereign replacement)" as *u8, "nx_fpga_bitstream_gate 5/5 GREEN 2026-06-29: packs fabric config (LUT inits + routing + outputs) to a binary .nbit; encode/decode round-trip faithful (decoded fabric == golden full-adder) + load-bearing (1-byte flip breaks it) + deterministic; SOVEREIGN no prjtrellis" as *u8, 1, tot) 105 row("SI" as *u8, "JTAG / bitstream loader" as *u8, G_PRESENT, "OpenOCD (M5 sovereign replacement)" as *u8, "nx_jtag_load_gate 5/5 GREEN 2026-06-29: faithful IEEE 1149.1 TAP FSM (16 states) shifts the bitstream Shift-DR->Update-DR; loaded fabric runs golden full-adder; wrong-TMS shifts 0 (real protocol); never-brick VOLATILE config; SOVEREIGN no OpenOCD" as *u8, 1, tot) 106 row("SI" as *u8, "garage-litho process model (5-10um DIY node)" as *u8, G_PRESENT, "Zeloof Z2 ~100tr NMOS; CMU Hacker Fab 952tr 94% yield" as *u8, "nx_litho_gate 6/6 GREEN 2026-06-29: 9-step process recipe + Seeds yield model (943permil ~94%, pinned to CMU Hacker Fab) + transistor scaling (952@10um -> 3808@5um) + cost/chip; liar-kill skip-dope/big-die; SOVEREIGN" as *u8, 1, tot) 107 row("SI" as *u8, "physical FPGA boot (exit criterion)" as *u8, G_ABSENT, "ULX3S ECP5 board (~175 USD)" as *u8, "none" as *u8, 0, tot) 108 109 sw("-- NF NO-FLOAT COMPUTE SUBSTRATE (survival computing) --\n" as *u8) 110 row("NF" as *u8, "self-hosting sovereign toolchain (nx_cc->nxasm, no gcc)" as *u8, G_PRESENT, "gcc/llvm dependency" as *u8, "every build this session SOVEREIGN(nx_cc->nxasm_x86, no gcc)" as *u8, 1, tot) 111 row("NF" as *u8, "integer-only / fixed-point math kernel (no FPU)" as *u8, G_PRESENT, "FPU-dependent CAD/DSP stacks" as *u8, "all organs integer-only by NO-FLOAT law" as *u8, 0, tot) 112 row("NF" as *u8, "minimal CPU/ISA able to host the substrate" as *u8, G_PRESENT, "needing full x86/ARM (RV64IM-min core, cross-ref SI)" as *u8, "none" as *u8, 0, tot) 113 row("NF" as *u8, "Forth-class minimal collapse bootstrap" as *u8, G_ABSENT, "Collapse OS / Dusk OS (Forth, Z80)" as *u8, "none" as *u8, 0, tot) 114 row("NF" as *u8, "scavenged 8-bit / Z80 build target" as *u8, G_ABSENT, "Collapse OS Z80 target" as *u8, "none" as *u8, 0, tot) 115 116 sw("-- MS MATERIALS & SUPPLY (the honest hard limits) --\n" as *u8) 117 row("MS" as *u8, "feedstock / materials property database" as *u8, G_ABSENT, "MatWeb / supplier datasheets" as *u8, "none" as *u8, 0, tot) 118 row("MS" as *u8, "supply-chain bottleneck map (what canNOT be home-made)" as *u8, G_ABSENT, "Gershenfeld: 'chips + stepper motors stay bought'" as *u8, "none" as *u8, 0, tot) 119 row("MS" as *u8, "recycled-filament / shred-extrude model" as *u8, G_ABSENT, "Precious Plastic" as *u8, "none" as *u8, 0, tot) 120 row("MS" as *u8, "etchant / photoresist / dopant sourcing model" as *u8, G_ABSENT, "commercial chemical supply" as *u8, "none" as *u8, 0, tot) 121 122 sw("-- SR SELF-REPLICATION / AUTOMATION FRONTIER (omniforge closure) --\n" as *u8) 123 row("SR" as *u8, "self-replication ratio tracker (closed-loop %)" as *u8, G_ABSENT, "RepRap ~50% self-printed" as *u8, "none" as *u8, 0, tot) 124 row("SR" as *u8, "machine-builds-machine dependency graph" as *u8, G_ABSENT, "OSE GVCS machine interdependence" as *u8, "none" as *u8, 0, tot) 125 row("SR" as *u8, "per-rung automation-level grader (manual->CNC->autonomous)" as *u8, G_ABSENT, "industrial automation maturity scales" as *u8, "none" as *u8, 0, tot) 126 row("SR" as *u8, "PHYSICAL doomsday-restart capability (not just records)" as *u8, G_ABSENT, "WMS makes RECORDS survivable (R8-R11); physical is the gap" as *u8, "none" as *u8, 0, tot) 127 128 sw("-- RC ROBOTICS / TRUE-CONTROL (robots+sensors run Nishi; output to real machines) --\n" as *u8) 129 row("RC" as *u8, "robot mechanical-part design output (CAD->STL->print)" as *u8, G_PRESENT, "Fusion/SolidWorks -> STL" as *u8, "nx_cad_exceed_gate + nx_stl_write_mesh_test (this session)" as *u8, 1, tot) 130 row("RC" as *u8, "trapezoidal motion planning (accel/cruise/decel profile)" as *u8, G_PRESENT, "Klipper/Marlin/GRBL" as *u8, "nx_motion_plan (printer arc, NOT re-run this session)" as *u8, 0, tot) 131 row("RC" as *u8, "multi-axis synchronized step generation (integer Bresenham)" as *u8, G_PRESENT, "Klipper/GRBL stepper ISR" as *u8, "nx_robot_step_gate 6/6 (R-ROBO-1, this session)" as *u8, 1, tot) 132 row("RC" as *u8, "closed-loop feedback control (no-float P/PID, sensor->actuator)" as *u8, G_PRESENT, "ROS control / PID firmware" as *u8, "nx_robot_control_gate 6/6 (R-ROBO-2, converges+efficacy)" as *u8, 1, tot) 133 row("RC" as *u8, "never-brick actuator safety clamp (#26 by construction)" as *u8, G_PRESENT, "GRBL soft-limits / e-stop" as *u8, "nx_robot_control_gate (clamp proven: cmd<=UMAX at huge err)" as *u8, 1, tot) 134 row("RC" as *u8, "runtime control-plane (command + telemetry, like IoT/printer)" as *u8, G_PRESENT, "Moonraker / ROS / MQTT" as *u8, "nx_home IoT plane + nx_moonraker_client (NOT re-run this session)" as *u8, 0, tot) 135 row("RC" as *u8, "forward/inverse kinematics (no-float trig, arm/delta/CoreXY)" as *u8, G_PRESENT, "ROS MoveIt / IKFast" as *u8, "nx_robot_kinematics_gate 5/5 (R-ROBO-3: CoreXY FK+IK exact + arm FK; arm-inverse next)" as *u8, 1, tot) 136 row("RC" as *u8, "MCU firmware generation (NishiLang for a board's MCUs)" as *u8, G_PRESENT, "Arduino/PlatformIO codegen" as *u8, "nx_robot_firmware_gate 6/6 (R-ROBO-4: emits NishiLang fw, never-brick by-construction, fault->safe-state; HAL+flash next)" as *u8, 1, tot) 137 row("RC" as *u8, "sensor driver framework (read real sensors in Nishi)" as *u8, G_PRESENT, "ROS drivers / Firmata" as *u8, "nx_robot_hal_gate 9/9 (read + range-check/validity framework, sim; per-device + real ADC = bench)" as *u8, 1, tot) 138 row("RC" as *u8, "actuator hardware-write driver (fail-safe GPIO/STEP/PWM)" as *u8, G_PRESENT, "Klipper MCU / GRBL" as *u8, "nx_robot_hal_gate 9/9 (R-ROBO-5: fail-safe driver, never-brick PROVEN mechanically; real MMIO binding = bench)" as *u8, 1, tot) 139 row("RC" as *u8, "hardware signal generation (STEP/DIR waveform + PWM + GPIO register)" as *u8, G_PRESENT, "A4988/DRV8825 STEP/DIR; RC-servo PWM" as *u8, "nx_robot_signal_gate 7/7 (R-ROBO-6: edge-exact waveform from pulse plan, never-brick pin-mask+normalize+clamp)" as *u8, 1, tot) 140 row("RC" as *u8, "step-timing / timer-ISR (accel ramp + never-brick max step rate)" as *u8, G_PRESENT, "Klipper/Marlin stepper ISR + accel ramp" as *u8, "nx_robot_timing_gate 7/7 (R-ROBO-7: isqrt accel ramp + ISR model + max-rate floor, exhaustive)" as *u8, 1, tot) 141 row("RC" as *u8, "physical bench validation (flash + move a real axis)" as *u8, G_ABSENT, "any real robot/printer firmware on hardware" as *u8, "none -- the honest on-metal gap: sim proves logic+safety+signals+timing, real motion needs the bench (bind GPIO to board MMIO base)" as *u8, 0, tot) 142 143 sw("--- DISTRIBUTION ---\n" as *u8) 144 sw(" ABSENT=" as *u8); sn(tot[0]) 145 sw(" PRESENT=" as *u8); sn(tot[1]) 146 sw(" PARITY=" as *u8); sn(tot[2]) 147 sw(" EXCEEDS=" as *u8); sn(tot[3]) 148 let total: i64 = tot[0]+tot[1]+tot[2]+tot[3] 149 sw(" TOTAL_CELLS=" as *u8); sn(total) 150 sw("\n (honest ratchet: PRESENT needs a passing gate; PARITY/EXCEEDS need an adversarial measured head-to-head. Never self-scored.)\n" as *u8) 151 sw(" invalid_rows=" as *u8); sn(tot[4]); sw("\n" as *u8) 152 153 // NEGATIVE CONTROL -- prove the liar-kill actually fires 154 var neg_ok: i64 = 1 155 if cap_valid(G_EXCEEDS, 0) != 0 { neg_ok = 0 } // fake EXCEEDS, no evidence -> MUST be invalid 156 if cap_valid(G_PARITY, 0) != 0 { neg_ok = 0 } // fake PARITY, no evidence -> MUST be invalid 157 if cap_valid(G_EXCEEDS, 1) != 1 { neg_ok = 0 } // EXCEEDS WITH evidence -> valid 158 if cap_valid(G_PRESENT, 0) != 1 { neg_ok = 0 } // PRESENT, no evidence -> valid (allowed) 159 sw(" NEG-CONTROL liar-kill fires correctly: " as *u8); if neg_ok==1 { sw("YES\n" as *u8) } else { sw("NO\n" as *u8) } 160 161 var green: i64 = 0 162 if tot[4] == 0 { if neg_ok == 1 { green = 1 } } 163 if green == 1 { sw("VERDICT: GREEN (scorecard honest; PRESENT cells gate-backed; no unproven PARITY/EXCEEDS; liar-kill armed)\n" as *u8); sys_exit(0) } 164 sw("VERDICT: RED\n" as *u8) 165 sys_exit(1) 166 return 1 167}