nx_photo_count_gate.nx
buildroot/runtime/nx_photo_count_gate.nx
about
nx_photo_count_gate.nx -- REFEREE for the five-pics fix and the conversation-album arithmetic (2026-08-30): a photo count
parses from digits AND number words but ONLY beside a photo noun, clamps to the batch cap, and is spliced out of the scene
the diffusion model reads (the measured defect: "send me five pics" clamped to ONE request whose prompt still said "five
pics", so the model painted a five-panel collage into one image); the album emitter groups tsv rows into days under a
clock offset with hand-derivable 1970-epoch fixtures. GPU-free, in-process (imports the orchestrator lib directly).
license_tier: ORIGINAL expect_exit: 0
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_gate_verdict.nxnx_gen_orchestrator.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 PG_TOKBUF: i64 = 32 |
| 12 | const PG_OUT: i64 = 8192 |
| 13 | const PG_ALBUM_FIXTURE: *u8 = "0\tnxc1-aa\n86399\tnxc1-bb\n86400\tnxc1-cc\n" as *u8 |
functions
| 15 | func pg_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 16 | func pg_eq(a: *u8, b: *u8) -> i64 { var i: i64 = 0; while a[i] == b[i] { if a[i] == (0 as u8) { return 1 } i = i + 1 } return 0 } called by 1: main |
| 17 | func pg_find(buf: *u8, n: i64, needle: *u8) -> i64 |
| 31 | func pg_count(s: *u8, tok: *i64) -> i64 { return go_parse_count_any(s, pg_len(s), tok) } |
| 33 | func main() -> i64 |