nx_planepeek_gate.nx
buildroot/runtime/nx_planepeek_gate.nx
about
nx_planepeek_gate.nx -- THE REFEREE FOR nx_planepeek's FALSE-ABSENCE FIX (debt 1787282525).
WHAT IS UNDER TEST. v1 of nx_planepeek printed one word -- MISS -- for five distinguishable
conditions, and that word is a NEGATIVE ASSERTION about a plane. It was quoted as proof of
absence in a build-refusal message and nearly produced a filed defect against a healthy lane.
The fix gives every condition its own word and its own exit code, and prints the coverage each
verdict was computed from. THIS GATE PROVES THE SEPARATION IS REAL, IN BOTH DIRECTIONS.
WHY IT IS END-TO-END. The defect is in what the ORGAN PRINTS AND EXITS WITH, not in a pure
function, so the only honest subject is the built ELF. It is forked with tr_run_capture (the one
proven subprocess primitive) and judged on exit code AND emitted bytes.
★A GREEN THAT NEVER HAD A CORRESPONDING RED IS UNVERIFIED, so the decisive teeth are gv_bite
pairs: the same organ must FIRE on the broken fixture and stay SILENT on the healthy one.
Two tests that each isolate one signal do not prove discrimination between them.
★A READER THAT MISSES EVERYTHING WOULD PASS EVERY ABSENCE TEST -- hence the POSITIVE CONTROL
(tooth 2/3): a key that IS present must be found, with its bytes. Without it, an organ that
returned MISS unconditionally would score full marks on this gate.
★ASSERT THE FIXTURE REACHED THE CONDITION BEFORE ASSERTING THE OUTCOME: tooth 1 refuses to
believe any verdict until the subject has actually run and reported scanning segments>0.
FIXTURES ARE ASSEMBLED AT RUNTIME under /tmp/<gate>/ (never the production knowledge/store tree:
a gate sharing a fixture with a production beat reports on the FIXTURE, not the code) and the
setup is IDEMPOTENT -- every artifact is unlinked before it is written, because a gate that is
not idempotent reports on its first run and lies about every run after.
license_tier: ORIGINAL Read-only outside /tmp. No hw writes (Rule 26).
dependencies 4 imports · 0 importers
imports: nx_gate_verdict.nxnx_seg_store.nxnx_tool_run.nxnx_syscalls.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
| 34 | const PG_DIRMODE: i64 = 493 |
| 40 | const PG_OUTCAP: i64 = 65536 |
| 43 | const PG_KIND_PUT: i64 = 1 |
| 44 | const PG_KIND_TOMB: i64 = 2 |
| 47 | const PG_EX_HIT: i64 = 0 |
| 48 | const PG_EX_MISS: i64 = 1 |
| 49 | const PG_EX_UNPROVEN: i64 = 3 |
| 50 | const PG_EX_NOPLANE: i64 = 4 |
| 51 | const PG_EX_TOMBSTONED: i64 = 5 |
| 52 | const PG_EX_NOTAKEY: i64 = 6 |
| 54 | const PG_PATHCAP: i64 = 512 |
| 58 | const PG_TAB: i64 = 9 |
| 61 | const PG_SEG_A: i64 = 1 |
| 62 | const PG_SEG_B: i64 = 2 |
functions
| 64 | func pg_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 1: pg_has |
| 68 | func pg_eq(a: i64, b: i64) -> i64 { if a == b { return 1 } return 0 }
called by 1: main |
| 69 | func pg_lt(a: i64, b: i64) -> i64 { if a < b { return 1 } return 0 }
called by 1: main |
| 70 | func pg_gt0(a: i64) -> i64 { if a > 0 { return 1 } return 0 }
called by 1: main |
| 71 | func pg_not(a: i64) -> i64 { if a == 0 { return 1 } return 0 }
called by 1: main |
| 74 | func pg_has(hay: *u8, haylen: i64, needle: *u8) -> i64 { |
| 90 | func pg_path(dir: *u8, name: *u8, out: *u8) -> i64 { |
| 97 | func pg_exists(path: *u8) -> i64 { |
| 104 | func pg_rm(dir: *u8, name: *u8) -> i64 { |
| 117 | func pg_row(out: *u8, c0: *u8, c1: *u8, c2: *u8) -> i64 { |
| 127 | func pg_build_plane(prefix: *u8) -> i64 { |
| 147 | func pg_try_subject(cand: *u8, out: *u8) -> i64 { |
| 153 | func pg_subject(out: *u8) -> i64 { |
| 161 | func pg_run(subj: *u8, prefix: *u8, key: *u8, out: *u8, outlen: *i64) -> i64 { |
| 170 | func main(argc: i64, argv: *i64) -> i64 { |