code wiki / _hdl_build / nx_benchmark_ref.nx
nx_benchmark_ref.nx
buildroot/runtime/_hdl_build/nx_benchmark_ref.nx
about
nx_benchmark_ref.nx -- DURABLE benchmark-reference REGISTRY (operator: "its fine to have our benchmarks but they
must exist SEPARATE or you appear to hallucinate and use them"). When a sovereign organ is built clean-room from
an external reference (a spec, an OSS algorithm), the reference itself must be MATERIALIZED as a separate, durable,
content-addressed artifact -- NOT left in the overwrite-prone srch_latest.raw and NOT merely named in prose (which
reads as hallucination). Each reference lands in knowledge/benchmarks/refs/<id>.ref (the real fetched bytes) +
<id>.meta (provenance: source_url, content_cid via the sovereign substrate hash, byte count, what it documents,
tier=REFERENCE-ONLY). SEPARATION is structural: refs are DATA under knowledge/benchmarks/refs/, sovereign code is
.nx under runtime/ and imports ONLY .nx -- no organ imports or reads a ref, so it is provably "learned-from, never
used". verify re-hashes the stored bytes and checks they match the recorded cid (real + untampered, not invented).
Usage: nx_benchmark_ref register <id> <source_url> <srcfile> <documents> | verify <id> license_tier: ORIGINAL
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_itoa_lib.nxnx_uxf_cid.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
| 14 | const K_MAGIC_1024: i64 = 1024 |
functions
| 16 | func br_slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } |
| 17 | func br_w(fd: i64, s: *u8) -> i64 { sys_write(fd, s, br_slen(s)); return 0 } |
| 18 | func br_p(s: *u8) -> i64 { br_w(1, s); return 0 } |
| 23 | func br_n(v: i64) -> i64 { nxi_out(v); return 0 } |
| 24 | func ensure_dir(path: *u8) -> i64 { __syscall(258, 0-100, path, 0x1ed, 0, 0, 0); return 0 } called by 1: register_ref |
| 25 | func cat(dst: *u8, off: i64, s: *u8) -> i64 { var i: i64=0; while s[i]!=(0 as u8){dst[off+i]=s[i];i=i+1} return off+i } called by 1: refpath |
| 26 | func contains(hay: *u8, hl: i64, needle: *u8) -> i64 |
| 32 | func refpath(id: *u8, ext: *u8, out: *u8) -> i64 |
| 37 | func register_ref(id: *u8, url: *u8, srcfile: *u8, documents: *u8) -> i64 |
| 70 | func verify_ref(id: *u8) -> i64 |
| 85 | func streq(a: *u8, b: *u8) -> i64 { var i: i64=0; while a[i]!=(0 as u8){ if a[i]!=b[i]{return 0} i=i+1 } if b[i]!=(0 as u8){return 0} return 1 } called by 1: main |
| 87 | func main(argc: i64, argv: *i64) -> i64 |