code wiki / _hdl_build / nx_ownerscan_gate.nx

nx_ownerscan_gate.nx source

↩ module page · 355 lines · 19678 B

1// nx_ownerscan_gate.nx -- REFEREE for nx_artifactdrift's OWNER-SIGNAL axis (DM5 ps_owner_scan). 2// 3// THE CASE IT REPLAYS: on 2026-08-15 `nx_oo_extract_gate` sat BEHIND by 872 B with .nxw scratch files 4// beside its source and a same-day header edit, and the ONLY thing that kept it off a promote list was a 5// human happening to look. ★★★★★★A LAW THAT MUST BE RECALLED AT THE MOMENT OF TEMPTATION IS NOT A 6// CONTROL. This gate asserts the mechanism now catches that exact case, with that exact delta and those 7// exact two scratch names, from a fixture assembled at RUNTIME. 8// 9// FIXTURES live under /tmp/nx_ownerscan_gate/<epoch>/ -- never the live population, never a pattern 10// embedded in this source (the detector-finds-its-own-fixture trap), unique per run so the gate is 11// idempotent by construction. ⚠THE SUBJECT'S TREND LOG IS POINTED AT THE FIXTURE TOO: a gate that shares 12// its fixture with a production beat writes bogus rows into the very trend it measures. 13// 14// BOTH REFUSAL DIRECTIONS ARE COVERED, which is the point of the neg-control teeth: 15// - an axis that MISSES in-flight work fails T1/T2 (the replay case), 16// - an axis that FLAGS EVERYTHING fails T3 (a clean BEHIND row must read UNDECLARED), T6 (non-BEHIND 17// rows must not appear on the axis at all) and T10/T11 (a unanimous day signal must ABSTAIN). 18// ★★★★★★A GUARD THAT REFUSES EVERYTHING PASSES EVERY NEGATIVE TEST -- so every deny tooth here has a 19// positive control beside it, and T12 asserts BOTH classes appear in ONE run, which is the only thing 20// that proves DISCRIMINATION rather than a constant answer. 21// license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0 22import "nx_gate_verdict.nx" 23import "nx_tool_run.nx" 24import "nx_syscalls.nx" 25 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 35// THE RECORDED CASE, REPRODUCED TO THE BYTE: served 1000, built 1872, delta +872 as measured 2026-08-15. 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 43 44func og_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } 45 46func og_wf(path: *u8, content: *u8) -> i64 { 47 let fd: i64 = sys_openat_wr(path, OG_MODE_FILE) 48 if fd < 0 { return 0 - 1 } 49 sys_write(fd, content, og_slen(content)) 50 sys_close(fd) 51 return 0 52} 53 54// a file of EXACTLY n bytes -- a replay fixture whose delta is approximate is not a replay. 55func og_fill(path: *u8, n: i64) -> i64 { 56 let fd: i64 = sys_openat_wr(path, OG_MODE_FILE) 57 if fd < 0 { return 0 - 1 } 58 let b: *u8 = sys_mmap(n + 1) 59 var i: i64 = 0 60 while i < n { b[i] = OG_FILLBYTE as u8; i = i + 1 } 61 sys_write(fd, b, n) 62 sys_close(fd) 63 return 0 64} 65 66func og_p2(dst: *u8, a: *u8, b: *u8) -> i64 { 67 var o: i64 = gv_cat(dst, 0, a) 68 o = gv_cat(dst, o, b) 69 dst[o] = 0 as u8 70 return o 71} 72func og_p3(dst: *u8, a: *u8, b: *u8, c: *u8) -> i64 { 73 var o: i64 = gv_cat(dst, 0, a) 74 o = gv_cat(dst, o, b) 75 o = gv_cat(dst, o, c) 76 dst[o] = 0 as u8 77 return o 78} 79func og_touch(path: *u8, when: i64) -> i64 { 80 let ts: *i64 = sys_mmap(OG_ARGV) as *i64 81 ts[0] = when 82 ts[1] = 0 83 ts[2] = when 84 ts[3] = 0 85 return sys_utimensat(path, ts) 86} 87 88// one registry row in the shape nx_artifactdrift's parser reads: `<name> TAB <elf-path> TAB GREEN`. 89func og_row(b: *u8, o: i64, name: *u8, srv: *u8) -> i64 { 90 var p: i64 = gv_cat(b, o, name) 91 b[p] = OG_TAB as u8 92 p = p + 1 93 p = gv_cat(b, p, srv) 94 p = gv_cat(b, p, "/" as *u8) 95 p = gv_cat(b, p, name) 96 p = gv_cat(b, p, ".elf" as *u8) 97 b[p] = OG_TAB as u8 98 p = p + 1 99 p = gv_cat(b, p, "GREEN" as *u8) 100 b[p] = OG_NL as u8 101 p = p + 1 102 return p 103} 104 105// served + built pair of EXACT sizes for one fixture target. 106func og_pair(fp: *u8, srv: *u8, bld: *u8, name: *u8, sb: i64, bb: i64) -> i64 { 107 var o: i64 = og_p3(fp, srv, "/" as *u8, name) 108 o = gv_cat(fp, o, ".elf" as *u8) 109 fp[o] = 0 as u8 110 og_fill(fp, sb) 111 o = og_p3(fp, bld, "/" as *u8, name) 112 o = gv_cat(fp, o, ".sov.elf" as *u8) 113 fp[o] = 0 as u8 114 og_fill(fp, bb) 115 return 0 116} 117 118// the exact owner row the subject emits, composed here so a tooth binds a STATE to a ROW rather than 119// merely asserting that both strings appear somewhere in the output. 120func og_needle(dst: *u8, state: *u8, srv: *u8, name: *u8, tail: *u8) -> i64 { 121 var o: i64 = gv_cat(dst, 0, "OWNER=" as *u8) 122 o = gv_cat(dst, o, state) 123 o = gv_cat(dst, o, " " as *u8) 124 o = gv_cat(dst, o, srv) 125 o = gv_cat(dst, o, "/" as *u8) 126 o = gv_cat(dst, o, name) 127 o = gv_cat(dst, o, ".elf " as *u8) 128 o = gv_cat(dst, o, tail) 129 dst[o] = 0 as u8 130 return o 131} 132 133func main(argc: i64, argv: *i64) -> i64 { 134 let ctr: *i64 = gv_ctr() 135 gv_head("nx_ownerscan_gate -- DM5 owner-signal referee for nx_artifactdrift (runtime fixtures, forks the subject elf)" as *u8) 136 var subj: *u8 = "_offc/nx_artifactdrift.elf" as *u8 137 if argc > 1 { subj = argv[1] as *u8 } 138 let now: i64 = sys_now_realtime_sec() 139 let old: i64 = now - OG_OLD_DAYS * OG_SECS_PER_DAY 140 sys_mkdir("/tmp/nx_ownerscan_gate" as *u8, OG_MODE_DIR) 141 let base: *u8 = sys_mmap(OG_PATH) 142 var bo: i64 = gv_cat(base, 0, "/tmp/nx_ownerscan_gate/" as *u8) 143 bo = gv_catn(base, bo, now) 144 base[bo] = 0 as u8 145 sys_mkdir(base, OG_MODE_DIR) 146 let srv: *u8 = sys_mmap(OG_PATH) 147 og_p2(srv, base, "/srv" as *u8) 148 sys_mkdir(srv, OG_MODE_DIR) 149 let bld: *u8 = sys_mmap(OG_PATH) 150 og_p2(bld, base, "/bld" as *u8) 151 sys_mkdir(bld, OG_MODE_DIR) 152 let src: *u8 = sys_mmap(OG_PATH) 153 og_p2(src, base, "/src" as *u8) 154 sys_mkdir(src, OG_MODE_DIR) 155 let src2: *u8 = sys_mmap(OG_PATH) 156 og_p2(src2, base, "/src2" as *u8) 157 sys_mkdir(src2, OG_MODE_DIR) 158 // the subject CONCATENATES these roots, so they carry the trailing separator 159 let bldp: *u8 = sys_mmap(OG_PATH) 160 og_p2(bldp, bld, "/" as *u8) 161 let srcp: *u8 = sys_mmap(OG_PATH) 162 og_p2(srcp, src, "/" as *u8) 163 let src2p: *u8 = sys_mmap(OG_PATH) 164 og_p2(src2p, src2, "/" as *u8) 165 let fp: *u8 = sys_mmap(OG_PATH) 166 167 // ---- the six fixture targets ------------------------------------------------------------------ 168 // 1. THE REPLAY: BEHIND by exactly 872 B, two scratch siblings, source touched TODAY. 169 og_pair(fp, srv, bld, "nx_oo_extract_gate" as *u8, OG_OO_SERVED, OG_OO_SERVED + OG_OO_DELTA) 170 // 2/3/4. small BEHIND rows: clean, declared, and source-absent. 171 og_pair(fp, srv, bld, "zz_clean_behind" as *u8, OG_SMALL_SERVED, OG_SMALL_BUILT) 172 og_pair(fp, srv, bld, "zz_declared_behind" as *u8, OG_SMALL_SERVED, OG_SMALL_BUILT) 173 og_pair(fp, srv, bld, "zz_nosrc_behind" as *u8, OG_SMALL_SERVED, OG_SMALL_BUILT) 174 // 5. IDENTICAL and 6. AHEAD -- neither is BEHIND, so neither may appear on the owner axis. 175 og_pair(fp, srv, bld, "zz_identical" as *u8, OG_SMALL_SERVED, OG_SMALL_SERVED) 176 og_pair(fp, srv, bld, "zz_ahead" as *u8, OG_AHEAD_SERVED, OG_SMALL_SERVED) 177 178 // ---- sources. The replay source is TOUCHED TODAY; the other two are pushed two whole days back. -- 179 // REFERENCE AGES, SET EXPLICITLY so the ref axis can never be decided by fixture-creation timing. 180 // ★★★★★A FIXTURE WHOSE OUTCOME DEPENDS ON WHICH SECOND IT RAN IN IS NOT A TEST, IT IS A COIN FLIP. 181 // oo : source TODAY, reference TWO DAYS OLD -> REF-FOSSIL (the lane-B inversion case) 182 // clean/declared : source two days old, reference NOW -> REF-FRESH 183 // nosrc: no source to compare against -> REF-UNKNOWN (abstains) 184 let ooBld: *u8 = sys_mmap(OG_PATH) 185 og_p2(ooBld, bld, "/nx_oo_extract_gate.sov.elf" as *u8) 186 og_touch(ooBld, old) 187 og_p2(fp, bld, "/zz_clean_behind.sov.elf" as *u8) 188 og_touch(fp, now) 189 og_p2(fp, bld, "/zz_declared_behind.sov.elf" as *u8) 190 og_touch(fp, now) 191 og_p2(fp, bld, "/zz_nosrc_behind.sov.elf" as *u8) 192 og_touch(fp, now) 193 let ooSrc: *u8 = sys_mmap(OG_PATH) 194 og_p2(ooSrc, srcp, "nx_oo_extract_gate.nx" as *u8) 195 og_wf(ooSrc, "// fixture source for the replay target\n" as *u8) 196 og_touch(ooSrc, now) 197 // the two scratch names the 2026-08-15 record actually carries 198 og_p2(fp, srcp, "nx_oo_extract_gate.nx.nxw18665" as *u8) 199 og_wf(fp, "scratch\n" as *u8) 200 og_p2(fp, srcp, "nx_oo_extract_gate.nx.nxw30737" as *u8) 201 og_wf(fp, "scratch\n" as *u8) 202 let cleanSrc: *u8 = sys_mmap(OG_PATH) 203 og_p2(cleanSrc, srcp, "zz_clean_behind.nx" as *u8) 204 og_wf(cleanSrc, "// clean fixture source, no siblings\n" as *u8) 205 og_touch(cleanSrc, old) 206 // the DECLARED row lives in the SECONDARY root AND carries a scratch sibling, so a pass here proves 207 // the secondary probe resolves AND that a declaration OUTRANKS a mechanical in-flight signal. 208 let declSrc: *u8 = sys_mmap(OG_PATH) 209 og_p2(declSrc, src2p, "zz_declared_behind.nx" as *u8) 210 og_wf(declSrc, "// declared fixture source in the secondary root\n" as *u8) 211 og_touch(declSrc, old) 212 og_p2(fp, src2p, "zz_declared_behind.nx.nxw999" as *u8) 213 og_wf(fp, "scratch\n" as *u8) 214 215 // ---- registry ---------------------------------------------------------------------------------- 216 let reg: *u8 = sys_mmap(OG_PATH) 217 og_p2(reg, base, "/reg.conf" as *u8) 218 let rbuf: *u8 = sys_mmap(OG_CAP) 219 var ro: i64 = 0 220 ro = og_row(rbuf, ro, "nx_oo_extract_gate" as *u8, srv) 221 ro = og_row(rbuf, ro, "zz_clean_behind" as *u8, srv) 222 ro = og_row(rbuf, ro, "zz_declared_behind" as *u8, srv) 223 ro = og_row(rbuf, ro, "zz_nosrc_behind" as *u8, srv) 224 ro = og_row(rbuf, ro, "zz_identical" as *u8, srv) 225 ro = og_row(rbuf, ro, "zz_ahead" as *u8, srv) 226 rbuf[ro] = 0 as u8 227 og_wf(reg, rbuf) 228 229 // ---- declaration conf: one claimed target, plus a comment line the parser must skip ------------- 230 let dcf: *u8 = sys_mmap(OG_PATH) 231 og_p2(dcf, base, "/decl.conf" as *u8) 232 let dbuf: *u8 = sys_mmap(OG_CAP) 233 var dofs: i64 = gv_cat(dbuf, 0, "# fixture declaration conf -- zz_clean_behind is named ONLY in this comment\n" as *u8) 234 dofs = gv_cat(dbuf, dofs, "zz_declared_behind" as *u8) 235 dbuf[dofs] = OG_TAB as u8 236 dofs = dofs + 1 237 dofs = gv_cat(dbuf, dofs, "gate-fixture" as *u8) 238 dbuf[dofs] = OG_TAB as u8 239 dofs = dofs + 1 240 dofs = gv_cat(dbuf, dofs, "a claimed row, held while its lane finishes" as *u8) 241 dbuf[dofs] = OG_NL as u8 242 dofs = dofs + 1 243 dbuf[dofs] = 0 as u8 244 og_wf(dcf, dbuf) 245 246 let trend: *u8 = sys_mmap(OG_PATH) 247 og_p2(trend, base, "/trend.log" as *u8) 248 249 // ---- run A: the day signal has variance, so it VOTES -------------------------------------------- 250 let out: *u8 = sys_mmap(OG_CAP) 251 let olen: *i64 = sys_mmap(16) as *i64 252 let trunc: *i64 = sys_mmap(16) as *i64 253 let av: *i64 = sys_mmap(OG_ARGV) as *i64 254 av[0] = subj as i64 255 av[1] = reg as i64 256 av[2] = bldp as i64 257 av[3] = srcp as i64 258 av[4] = src2p as i64 259 av[5] = dcf as i64 260 av[6] = trend as i64 261 av[7] = 0 262 let rcA: i64 = tr_run_capture_tr(subj, av, out, OG_CAP, olen, OG_TIMEOUT_MS, trunc) 263 let nA: i64 = olen[0] 264 let nd: *u8 = sys_mmap(OG_PATH) 265 266 og_needle(nd, "IN-FLIGHT-SUSPECT" as *u8, srv, "nx_oo_extract_gate" as *u8, "decl=0 scratch=2 day=1 ref=FOSSIL" as *u8) 267 gv_check("T1 replay-of-the-2026-08-15-nx_oo_extract_gate-case-is-detected" as *u8, tr_contains(out, nA, nd), ctr) 268 gv_check("T2 scratch-sibling-NAMES-printed-under-the-row-they-flag" as *u8, tr_contains(out, nA, "scratch-sibling: nx_oo_extract_gate.nx.nxw18665" as *u8), ctr) 269 og_needle(nd, "UNDECLARED" as *u8, srv, "zz_clean_behind" as *u8, "decl=0 scratch=0 day=0 ref=FRESH" as *u8) 270 gv_check("T3 neg-control-clean-BEHIND-row-must-NOT-be-flagged" as *u8, tr_contains(out, nA, nd), ctr) 271 og_needle(nd, "DECLARED" as *u8, srv, "zz_declared_behind" as *u8, "decl=1 scratch=1 day=0 ref=FRESH" as *u8) 272 gv_check("T4 declaration-OUTRANKS-a-live-scratch-signal-and-secondary-root-resolves" as *u8, tr_contains(out, nA, nd), ctr) 273 og_needle(nd, "SRC-UNRESOLVED" as *u8, srv, "zz_nosrc_behind" as *u8, "decl=0 scratch=-1 day=-1 ref=UNKNOWN" as *u8) 274 gv_check("T5 absent-source-ABSTAINS-with-a-third-state-never-acquits" as *u8, tr_contains(out, nA, nd), ctr) 275 var t6: i64 = 0 276 og_p3(nd, srv, "/zz_identical" as *u8, ".elf decl=" as *u8) 277 if tr_contains(out, nA, nd) == 0 { 278 og_p3(nd, srv, "/zz_ahead" as *u8, ".elf decl=" as *u8) 279 if tr_contains(out, nA, nd) == 0 { t6 = 1 } 280 } 281 gv_check("T6 neg-control-IDENTICAL-and-AHEAD-rows-never-reach-the-owner-axis" as *u8, t6, ctr) 282 gv_check("T7 owner-partition-parts-sum-to-the-BEHIND-denominator" as *u8, tr_contains(out, nA, "owner_axis BEHIND=4 DECLARED=1 IN-FLIGHT-SUSPECT=1 UNDECLARED=1 SRC-UNRESOLVED=1 sum=4 owner_partition=RECONCILES" as *u8), ctr) 283 gv_check("T8 owner-coverage-declared-against-its-own-denominator" as *u8, tr_contains(out, nA, "owner_axis_covered=4 of_BEHIND=4 owner_coverage=COMPLETE" as *u8), ctr) 284 var t9: i64 = 0 285 if tr_contains(out, nA, "day_signal same_day=1 of_source_resolved=3" as *u8) == 1 { if tr_contains(out, nA, "day_signal=VOTES" as *u8) == 1 { t9 = 1 } } 286 gv_check("T9 day-signal-rate-is-PUBLISHED-and-votes-when-it-discriminates" as *u8, t9, ctr) 287 var t14: i64 = 0 288 if tr_contains(out, nA, "distinct_binaries=6 IDENTICAL=1 STALE=5 NO-BUILD=0 NO-SERVED=0 STAGED-POINTER=0 sum=6" as *u8) == 1 { 289 // ANCHORED ON THE STRUCTURAL INVARIANT, NOT ON PROSE. This tooth first spelled out the old 290 // `BEHIND(built>served, promote the fix)=4` label and broke the moment that label was corrected 291 // to stop issuing an unqualified promote order -- a tooth failing because the code got MORE 292 // honest. ★★★★★A TEST WHOSE EXPECTATION IS A COPY OF THE IMPLEMENTATION'S PROSE DRIFTS WITH IT; 293 // BIND IT TO THE ARITHMETIC THAT CANNOT BE REWORDED. The sub-partition reconciling IS the claim. 294 if tr_contains(out, nA, "sub_sum=5 sub_partition=RECONCILES" as *u8) == 1 { t14 = 1 } 295 } 296 gv_check("T10 pre-existing-partition-untouched-owner-axis-is-SEPARATE" as *u8, t14, ctr) 297 var t12: i64 = 0 298 if tr_contains(out, nA, "OWNER=IN-FLIGHT-SUSPECT" as *u8) == 1 { if tr_contains(out, nA, "OWNER=UNDECLARED" as *u8) == 1 { t12 = 1 } } 299 gv_check("T11 anti-vacuity-BOTH-outcomes-present-in-ONE-run-so-it-discriminates" as *u8, t12, ctr) 300 var t13: i64 = 0 301 if rcA == 0 { if trunc[0] == TR_FIT { if tr_contains(out, nA, "partition=RECONCILES" as *u8) == 1 { t13 = 1 } } } 302 gv_check("T12 capture-complete-envelope-rc0-and-TR_FIT-so-no-tooth-read-a-cut-buffer" as *u8, t13, ctr) 303 // the trend row is EVIDENCE, and it must have landed in the FIXTURE log, not the production beat's. 304 let tl: *i64 = sys_mmap(16) as *i64 305 let tb: *u8 = sys_read_file(trend, tl) 306 var t15: i64 = 0 307 if (tb as i64) != 0 { if tr_contains(tb, tl[0], "own_declared=1 own_inflight=1 own_undeclared=1 own_unresolved=1 own_covered=4 ref_fresh=2 ref_fossil=1 ref_unknown=1 considerable=1 ref_partition=RECONCILES" as *u8) == 1 { t15 = 1 } } 308 gv_check("T13 neg-control-trend-row-lands-in-the-FIXTURE-log-not-the-production-beat" as *u8, t15, ctr) 309 310 // ---- run B: every resolvable source touched TODAY, so the day signal is UNANIMOUS -------------- 311 // ★★★★★A SIGNAL THAT FIRES ON EVERYTHING DISCRIMINATES NOTHING. In a bulk-synced tree that is the 312 // NORMAL state of mtime, so the abstention is not a nicety -- without it this axis would flag the 313 // whole BEHIND population the next time somebody re-syncs the source tree. 314 og_touch(cleanSrc, now) 315 og_touch(declSrc, now) 316 let rcB: i64 = tr_run_capture_tr(subj, av, out, OG_CAP, olen, OG_TIMEOUT_MS, trunc) 317 let nB: i64 = olen[0] 318 var t10: i64 = 0 319 if tr_contains(out, nB, "day_signal same_day=3 of_source_resolved=3" as *u8) == 1 { if tr_contains(out, nB, "day_signal=ABSTAINS" as *u8) == 1 { t10 = 1 } } 320 gv_check("T14 unanimous-day-signal-ABSTAINS-rather-than-flagging-the-population" as *u8, t10, ctr) 321 og_needle(nd, "UNDECLARED" as *u8, srv, "zz_clean_behind" as *u8, "decl=0 scratch=0 day=1 ref=FRESH" as *u8) 322 var t11: i64 = 0 323 if rcB == 0 { if tr_contains(out, nB, nd) == 1 { t11 = 1 } } 324 gv_check("T15 the-abstention-CHANGES-THE-OUTCOME-not-merely-the-label" as *u8, t11, ctr) 325 gv_check("T16 scratch-still-votes-while-the-day-signal-abstains" as *u8, tr_contains(out, nB, "OWNER=IN-FLIGHT-SUSPECT" as *u8), ctr) 326 327 // ---- REF-FRESHNESS teeth: the lane-B inversion defect ------------------------------------------ 328 // A BEHIND delta measured against an artifact OLDER than its source can be EXACTLY INVERTED, so the 329 // row must say so and must not be counted as promotable. Both directions are covered: run A plants 330 // the stale reference and demands it be marked, run C refreshes it and demands the row judge 331 // correctly -- and demands that ONLY the ref axis moved. 332 var t17: i64 = 0 333 if tr_contains(out, nA, "REF-FOSSIL: the reference PREDATES this source" as *u8) == 1 { 334 if tr_contains(out, nA, "nx_stale_check nx_oo_extract_gate" as *u8) == 1 { t17 = 1 } 335 } 336 gv_check("T17 fossil-reference-flagged-AND-the-rebuild-remedy-named-on-the-row" as *u8, t17, ctr) 337 gv_check("T18 ref-partition-parts-sum-to-the-BEHIND-denominator" as *u8, tr_contains(out, nA, "ref_axis BEHIND=4 REF-FRESH=2 REF-FOSSIL=1 REF-UNKNOWN=1 sum=4 ref_partition=RECONCILES" as *u8), ctr) 338 gv_check("T19 promote-considerable-requires-BOTH-conjuncts-never-either-alone" as *u8, tr_contains(out, nA, "promote_considerable=1 of_BEHIND=4" as *u8), ctr) 339 var t20: i64 = 0 340 if tr_contains(out, nA, "promote the fix" as *u8) == 0 { 341 if tr_contains(out, nA, "NOT A PROMOTE ORDER" as *u8) == 1 { t20 = 1 } 342 } 343 gv_check("T20 neg-control-census-no-longer-emits-an-unqualified-promote-order" as *u8, t20, ctr) 344 // ---- run C: REFRESH the fossil reference ------------------------------------------------------- 345 og_touch(ooBld, now) 346 let rcC: i64 = tr_run_capture_tr(subj, av, out, OG_CAP, olen, OG_TIMEOUT_MS, trunc) 347 let nC: i64 = olen[0] 348 og_needle(nd, "IN-FLIGHT-SUSPECT" as *u8, srv, "nx_oo_extract_gate" as *u8, "decl=0 scratch=2 day=1 ref=FRESH" as *u8) 349 var t21: i64 = 0 350 if rcC == 0 { if tr_contains(out, nC, nd) == 1 { t21 = 1 } } 351 gv_check("T21 refreshing-the-reference-flips-the-row-FOSSIL-to-FRESH" as *u8, t21, ctr) 352 gv_check("T22 ref-axis-drains-to-zero-fossils-once-the-reference-is-rebuilt" as *u8, tr_contains(out, nC, "REF-FRESH=3 REF-FOSSIL=0 REF-UNKNOWN=1 sum=4 ref_partition=RECONCILES" as *u8), ctr) 353 gv_check("T23 neg-control-axes-INDEPENDENT-a-fresh-reference-does-not-clear-OWNERSHIP" as *u8, tr_contains(out, nC, "promote_considerable=1 of_BEHIND=4" as *u8), ctr) 354 return gv_verdict("nx_ownerscan_gate" as *u8, ctr, "judges the subject's emitted owner and reference rows over runtime fixtures" as *u8) 355}