code wiki / _hdl_build / nx_apertus_receipt.nx

nx_apertus_receipt.nx

buildroot/runtime/_hdl_build/nx_apertus_receipt.nx

5136 B69 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind tooltopic apertus
docsdependenciesstructsconstsfunctions

about

nx_apertus_receipt.nx -- PROVENANCE RECEIPT for the sovereign Apertus mirror (the "exceed" that apertvs.ai has no analog for: they PUBLISH the model; we emit a reproducible, machine+human-readable RECEIPT that YOUR local copy is byte-exact against their own digests). Confirms each shard is present at its exact size (lseek) and records the sha256 that nx_apertus_shard_verify already matched against HuggingFace's lfs.oid, then writes /mnt/nas_ai/apertus/PROVENANCE.txt. No TLS/crypto import here (the verify already proved the hashes) -> tiny, no-9p-stress write. A future rung signs this with Ed25519 (nx_pub_receipt rcpt_emit) once a publisher key is set. license_tier: ORIGINAL expect_exit: 0

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_apertus_receipt.nx

imports: nx_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 sys_mmap rc_cat file_size sys_openat_rd sys_lseek sys_close rc_dec sys_mmap ↻ sys_openat_wr sys_exit sys_write ↻ sys_close ↻

structs

none

consts

9const K_MAGIC_4999776656: i64 = 4999776656
10const K_MAGIC_4882374192: i64 = 4882374192
11const K_MAGIC_4974647808: i64 = 4974647808
12const K_MAGIC_1249928160: i64 = 1249928160
13const K_MAGIC_8192: i64 = 8192
14const K_MAGIC_1024: i64 = 1024

functions

16func 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 1: main calls 1: sys_write
17func rc_cat(dst: *u8, off: i64, s: *u8) -> i64 { var o: i64=off; var i: i64=0; while s[i]!=(0 as u8){dst[o]=s[i];o=o+1;i=i+1} return o }
called by 1: main
18func rc_dec(dst: *u8, off: i64, v: i64) -> i64 { var o: i64=off; if v==0 { dst[o]=48 as u8; return o+1 } let t:*u8=sys_mmap(24); var k:i64=0; var m:i64=v; while m>0 { t[k]=(48+(m%10)) as u8; m=m/10; k=k+1 } var j:i64=k-1; while j>=0 { dst[o]=t[j]; o=o+1; j=j-1 } return o }
called by 1: main calls 1: sys_mmap
19func file_size(path: *u8) -> i64 { let fd: i64=sys_openat_rd(path); if fd<0 { return 0-1 } let sz: i64=sys_lseek(fd,0,2); sys_close(fd); if sz<0 { return 0-1 } return sz }
21func main() -> i64