code wiki / (root) / nx_media_run_gate.nx

nx_media_run_gate.nx

buildroot/runtime/nx_media_run_gate.nx

5664 B147 linesdepth 6pulls 8 transitivereach 0 importersview sourcekind gate/prooftopic media
docsdependenciesstructsconstsfunctions

about

nx_media_run_gate.nx -- REFEREE for EXPOSURE rung X0 (nx_ppm + nx_media_run). Proves the REAL-FILE path end to end (not synthetic in-memory pixels): 1. build a 64x64 person frame (gray bg + 32x32 skin blob), WRITE it as a real PPM to the staging input path the tool reads. 2. READ it back from disk and PARSE the PPM -> *Image. 3. run presence on the PARSED-FROM-FILE image -> must be PRESENT, skin 250 permille, bbox [16,16..47,47]. 4. PPM write/read ROUND-TRIP: write the parsed image again, re-read, and confirm dims + sample pixels survive (blob pixel = skin, bg pixel = gray). Side effect: leaves knowledge/staging/media/frame.ppm in place so `nx_media_run` can be run immediately afterwards on real input. Every measured value PRINTED. stdout + knowledge/status/media_run_gate.log. Exit 0 GREEN / 1 RED. Sovereign: syscalls + nx_image + nx_ppm + nx_presence. license_tier: ORIGINAL

dependencies 4 imports · 0 importers

syscalls.nx nx_image.nx nx_ppm.nx nx_presence.nx nx_media_run_gate.nx

imports: syscalls.nxnx_image.nxnx_ppm.nxnx_presence.nx

imported by: nobody (leaf or entry point)

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

main sys_openat_append gp nx_image_alloc sys_mmap fill_rgb nx_image_set block_rgb nx_image_set ↻ ppm_write sys_openat_wr ppm_wr_int gn sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close ppm_parse ppm_read_int ppm_skip_ws ppm_is_ws nx_image_alloc ↻ nx_presence_scan nx_image_get nx_skin_is_pixel nx_presence_classify nx_image_get ↻

structs

none

consts

22const W: i64 = 64
23const H: i64 = 64

functions

25func gp(logfd: i64, s: *u8) -> i64
called by 1: main
32func gn(logfd: i64, v: i64) -> i64
called by 1: main
46func fill_rgb(img: *Image, r: i64, g: i64, b: i64) -> i64
called by 1: main calls 1: nx_image_set
58func block_rgb(img: *Image, x0: i64, y0: i64, bw: i64, bh: i64, r: i64, g: i64, b: i64) -> i64
called by 1: main calls 1: nx_image_set
71func main() -> i64