nx_asset_status.nx
buildroot/runtime/nx_asset_status.nx
about
nx_asset_status.nx -- R5 "WHAT'S GOING ON" + "WHAT WE HAVE" aggregator.
Computes the DASHBOARD STATISTICS over the asset catalog: total assets, counts by type, counts by
provenance class, freshness (how many is_current), and -- composing R4 -- the task-signal totals by
code. This is the data layer the live /wiki/assets.html dashboard renders; it is PURE / deterministic:
every number is COUNTED from the catalog snapshot (+ the R4 as_scan over it), never fabricated
(org_research.tsv CONFIRMED: status-awareness-dashboard, task-signals-derived).
ZERO NEW STORAGE -- pure COMPOSITION (Rule 15, DRY):
* catalog enumeration + bytes + count -> nx_asset_catalog (cat_list / cat_get / cat_count)
* record field access -> nx_asset_record (ar_decode / ar_get)
* derived task signals -> nx_asset_signals (as_scan, + the 7 SIG_* code labels)
HONESTY (Rule 4): as_scan needs two AUX inputs that cannot be answered from record bytes alone --
perceptual phashes (NEAR_DUP) and signed credentials (MISSING_PROVENANCE binding). The caller supplies
them PARALLEL to cat_list order; production passes ZEROS (no pixel decode / no credentials minted yet),
which makes NEAR_DUP impossible-to-claim and MISSING_PROVENANCE deny-by-default true for every record
-- the genuine current TO-DO state, not a flattering one. A future rung that decodes pixels / mints
credentials feeds real aux arrays here unchanged.
No hardware/persistent-firmware writes (Rule 26). license_tier: ORIGINAL
dependencies 4 imports · 3 importers
imports: nx_syscalls.nxnx_asset_record.nxnx_asset_catalog.nxnx_asset_signals.nx
imported by: nx_asset_dashboard_gate.nxnx_asset_dashboard_lib.nxnx_asset_status_gate.nx
structs
| none |
consts
| 26 | const K_MAGIC_4096: i64 = 4096 |
functions
| 30 | func st_cap() -> i64 { return 32 } |
| 31 | func ST_TOTAL() -> i64 { return 0 } |
| 32 | func ST_T_DOC() -> i64 { return 1 } |
| 33 | func ST_T_IMAGE() -> i64 { return 2 } |
| 34 | func ST_T_VIDEO() -> i64 { return 3 } |
| 35 | func ST_T_AUDIO() -> i64 { return 4 } |
| 36 | func ST_T_DATASET() -> i64 { return 5 } |
| 37 | func ST_T_PRODUCT() -> i64 { return 6 } |
| 38 | func ST_T_OTHER() -> i64 { return 7 } |
| 39 | func ST_P_MACHINE() -> i64 { return 8 } |
| 40 | func ST_P_HUMAN() -> i64 { return 9 } |
| 41 | func ST_P_DOWNLOAD() -> i64 { return 10 } |
| 42 | func ST_P_NONE() -> i64 { return 11 } |
| 43 | func ST_CURRENT() -> i64 { return 12 } // is_current == "1" |
| 44 | func ST_NOTCURRENT() -> i64 { return 13 } // is_current != "1" (soft-retired / absent) |
| 45 | func ST_SIG_TOTAL() -> i64 { return 14 } |
| 47 | func ST_SIG_PROV() -> i64 { return 15 } // MISSING_PROVENANCE |
| 48 | func ST_SIG_UNTAG() -> i64 { return 16 } // UNTAGGED |
| 49 | func ST_SIG_META() -> i64 { return 17 } // MISSING_METADATA |
| 50 | func ST_SIG_NEARDUP() -> i64 { return 18 } // NEAR_DUP |
| 51 | func ST_SIG_STALE() -> i64 { return 19 } // STALE |
| 52 | func ST_SIG_ORPHAN() -> i64 { return 20 } // ORPHANED |
| 53 | func ST_SIG_UNTRANS() -> i64 { return 21 } // UNTRANSCODED |
| 55 | func st_streq(a: *u8, b: *u8) -> i64 called by 1: st_compute |
| 64 | func st_present(v: *u8) -> i64 called by 1: st_compute |
| 74 | func st_compute(prefix: *u8, phashes: *i64, cred_ptr: *i64, cred_len: *i64, pubkey: *u8, out: *i64) -> i64 |
| 145 | func st_compute_live(prefix: *u8, out: *i64) -> i64 |