nx_asset_status_gate.nx
buildroot/runtime/nx_asset_status_gate.nx
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
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
structs
| none |
consts
| none |
functions
| 32 | func g_puts(logfd: i64, s: *u8) -> i64 |
| 39 | func g_putn(logfd: i64, v: i64) -> i64 |
| 54 | func E() -> *u8 { return "\x00" as *u8 } called by 1: mk_and_ingest |
| 55 | func sset(a: *i64, i: i64, s: *u8) -> i64 { a[i] = s as i64; return 0 } called by 1: mk_and_ingest |
| 57 | func mk_rec(core: *i64, prov: *i64, media: *i64, org: *i64, out: *u8) -> i64 |
| 65 | func mk_prefix(prefix: *u8, base: *u8, salt: i64) -> i64 |
| 82 | func mk_and_ingest(prefix: *u8, typ: *u8, provclass: *u8, current: *u8, is_image: i64, idtag: *u8) -> i64 |
| 104 | func main() -> i64 |