code wiki / (root) / nx_asset_status_gate.nx

nx_asset_status_gate.nx

buildroot/runtime/nx_asset_status_gate.nx

12499 B233 linesdepth 12pulls 28 transitivereach 0 importersview sourcekind gate/prooftopic asset
docsdependenciesstructsconstsfunctions

about

nx_asset_status_gate.nx -- KAT + TEETH for nx_asset_status (R5 dashboard stats). Builds a FIXTURE catalog with a KNOWN composition and proves st_compute reports the EXACT stats: totals by type, by provenance class, freshness, and the R4 signal totals by code. Then the TEETH: an EMPTY catalog must yield ALL ZEROS (no fabricated counts), and the reported total must EQUAL cat_count over the same prefix (the aggregator agrees with the SSOT count). record1 doc, machine, is_current=1, tagged, relations present -> only signal: MISSING_PROVENANCE record2 doc, machine, is_current=1, tagged, relations present -> only signal: MISSING_PROVENANCE record3 image, machine, is_current=1, full w/h, tagged, relations-> only signal: MISSING_PROVENANCE record4 image, human, is_current=1, full w/h, tagged, relations-> only signal: MISSING_PROVENANCE record5 image, machine, is_current=0 (STALE), full w/h, tagged, relations -> MISSING_PROVENANCE + STALE (no credentials are minted -> deny-by-default => every record reads MISSING_PROVENANCE; phashes=0 => no NEAR_DUP; tags+relations present => no UNTAGGED/ORPHANED; images carry w/h => no MISSING_METADATA; no video/audio => no UNTRANSCODED. So the signal set is exactly { 5x MISSING_PROVENANCE, 1x STALE }.) EXPECTED stats: TOTAL=5; T_DOC=2 T_IMAGE=3; P_MACHINE=4 P_HUMAN=1; CURRENT=4 NOTCURRENT=1; SIG_TOTAL=6 SIG_PROV=5 SIG_STALE=1 (all other code totals 0). Verdict appended to knowledge/status/asset_status_gate.log (additive law #13). expect_exit: 0 license_tier: ORIGINAL

dependencies 8 imports · 0 importers

nx_syscalls.nx nx_canon_cid.nx nx_seg_store.nx nx_asset_record.nx nx_asset_catalog.nx nx_asset_signals.nx nx_asset_status.nx nx_gate_verdict.nx nx_asset_status_gate.nx

imports: nx_syscalls.nxnx_canon_cid.nxnx_seg_store.nxnx_asset_record.nxnx_asset_catalog.nxnx_asset_signals.nxnx_asset_status.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 ↻ mk_and_ingest 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 cat_ingest sys_mmap ↻ cat_ingest_cid ar_cid cid_of sys_mmap ↻ sha256_digest cid_from_digest sys_munmap ↻ ss_open ss_open2 sys_mmap ↻ ss_manifest_dyn

structs

none

consts

none

functions

32func g_puts(logfd: i64, s: *u8) -> i64
called by 2: g_putnmain calls 1: sys_write
39func g_putn(logfd: i64, v: i64) -> i64
called by 1: main calls 3: sys_mmapg_putssys_write
54func E() -> *u8 { return "\x00" as *u8 }
called by 1: mk_and_ingest
55func sset(a: *i64, i: i64, s: *u8) -> i64 { a[i] = s as i64; return 0 }
called by 1: mk_and_ingest
57func mk_rec(core: *i64, prov: *i64, media: *i64, org: *i64, out: *u8) -> i64
65func mk_prefix(prefix: *u8, base: *u8, salt: i64) -> i64
called by 1: main calls 2: sys_now_mssys_mmap
82func mk_and_ingest(prefix: *u8, typ: *u8, provclass: *u8, current: *u8, is_image: i64, idtag: *u8) -> i64
called by 1: main calls 5: sys_mmapssetEmk_reccat_ingest
104func main() -> i64