code wiki / (root) / nx_asset_status.nx

nx_asset_status.nx

buildroot/runtime/nx_asset_status.nx

8505 B158 linesdepth 11pulls 26 transitivereach 4 importersview sourcekind librarytopic asset
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_asset_record.nx nx_asset_catalog.nx nx_asset_signals.nx nx_asset_status.nx nx_asset_dashboard_gate.nx nx_asset_dashboard_lib.nx nx_asset_status_gate.nx

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

26const K_MAGIC_4096: i64 = 4096

functions

30func st_cap() -> i64 { return 32 }
31func ST_TOTAL() -> i64 { return 0 }
32func ST_T_DOC() -> i64 { return 1 }
33func ST_T_IMAGE() -> i64 { return 2 }
34func ST_T_VIDEO() -> i64 { return 3 }
35func ST_T_AUDIO() -> i64 { return 4 }
36func ST_T_DATASET() -> i64 { return 5 }
37func ST_T_PRODUCT() -> i64 { return 6 }
38func ST_T_OTHER() -> i64 { return 7 }
called by 2: st_computemain
39func ST_P_MACHINE() -> i64 { return 8 }
40func ST_P_HUMAN() -> i64 { return 9 }
41func ST_P_DOWNLOAD() -> i64 { return 10 }
42func ST_P_NONE() -> i64 { return 11 }
43func ST_CURRENT() -> i64 { return 12 } // is_current == "1"
44func ST_NOTCURRENT() -> i64 { return 13 } // is_current != "1" (soft-retired / absent)
45func ST_SIG_TOTAL() -> i64 { return 14 }
47func ST_SIG_PROV() -> i64 { return 15 } // MISSING_PROVENANCE
48func ST_SIG_UNTAG() -> i64 { return 16 } // UNTAGGED
49func ST_SIG_META() -> i64 { return 17 } // MISSING_METADATA
50func ST_SIG_NEARDUP() -> i64 { return 18 } // NEAR_DUP
51func ST_SIG_STALE() -> i64 { return 19 } // STALE
52func ST_SIG_ORPHAN() -> i64 { return 20 } // ORPHANED
53func ST_SIG_UNTRANS() -> i64 { return 21 } // UNTRANSCODED
55func st_streq(a: *u8, b: *u8) -> i64
called by 1: st_compute
64func st_present(v: *u8) -> i64
called by 1: st_compute
74func st_compute(prefix: *u8, phashes: *i64, cred_ptr: *i64, cred_len: *i64, pubkey: *u8, out: *i64) -> i64
145func st_compute_live(prefix: *u8, out: *i64) -> i64
called by 3: maindp_emitmain calls 2: sys_mmapst_compute