code wiki / _hdl_build / nx_weights_pull_gate.nx
nx_weights_pull_gate.nx
buildroot/runtime/_hdl_build/nx_weights_pull_gate.nx
about
nx_weights_pull_gate.nx -- GATE for the capstone verified-pull logic (composes M2b tree-parse + M3 stream-store).
Uses "abc" as a stand-in shard (sha256 = the FIPS vector ba7816bf...f20015ad):
T1 VERIFIED wp_pull_shard("abc", expected=abc-digest) == 1 (streamed, hashed, digest matches -> stored)
T2 TAMPER wp_pull_shard("abd", expected=abc-digest) == 0 (one byte flipped -> fail-closed, rejected)
T3 TRUNCATION wp_pull_shard("ab", expected=abc-digest) == 0 (short read -> fail-closed, rejected)
T4 COMPOSE hft_lfs_oid(fixture tree) -> the expected digest; that digest drives wp_pull_shard -> 1
(proves the HF-published per-file digest is exactly what the fail-closed verify checks against)
GREEN iff T1-T4 pass. Sovereign nx_cc->nxasm. expect_exit: 0 license_tier: ORIGINAL
dependencies 3 imports · 0 importers
imports: nx_weights_pull.nxnx_hf_tree_parse.nxnx_syscalls.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
| 13 | func w(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 14 | func wn(v: i64) -> i64 { var m: i64=v; if m<0{w("-" as *u8);m=0-m} let t:*u8=sys_mmap(24); 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; let o:*u8=sys_mmap(24); while i<k{o[i]=t[k-1-i];i=i+1} sys_write(1,o,k); return 0 } |
| 16 | func main() -> i64 |