code wiki / (root) / nx_asset_record_gate.nx

nx_asset_record_gate.nx

buildroot/runtime/nx_asset_record_gate.nx

19173 B332 linesdepth 8pulls 11 transitivereach 0 importersview sourcekind gate/prooftopic asset
docsdependenciesstructsconstsfunctions

about

nx_asset_record_gate.nx -- KAT + TEETH for nx_asset_record (R0 of the universal org-tooling arc). Proves the unified content-addressed ASSET RECORD on real bytes through the real durable store: (a) DETERMINISTIC IDENTITY same record bytes -> same CID; ONE changed field -> DIFFERENT CID (b) ROUND-TRIP ar_encode -> ar_put -> ar_get_by_cid -> ar_decode is byte-faithful (every field identical, byte length identical) (c) 3 PROVENANCE CLASSES human / machine(tool+model) / downloaded(source URL) each encode, store, and decode with the correct class + payload surviving (d) INTEGRITY TEETH flip ONE byte of a stored record -> recomputed CID != the stored key (tamper detected; content-address self-proof is load-bearing) Verdict logged to knowledge/status/asset_record_gate.log (append-only; ADDITIVE law #13). expect_exit: 0 license_tier: ORIGINAL

dependencies 6 imports · 0 importers

nx_syscalls.nx nx_canon_cid.nx nx_uxf_decode.nx nx_seg_store.nx nx_asset_record.nx nx_gate_verdict.nx nx_asset_record_gate.nx

imports: nx_syscalls.nxnx_canon_cid.nxnx_uxf_decode.nxnx_seg_store.nxnx_asset_record.nxnx_gate_verdict.nx

imported by: nobody (leaf or entry point)

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

main sys_openat_append g_puts sys_write sys_mmap sys_now_ms sys_mmap ↻ sys_clock_gettime_mono ar_prov_machine ar_cpy sset E mk_rec sys_mmap ↻ ar_fields sys_mmap ↻ ar_addf ar_present ar_encode canon_encode sys_mmap ↻ cc_cmp cc_w32 cc_len sys_munmap ar_cid cid_of sys_mmap ↻ sha256_digest sys_mmap ↻ sha256_init sys_mmap ↻ sha256_k sha256_update sha256_compress_ni_blocks blk_set_byte sha256_compress sha256_compress_ni blk_word sha256_final

structs

none

consts

none

functions

23func g_puts(logfd: i64, s: *u8) -> i64
called by 2: g_putnmain calls 1: sys_write
31func g_putn(logfd: i64, v: i64) -> i64
called by 1: main calls 3: sys_mmapg_putssys_write
46func g_streq(a: *u8, b: *u8) -> i64
called by 1: main
57func g_memeq(a: *u8, b: *u8, n: i64) -> i64
called by 1: main
64func E() -> *u8 { return "\x00" as *u8 }
called by 1: main
67func sset(a: *i64, i: i64, s: *u8) -> i64 { a[i] = s as i64; return 0 }
called by 1: main
71func mk_rec(core: *i64, prov: *i64, media: *i64, org: *i64, out: *u8) -> i64
called by 1: main calls 3: sys_mmapar_fieldsar_encode
78func main() -> i64