code wiki / _hdl_build / nx_library_gate.nx
nx_library_gate.nx
buildroot/runtime/_hdl_build/nx_library_gate.nx
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
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
structs
| none |
consts
| 8 | const LG_DOC: *u8 = "/tmp/nishi_scilib_test.txt" |
| 9 | const LG_BODY: *u8 = "NISHI-LIBRARY-TEST-DOC-v1 sovereign no-link-rot corpus.\n" |
functions
| 11 | func 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 } |
| 12 | func lg_strlen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } called by 1: main |
| 13 | func 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 } |
| 15 | func main() -> i64 |