nx_galx_media_census.nx
buildroot/runtime/nx_galx_media_census.nx
about
nx_galx_media_census.nx -- SOVEREIGN media-delivery census for the gallery (operator 2026-06-23:
"most of the media wasnt working its not fast its not ai upscaling on demand ... dont use sh use our
own nishi ecosystem"). Replaces the sh recon with a sovereign organ: reads the LIVE NAS state directly
via syscalls (the NAS is mounted at /mnt/nas_ai = /volume1/ai on the box), samples coverage per media
type, classifies WORKING/DEGRADED. No sh, no pipelines. license_tier: ORIGINAL
IMAGE THUMBS : thumbs/<cid>.jpg present? (cold => /thumb falls back to full-res = slow grid)
VIDEO POSTERS : <video>-poster.jpg present? (absent => /vidthumb 404 = blank video tile = "not working")
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_itoa_lib.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
| 11 | const MC_MAGIC_2048: i64 = 2048 |
| 13 | const MC_CAP: i64 = 524288 // 512KB bounded prefix (flaky-SMB tolerant; enough for the sample) |
| 14 | const MC_SAMPLES: i64 = 60 |
| 15 | const MC_BASE: *u8 = "/mnt/nas_ai/galx" |
functions
| 17 | func mc_strlen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } called by 1: mc_puts |
| 18 | func mc_puts(s: *u8) -> i64 { sys_write(1, s, mc_strlen(s)); return 0 } |
| 23 | func mc_putn(v: i64) -> i64 { nxi_out(v); return 0 } |
| 24 | func mc_cat(dst: *u8, off: i64, s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { dst[off + i] = s[i]; i = i + 1 } return off + i } |
| 26 | func mc_find(buf: *u8, lo: i64, hi: i64, pat: *u8, pl: i64) -> i64 called by 1: mc_sample_posters |
| 38 | func mc_read_prefix(path: *u8, buf: *u8, cap: i64) -> i64 |
| 45 | func mc_exists(path: *u8) -> i64 { let fd: i64 = sys_openat_rd(path); if fd < 0 { return 0 } sys_close(fd); return 1 } |
| 48 | func mc_sample_thumbs(buf: *u8, n: i64, out_tot: *i64) -> i64 |
| 79 | func mc_sample_posters(buf: *u8, n: i64, out_tot: *i64) -> i64 |
| 113 | func mc_pct(have: i64, tot: i64) -> i64 { if tot <= 0 { return 0 } return (have * 100) / tot } |
| 114 | func mc_verd(have: i64, tot: i64) -> i64 |
| 120 | func main() -> i64 |