code wiki / _hdl_build / nx_library_gate.nx

nx_library_gate.nx

buildroot/runtime/_hdl_build/nx_library_gate.nx

3849 B70 linesdepth 10pulls 12 transitivereach 0 importersview sourcekind gate/prooftopic library
docsdependenciesstructsconstsfunctions

about

nx_library_gate.nx -- proves the sovereign Nishi library (nx_library): NO LINK ROT (retrieve a document by CID byte-identical, which works even with the source gone), DEDUP (re-ingest same content -> DUP, count unchanged), metadata retrievable, and a liar-kill neg-control (a bogus CID is not found). Uses a stable test document so the gate is idempotent. GREEN iff all checks pass. license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_library.nx nx_library_gate.nx

imports: nx_syscalls.nxnx_library.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main lg_strlen sys_openat_wr lg_w sys_write sys_exit sys_write ↻ sys_close sys_mmap lib_ingest sys_mmap ↻ lib_read sys_openat_rd sys_read sys_close ↻ cat_ingest_cid ar_cid cid_of sys_mmap ↻ sha256_digest sys_mmap ↻ sha256_init sha256_update sha256_final cid_from_digest sys_munmap ss_open ss_open2 sys_mmap ↻ ss_manifest_dyn ss_manifest_file_dyn ss_cat ss_loadfile sys_map_file ss_readall ss_load_aux2 sys_mmap ↻ ss_cat ↻ ss_loadfile ↻ ss_r32

structs

none

consts

8const LG_DOC: *u8 = "/tmp/nishi_scilib_test.txt"
9const LG_BODY: *u8 = "NISHI-LIBRARY-TEST-DOC-v1 sovereign no-link-rot corpus.\n"

functions

11func lg_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: lg_rowmain calls 1: sys_write
12func lg_strlen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
called by 1: main
13func lg_row(id: *u8, ok: i64, pass: *i64) -> i64 { lg_w(" "); lg_w(id); lg_w(": "); if ok==1 { lg_w("OK\n"); pass[0]=pass[0]+1 } else { lg_w("FAIL\n") } return 0 }
called by 1: main calls 1: lg_w
15func main() -> i64