code wiki / (root) / nx_asset_catalog_gate.nx

nx_asset_catalog_gate.nx

buildroot/runtime/nx_asset_catalog_gate.nx

20305 B369 linesdepth 9pulls 12 transitivereach 0 importersview sourcekind gate/prooftopic asset
docsdependenciesstructsconstsfunctions

about

nx_asset_catalog_gate.nx -- KAT + TEETH for nx_asset_catalog (R1 of the universal org-tooling arc). Proves the content-addressed CATALOG over REAL R0 asset records through the REAL durable store: (a) INGEST 3 DISTINCT records -> cat_count==3, and each cat_get returns the byte-faithful original record bytes (the SSOT inventory round-trips) (b) DEDUP teeth -> ingest a 4th record whose bytes EQUAL record #1: status==DUP and count STAYS 3 (no second copy stored = content-addressed dedup, the load-bearing R1 claim) (c) IDEMPOTENT teeth -> re-ingest all 3: every one returns DUP, count STAYS 3 (#10) (d) LIST -> cat_list returns exactly the 3 member CIDs (set complete) (e) GET-UNKNOWN teeth -> cat_get on a CID never ingested -> not-found (graceful, no crash) Plus an OPTIONAL real-records demo (machine image + downloaded video + human doc via R0 prov helpers) in a separate catalog prefix, reporting count + that a re-ingest is DUP. Verdict appended to knowledge/status/asset_catalog_gate.log (additive law #13). expect_exit: 0 license_tier: ORIGINAL

dependencies 6 imports · 0 importers

nx_syscalls.nx nx_canon_cid.nx nx_seg_store.nx nx_asset_record.nx nx_asset_catalog.nx nx_gate_verdict.nx nx_asset_catalog_gate.nx

imports: nx_syscalls.nxnx_canon_cid.nxnx_seg_store.nxnx_asset_record.nxnx_asset_catalog.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 mk_prefix sys_now_ms sys_mmap ↻ sys_clock_gettime_mono sys_mmap ↻ 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

27func g_puts(logfd: i64, s: *u8) -> i64
called by 2: g_putnmain calls 1: sys_write
35func g_putn(logfd: i64, v: i64) -> i64
called by 1: main calls 3: sys_mmapg_putssys_write
50func g_streq(a: *u8, b: *u8) -> i64
called by 1: main
61func g_memeq(a: *u8, b: *u8, n: i64) -> i64
called by 1: main
68func E() -> *u8 { return "\x00" as *u8 }
called by 1: main
71func sset(a: *i64, i: i64, s: *u8) -> i64 { a[i] = s as i64; return 0 }
called by 1: main
75func mk_rec(core: *i64, prov: *i64, media: *i64, org: *i64, out: *u8) -> i64
called by 1: main calls 3: sys_mmapar_fieldsar_encode
85func mk_prefix(prefix: *u8, base: *u8, salt: i64) -> i64
called by 1: main calls 2: sys_now_mssys_mmap
100func main() -> i64