code wiki / _hdl_build / nx_editjudge_gate.nx
nx_editjudge_gate.nx
buildroot/runtime/_hdl_build/nx_editjudge_gate.nx
about
nx_editjudge_gate.nx -- proves the edit-compliance judge distinguishes the three outcomes that a
single "did it change" number would blur, and that its hue primitive is correct. Imports the same
lib the tool ships.
T1 PERFECT SHIFT : ref yellow, gen green -> compliance ~1000, shifted == masked.
T2 NO CHANGE : ref yellow, gen STILL yellow -> compliance ~0, stayed == masked. THIS IS THE
EXACT FAILURE the retention loop hid; the judge MUST score it near zero.
T3 WRONG CHANGE : ref yellow, gen blue -> compliance ~0, drifted == masked. "changed" but not to
target must NOT count as compliance -- a magnitude-only judge would pass this.
T4 PARTIAL : half the masked pixels shifted -> compliance ~500 (orders correctly).
T5 EMPTY MASK : ref all gray (no from_hue garment) -> masked 0, compliance 0, NO divide fault.
An edit with nothing to edit is not a passing edit.
T6 HUE MATH : pure R/G/B/Y map to 0/120/240/60 degrees (the primitive is correct, not lucky).
T7 SAT GATE : a DESATURATED pixel at from_hue is excluded from the mask (a washed-out near-gray
cannot be trusted to carry a hue, and would poison the count).
T8 ORTHOGONALITY : the identical image (ref==gen) scores compliance 0 -- i.e. maximum RETENTION
yields minimum COMPLIANCE, which is the whole reason a second judge exists.
expect_exit: 0 license_tier: ORIGINAL
dependencies 1 imports · 0 importers
imports: nx_editjudge_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
| 41 | const G_FROM: i64 = 50 // yellow anchor |
| 42 | const G_TO: i64 = 130 // green anchor |
functions
| 21 | func gw(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } called by 1: main |
| 22 | func gn(v: i64) -> i64 called by 1: main |
| 35 | func g_fill(buf: *u8, npix: i64, r: i64, g: i64, b: i64) -> i64 called by 1: main |
| 44 | func main() -> i64 |