code wiki / _hdl_build / nx_meta_consumers.nx

nx_meta_consumers.nx

buildroot/runtime/_hdl_build/nx_meta_consumers.nx

7499 B146 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind tooltopic meta
docsdependenciesstructsconstsfunctions

about

nx_meta_consumers.nx -- X-CAP-006 (META-consumers-uniform). The four downstream apps -- companion(elder-ai) / apparel-store / writer-ingest / media-mining -- consume a captured-being record THROUGH THE SAME meta-layer shape: each receives the same wire bytes, parses via the SHARED ms_parse, and reads via the SHARED ms_get (nx_meta_schema, X-CAP-001). No per-consumer parser, no parallel substrate -- the modality-agnostic record is the ONE interface (rule 15 DRY). "Uniform shape" PROVEN: the four consumers' CORE identity views (modality|cid|consent|license) are byte-identical; each still PROJECTS its own modality attr through the same accessor. A rogue reader using a DIFFERENT field shape DIVERGES (negative control = the test discriminates), and the consent hard line (X-CAP-005, anti-deepfake) is enforced UNIFORMLY at every consumer. Built sovereignly (nx_cc->nxasm_x86, no gcc). license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_meta_schema.nx nx_meta_consumers.nx

imports: nx_syscalls.nxnx_meta_schema.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main sys_mmap ms_set ms_emit ms_app consumer_read sys_mmap ↻ ms_parse ms_scan mc_core_view ms_app ↻ ms_get ms_streq ms_get ↻ ms_streq ↻ ms_parse ↻ mc_rogue_view ms_app ↻ ms_get ↻ consumer_valid sys_mmap ↻ ms_parse ↻ ms_valid ms_get ↻ ms_streq ↻ mc_puts sys_write mc_putn sys_mmap ↻ sys_write ↻

structs

none

consts

13const K_MAGIC_16384: i64 = 16384

functions

15func mc_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
called by 1: main calls 1: sys_write
16func mc_putn(v: i64) -> i64 { let bb: *u8 = sys_mmap(28); var m: i64=v; if m<0 {m=0-m}; let t: *u8 = sys_mmap(28); var k: i64=0; if m==0 {t[0]=48;k=1}; while m>0 {t[k]=48+(m%10); m=m/10; k=k+1}; var i: i64=0; while i<k {bb[i]=t[k-1-i]; i=i+1}; sys_write(1, bb, k); return 0 }
called by 1: main calls 2: sys_mmapsys_write
19func mc_core_view(keys: *i64, vals: *i64, n: i64, out: *u8) -> i64
called by 1: consumer_read calls 2: ms_appms_get
33func mc_rogue_view(keys: *i64, vals: *i64, n: i64, out: *u8) -> i64
called by 1: main calls 2: ms_appms_get
48func consumer_read(wire: *u8, wlen: i64, attrkey: *u8, coreout: *u8) -> i64
60func consumer_valid(wire: *u8, wlen: i64) -> i64
called by 1: main calls 3: sys_mmapms_parsems_valid
70func main() -> i64