code wiki / _hdl_build / nx_ownerscan_gate.nx
nx_ownerscan_gate.nx
buildroot/runtime/_hdl_build/nx_ownerscan_gate.nx
about
nx_ownerscan_gate.nx -- REFEREE for nx_artifactdrift's OWNER-SIGNAL axis (DM5 ps_owner_scan).
THE CASE IT REPLAYS: on 2026-08-15 `nx_oo_extract_gate` sat BEHIND by 872 B with .nxw scratch files
beside its source and a same-day header edit, and the ONLY thing that kept it off a promote list was a
human happening to look. ★★★★★★A LAW THAT MUST BE RECALLED AT THE MOMENT OF TEMPTATION IS NOT A
CONTROL. This gate asserts the mechanism now catches that exact case, with that exact delta and those
exact two scratch names, from a fixture assembled at RUNTIME.
FIXTURES live under /tmp/nx_ownerscan_gate/<epoch>/ -- never the live population, never a pattern
embedded in this source (the detector-finds-its-own-fixture trap), unique per run so the gate is
idempotent by construction. ⚠THE SUBJECT'S TREND LOG IS POINTED AT THE FIXTURE TOO: a gate that shares
its fixture with a production beat writes bogus rows into the very trend it measures.
BOTH REFUSAL DIRECTIONS ARE COVERED, which is the point of the neg-control teeth:
- an axis that MISSES in-flight work fails T1/T2 (the replay case),
- an axis that FLAGS EVERYTHING fails T3 (a clean BEHIND row must read UNDECLARED), T6 (non-BEHIND
rows must not appear on the axis at all) and T10/T11 (a unanimous day signal must ABSTAIN).
★★★★★★A GUARD THAT REFUSES EVERYTHING PASSES EVERY NEGATIVE TEST -- so every deny tooth here has a
positive control beside it, and T12 asserts BOTH classes appear in ONE run, which is the only thing
that proves DISCRIMINATION rather than a constant answer.
license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0
dependencies 3 imports · 0 importers
imports: nx_gate_verdict.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
| 26 | const OG_MODE_FILE: i64 = 0x1a4 // 0644 |
| 27 | const OG_MODE_DIR: i64 = 0x1ed // 0755 for fixture dirs |
| 28 | const OG_CAP: i64 = 262144 // capture buffer; T13 asserts TR_FIT so a silent cut cannot pass |
| 29 | const OG_TIMEOUT_MS: i64 = 60000 // the subject stats a handful of fixture files; this is slack, not a budget |
| 30 | const OG_PATH: i64 = 4096 // PATH_MAX |
| 31 | const OG_ARGV: i64 = 96 // argv cell array: 12 slots x 8 |
| 32 | const OG_TAB: i64 = 9 |
| 33 | const OG_NL: i64 = 10 |
| 34 | const OG_FILLBYTE: i64 = 65 // 'A' -- fixture elfs are filler of an EXACT length; only the size matters |
| 36 | const OG_OO_SERVED: i64 = 1000 |
| 37 | const OG_OO_DELTA: i64 = 872 |
| 38 | const OG_SMALL_SERVED: i64 = 100 |
| 39 | const OG_SMALL_BUILT: i64 = 200 |
| 40 | const OG_AHEAD_SERVED: i64 = 300 |
| 41 | const OG_SECS_PER_DAY: i64 = 86400 |
| 42 | const OG_OLD_DAYS: i64 = 2 // two WHOLE UTC days back, so the same-day test can never be a coin flip |
functions
| 44 | func og_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } called by 1: og_wf |
| 46 | func og_wf(path: *u8, content: *u8) -> i64 |
| 55 | func og_fill(path: *u8, n: i64) -> i64 |
| 66 | func og_p2(dst: *u8, a: *u8, b: *u8) -> i64 |
| 72 | func og_p3(dst: *u8, a: *u8, b: *u8, c: *u8) -> i64 |
| 79 | func og_touch(path: *u8, when: i64) -> i64 |
| 89 | func og_row(b: *u8, o: i64, name: *u8, srv: *u8) -> i64 calls 1: gv_cat |
| 106 | func og_pair(fp: *u8, srv: *u8, bld: *u8, name: *u8, sb: i64, bb: i64) -> i64 |
| 120 | func og_needle(dst: *u8, state: *u8, srv: *u8, name: *u8, tail: *u8) -> i64 calls 1: gv_cat |
| 133 | func main(argc: i64, argv: *i64) -> i64 |