code wiki / _hdl_build / nx_mirror_orchestrator_gate.nx
nx_mirror_orchestrator_gate.nx
buildroot/runtime/_hdl_build/nx_mirror_orchestrator_gate.nx
about
nx_mirror_orchestrator_gate.nx -- GATE for nx_mirror_orchestrator (rung-1: the deterministic, NEVER-BRICK core
of "mirror a published open artifact -> NAS + receipt", composing the shipped sovereign primitives). Proves,
with NO live network and NO NAS write:
T1 SCHEME RESOLVE -- http/https->HTTP, torrent/magnet->TORRENT, unknown->REJECT (fail-closed transport).
T2 BYTE-EXACT VERIFY-- sha256("abc") == the FIPS-180-4/NIST vector; mo_verify PASSES the true digest and
FAILS a flipped one (never-store-corrupt: a byte-flipped/truncated/MITM'd file is rejected).
T3 IDEMPOTENT KEY -- content-address key = sha|dest, deterministic (re-run identical) -> re-mirror = no-op.
T4 RECEIPT SHAPE -- mo_receipt_bind emits EXACTLY status|sha|dest|verify|ts (the nx_pub_receipt binding rung-2 signs).
T5 MANIFEST PARSE -- a TAB-delimited manifest row splits into name/scheme/source/sha/dest; missing field -> empty.
T6 DRY PLAN / NEVER-BRICK -- an integrated dry plan (parse->resolve->verify->key->receipt) completes with ZERO
live side effects, deterministically. Then prints the Apertus-shaped MIRROR PLAN (dry).
GREEN iff T1-T6 pass. Sovereign nx_cc->nxasm (no gcc). expect_exit: 0 license_tier: ORIGINAL
dependencies 2 imports · 0 importers
imports: nx_mirror_orchestrator.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
| 16 | 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 } |
| 17 | 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 } |
| 20 | func build_row(out: *u8, a: *u8, b: *u8, c: *u8, d: *u8, e: *u8) -> i64 |
| 28 | func main() -> i64 |