nx_asset_signals_gate.nx
buildroot/runtime/nx_asset_signals_gate.nx
about
nx_asset_signals_gate.nx -- KAT + TEETH for nx_asset_signals (R4 "what we need to do" pillar).
Builds a FIXTURE catalog with KNOWN issues and proves the EXACT task signals are derived, that a
fully-clean record yields ZERO signals (TEETH: no false positives), and that the derived signals can
be EMITTED to a DEDICATED namespace and READ BACK (emission is verifiable end-to-end):
record1 image, width+height present, has relations, is_current=1, HAS a phash, NO credential,
tags EMPTY -> EXPECT exactly { MISSING_PROVENANCE, UNTAGGED }
record2 image, width/height ABSENT, tagged, valid credential, has relations, is_current=1
-> EXPECT exactly { MISSING_METADATA }
record3 image, full metadata, tagged, valid credential, has relations, is_current=1, phash = P
record4 image, full metadata, tagged, valid credential, has relations, is_current=1, phash = P
(record3 & record4 share an IDENTICAL perceptual fingerprint = a near-dup pair)
-> EXPECT exactly { NEAR_DUP } for EACH of record3, record4
record5 image, full metadata, tagged, valid credential, has relations, is_current=1, UNIQUE phash
-> EXPECT ZERO signals (the TEETH: a clean record triggers nothing)
Assertions:
(a) every EXPECTED (cid, code) signal is present in as_scan's output
(b) NO UNEXPECTED signal exists (exact-set: total derived count == expected count)
(c) record5 contributes ZERO signals (clean-record teeth, checked explicitly by cid)
(d) as_emit writes them into the DEDICATED asset-signals namespace and as_list reads them ALL back,
and as_get on one key returns its TAB record with the right signal_code+cid fields (verifiable)
(e) ISOLATION: the production board store (knowledge/store/ws-) is NEVER touched (the gate uses a
fresh /tmp catalog AND the dedicated namespace prefix is a different store by construction).
Verdict appended to knowledge/status/asset_signals_gate.log (additive law #13).
expect_exit: 0 license_tier: ORIGINAL
dependencies 10 imports · 0 importers
imports: nx_syscalls.nxnx_canon_cid.nxnx_seg_store.nxnx_ed25519_signature.nxnx_asset_record.nxnx_asset_catalog.nxnx_asset_provenance.nxnx_asset_autotag.nxnx_asset_signals.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
| 41 | func g_puts(logfd: i64, s: *u8) -> i64 |
| 48 | func g_putn(logfd: i64, v: i64) -> i64 |
| 62 | func g_streq(a: *u8, b: *u8) -> i64 |
| 72 | func E() -> *u8 { return "\x00" as *u8 } called by 1: main |
| 73 | func sset(a: *i64, i: i64, s: *u8) -> i64 { a[i] = s as i64; return 0 } called by 1: main |
| 76 | func g_cat(dst: *u8, off: i64, src: *u8) -> i64 called by 1: main |
| 84 | func mk_rec(core: *i64, prov: *i64, media: *i64, org: *i64, out: *u8) -> i64 |
| 92 | func mk_prefix(prefix: *u8, base: *u8, salt: i64) -> i64 |
| 108 | func sig_has(out_signals: *i64, cap: i64, count: i64, cid: *u8, code: *u8) -> i64 |
| 119 | func sig_count_for(out_signals: *i64, cap: i64, count: i64, cid: *u8) -> i64 |
| 131 | func fill_gray(buf: *u8, w: i64, h: i64, seed: i64) -> i64 called by 1: main |
| 144 | func main() -> i64 |