code wiki / _hdl_build / nx_ownerscan_gate.nx

nx_ownerscan_gate.nx

buildroot/runtime/_hdl_build/nx_ownerscan_gate.nx

19678 B355 linesdepth 5pulls 6 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

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

nx_gate_verdict.nx nx_tool_run.nx nx_syscalls.nx nx_ownerscan_gate.nx

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

main gv_ctr sys_mmap nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ gv_head gv_puts sys_write ↻ sys_now_realtime_sec sys_mmap ↻ sys_clock_gettime_real sys_mkdir sys_mmap ↻ gv_cat gv_catn sys_mmap ↻ sys_munmap og_p2 gv_cat ↻ og_pair og_p3 gv_cat ↻ gv_cat ↻ og_fill sys_openat_wr sys_mmap ↻ sys_write ↻ sys_close

structs

none

consts

26const OG_MODE_FILE: i64 = 0x1a4 // 0644
27const OG_MODE_DIR: i64 = 0x1ed // 0755 for fixture dirs
28const OG_CAP: i64 = 262144 // capture buffer; T13 asserts TR_FIT so a silent cut cannot pass
29const OG_TIMEOUT_MS: i64 = 60000 // the subject stats a handful of fixture files; this is slack, not a budget
30const OG_PATH: i64 = 4096 // PATH_MAX
31const OG_ARGV: i64 = 96 // argv cell array: 12 slots x 8
32const OG_TAB: i64 = 9
33const OG_NL: i64 = 10
34const OG_FILLBYTE: i64 = 65 // 'A' -- fixture elfs are filler of an EXACT length; only the size matters
36const OG_OO_SERVED: i64 = 1000
37const OG_OO_DELTA: i64 = 872
38const OG_SMALL_SERVED: i64 = 100
39const OG_SMALL_BUILT: i64 = 200
40const OG_AHEAD_SERVED: i64 = 300
41const OG_SECS_PER_DAY: i64 = 86400
42const OG_OLD_DAYS: i64 = 2 // two WHOLE UTC days back, so the same-day test can never be a coin flip

functions

44func 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
46func og_wf(path: *u8, content: *u8) -> i64
55func og_fill(path: *u8, n: i64) -> i64
66func og_p2(dst: *u8, a: *u8, b: *u8) -> i64
called by 1: main calls 1: gv_cat
72func og_p3(dst: *u8, a: *u8, b: *u8, c: *u8) -> i64
called by 1: og_pair calls 1: gv_cat
79func og_touch(path: *u8, when: i64) -> i64
called by 1: main calls 2: sys_mmapsys_utimensat
89func og_row(b: *u8, o: i64, name: *u8, srv: *u8) -> i64
calls 1: gv_cat
106func og_pair(fp: *u8, srv: *u8, bld: *u8, name: *u8, sb: i64, bb: i64) -> i64
called by 1: main calls 3: og_p3gv_catog_fill
120func og_needle(dst: *u8, state: *u8, srv: *u8, name: *u8, tail: *u8) -> i64
calls 1: gv_cat
133func main(argc: i64, argv: *i64) -> i64