nx_capres_gate.nx
buildroot/runtime/nx_capres_gate.nx
about
nx_capres_gate.nx -- THE GATE FOR THE CAPTURE-RESOLUTION RULER (subject: nx_capres / nx_capres_lib).
WHAT IT PROVES, AND WHY EACH TOOTH EXISTS:
* the ruler READS a resolution out of a real capture header rather than assuming one (PNG + NXFH1)
* a capture below its subject's declared full resolution is REFUSED, not rounded up
* a judge whose ceiling sits below the capture is reported BLIND -- that is NO score, not a low one
* every "I could not look" path abstains (UNPROVEN) instead of acquitting
* the shipped conf actually declares the subject the world lane depends on, and declares it ONCE
* the CLI's EXIT CODE carries the verdict, checked by forking the real binary
THE REQUIRED NEGATIVE CONTROL is neg-control-downsampled-capture-must-not-verdict-FULL: the whole
policy is worthless if a reduced capture can pass, so a tooth asserts that it CANNOT. It is paired
with a bite cell (fires on the reduced input, silent on the full one), because a detector that has
only ever seen good input has not been shown to fire.
FIXTURES ARE ASSEMBLED AT RUNTIME in /tmp/, never checked in and never under knowledge/store: a gate
that shares a fixture with a production beat measures the fixture, and a detector that scans source
will find its own fixture written as a literal.
license_tier: ORIGINAL No hw writes (Rule 26).
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_gate_verdict.nxnx_capres_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
| 24 | const CG_MODE_644: i64 = 420 |
| 25 | const CG_FIX_PNG: *u8 = "/tmp/nx_capres_gate_full.png" as *u8 |
| 26 | const CG_FIX_PNG_SMALL: *u8 = "/tmp/nx_capres_gate_small.png" as *u8 |
| 27 | const CG_FIX_NXFH: *u8 = "/tmp/nx_capres_gate_frame.nxfh" as *u8 |
| 28 | const CG_FIX_JUNK: *u8 = "/tmp/nx_capres_gate_junk.bin" as *u8 |
| 29 | const CG_ELF: *u8 = "./nx_capres.elf" as *u8 |
| 30 | const CG_SUBJECT: *u8 = "world" as *u8 |
| 31 | const CG_OUT_BYTES: i64 = 64 |
| 32 | const CG_FIXBUF: i64 = 256 |
| 33 | const CG_JUNK_LEN: i64 = 64 |
| 34 | const CG_JUNK_FILL: i64 = 90 // an ASCII letter: junk that is plainly neither PNG nor NXFH1 |
| 35 | const CG_IHDR_LEN: i64 = 13 // RFC 2083: IHDR carries exactly 13 bytes |
| 36 | const CG_U32: i64 = 4 |
| 37 | const CG_BYTE_BASE: i64 = 256 |
| 43 | const CG_SMALL_DIV: i64 = 8 // q=8 -- the value nx_world_snap was MEASURED landing on |
functions
| 45 | func cg_u32be(b: *u8, off: i64, v: i64) -> i64 called by 1: cg_write_png |
| 57 | func cg_write_png(path: *u8, w: i64, h: i64) -> i64 |
| 82 | func cg_num_into(b: *u8, o: i64, v: i64) -> i64 |
| 95 | func cg_write_nxfh(path: *u8, w: i64, h: i64) -> i64 |
| 118 | func cg_write_junk(path: *u8) -> i64 |
| 132 | func cg_present(rc: i64) -> i64 called by 1: main |
| 139 | func cg_run3(elf: *u8, a1: *u8, a2: *u8, a3: *u8) -> i64 |
| 159 | func main(argc: i64, argv: *i64) -> i64 |