code wiki / _hdl_build / nx_brand_snap_gate.nx
nx_brand_snap_gate.nx
buildroot/runtime/_hdl_build/nx_brand_snap_gate.nx
about
nx_brand_snap_gate.nx -- grid snapping + alignment guides. 100% sovereign. expect_exit: 0
MIGRATED 2026-07-31 onto nx_gate_verdict (D001, ws=gate-dry-d001) in the MINIMAL form -- the shape a
mechanical applier can generate. Deliberately NOT a full rewrite: t_row and every check row are left
EXACTLY as they were, so the PASS/FAIL vector is unchanged by construction. The only thing replaced is
the hand-rolled verdict tail, which is precisely the debt D001 names ("gates roll their own verdict").
The gate's own tot[] counters are handed straight to gv_verdict, so the ecosystem's ONE judge now sees
this gate in the canonical "NX-<NAME> passed p/t verdict=..." shape instead of a bespoke line that
happened to read "VERDICT=verdict=GREEN".
WHY MINIMAL IS THE RIGHT FIRST RUNG: it is mechanically generatable across the ~950 gates that share
this counter idiom, it cannot change the check vector, and it still collects the payoff -- canonical
verdict shape today, and the gv_journal harness outcome frame for free on trees whose base class has it.
Full gv_check adoption is a later, optional rung; it is not required to eat the debt.
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_brand_snap.nxnx_gate_verdict.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| none |
functions
| 18 | func gw(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 19 | func gn(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 } |
| 20 | func t_row(name: *u8, ok: i64, tot: *i64) -> i64 |
| 25 | func main() -> i64 |