code wiki / _hdl_build / nx_weights_pull_gate.nx

nx_weights_pull_gate.nx

buildroot/runtime/_hdl_build/nx_weights_pull_gate.nx

3761 B51 linesdepth 7pulls 8 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

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

nx_weights_pull.nx nx_hf_tree_parse.nx nx_syscalls.nx nx_weights_pull_gate.nx

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

main w sys_write wp_pull_shard sys_mmap ss_stream_store sys_mmap ↻ sha256_init sys_mmap ↻ sha256_k sys_openat_wr sha256_update sha256_compress_ni_blocks blk_set_byte sha256_compress sha256_compress_ni blk_word blk_byte sys_write ↻ sys_close sha256_final blk_set_byte ↻ sha256_compress ↻ wp_hexenc wp_streq wn w ↻ sys_mmap ↻ sys_write ↻ sys_mmap ↻ hft_lfs_oid hft_find hft_copy_hex hft_is_hex sys_exit

structs

none

consts

none

functions

13func w(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
called by 2: wnmain calls 1: sys_write
14func 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 }
called by 1: main calls 3: wsys_mmapsys_write
16func main() -> i64