code wiki / (root) / nx_blob_gate.nx

nx_blob_gate.nx

buildroot/runtime/nx_blob_gate.nx

5275 B125 linesdepth 7pulls 8 transitivereach 0 importersview sourcekind gate/prooftopic blob
docsdependenciesstructsconstsfunctions

about

nx_blob_gate.nx -- REFEREE for R2-refine (nx_blob largest connected blob). 64x64 RGB, grid=32 (cell=2px), skin=(200,120,90): COMPACT : a 32x32 skin block at (16,16) -> ONE blob of 16x16=256 cells, bbox grid (8,8..23,23). (localizes to the block, not the frame) FRAMEFILL: whole frame skin -> ONE blob of all 1024 cells. SCATTER : ~221 permille random skin -> few/no cells reach 50% -> largest blob TINY (<< compact). NEG-CONTROL: high skin fraction but no real region -> CCL rejects it (the fix vs global-bbox). TWOBLOCK : two separated 16x16 skin blocks -> largest blob = ONE block (64 cells, bbox width 8), NOT a merged box spanning both. Every measured value PRINTED. stdout + knowledge/status/blob_gate.log. Exit 0 GREEN / 1 RED. Sovereign: syscalls + nx_image + nx_presence + nx_blob. license_tier: ORIGINAL

dependencies 4 imports · 0 importers

syscalls.nx nx_image.nx nx_presence.nx nx_blob.nx nx_blob_gate.nx

imports: syscalls.nxnx_image.nxnx_presence.nxnx_blob.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 ↻ scatter_skin nx_image_set ↻ nx_blob_largest nx_image_get nx_skin_is_pixel nx_blob_union nx_blob_find nx_blob_find ↻ report gp ↻ gn

structs

none

consts

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

functions

24func gp(logfd: i64, s: *u8) -> i64
called by 2: reportmain
31func gn(logfd: i64, v: i64) -> i64
called by 1: report
45func fill_rgb(img: *Image, r: i64, g: i64, b: i64) -> i64
called by 1: main calls 1: nx_image_set
52func 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
59func scatter_skin(img: *Image, count: i64, seed: i64) -> i64
called by 1: main calls 1: nx_image_set
72func report(logfd: i64, label: *u8, o: *i64) -> i64
called by 1: main calls 2: gpgn
81func main() -> i64