nx_gate_green_test.nx
buildroot/runtime/nx_gate_green_test.nx
about
nx_gate_green_test.nx -- KATs for the shared last-verdict-line judge (GATE).
T3 is the construction that caught the scorecard's false-green bug: the LAST anchor line says
rc=1, a LATER unrelated line says rc=0 -- the judge must say RED (the buggy whole-tail window
said GREEN).
seq585 (2026-07-23): THIS KAT USED TO CERTIFY THE BUG. Its case 4 read
// 4: anchor absent = ABSENT = red
and asserted 0 -- pinning as INTENDED the exact conflation that made 953 runnable, genuinely
PASSING gates machine-read as NOT-GREEN. The 1/0 cases are KEPT (they prove the wrapper
contract is unbroken for all 14 live call sites, rule 19); T7-T13 are the discriminating
teeth: an absent anchor must read UNJUDGEABLE, a missing file UNREADABLE, and neither may
equal RED. MIGRATE-ON-TOUCH (D001): this gate now emits via nx_gate_verdict, so the judge's
own test is no longer one of the unjudgeable gates it exists to protect against.
license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0
dependencies 4 imports · 0 importers
imports: nx_str.nxnx_syscalls.nxnx_gate_verdict.nxnx_gate_green.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
| 22 | const GT_GREEN: i64 = 1 |
| 23 | const GT_RED: i64 = 0 |
| 24 | const GT_UNJUDGEABLE: i64 = 0 - 1 |
| 25 | const GT_UNREADABLE: i64 = 0 - 2 |
| 26 | const GT_NOSUCH: *u8 = "knowledge/status/nx_gate_green_no_such_file.log" |
functions
| 28 | func gt_green_is(log: *u8, anchor: *u8, pat: *u8, want: i64) -> i64 |
| 33 | func gt_judge(log: *u8, anchor: *u8, pat: *u8) -> i64 |
| 36 | func gt_judge_is(log: *u8, anchor: *u8, pat: *u8, want: i64) -> i64 |
| 42 | func main() -> i64 |