code wiki / _hdl_build / nx_gate_build_sweep.nx

nx_gate_build_sweep.nx source

↩ module page · 453 lines · 22138 B

1// nx_gate_build_sweep.nx -- THE UNBUILT-GATE PARTITIONER (2026-07-31, ws=gate-dry-d001). 2// 3// WHY: nx_gatebuilt_gate measures gate_sources=2891 built=232 UNBUILT=2659 (built_permil=80) and states 4// the law -- AN UNBUILT GATE IS INDISTINGUISHABLE FROM A PASSING ONE IN EVERY REPORT THAT MENTIONS IT. 5// But it stops at the COUNT. A count cannot tell you whether those 2659 are merely NEVER-COMPILED (cheap: 6// nobody ran the builder) or GENUINELY BROKEN (real defects hiding behind a number). Those two populations 7// need opposite remedies, and conflating them is the same class of error as a MISSING X vs a WEDGED X. 8// 9// A hand spot-check of 4 (nx_cap_keygen_gate/nx_coindex_gate/nx_anti_slop_gate/nx_warc_index_gate) built 10// 4/4 CLEAN on the first try -- which says the population is probably mostly the cheap kind, but 4 is a 11// spot check and MUST NOT be banked as a measurement (a candidate ruler's output is never a measurement). 12// This organ turns the spot check into a census. 13// 14// WHAT IT IS NOT: it does NOT promote. Compiling proves a gate CAN exist; promoting it into the shared 15// prod root is an outward-facing change to a tree seven sibling sessions are using, and belongs to a 16// deliberate operator-authorised step. This organ ONLY partitions, and says so in its own output. 17// 18// ENVELOPE, declared in-band and never silent: FLAT scan of runtime + runtime/_hdl_build relative to the 19// DISCOVERED buildroot (no recursion -- the _attic/_retired/_stage_local shadow trees stay excluded, same 20// envelope as nx_gatebuilt_gate so the two numbers are comparable); every run is BOUNDED by an explicit 21// max (argv[1]) and resumable by an explicit skip (argv[2]) so it can never run away; every build is 22// deadline-bounded (tr_run_capture_to) because ONE hanging compile must not wedge a 2659-target sweep. 23// 24// IDEMPOTENT (rule 10): a target whose /tmp/<t>.sov.elf already exists is SKIP-EXISTS, not rebuilt. 25// ADDITIVE (rule 13): appends one frame per target to an append-only journal; never rewrites history. 26// 27// ANOMALY class, deliberately its own bucket: builder returns rc=0 but NO artifact appears. That is an 28// instrument claiming success it cannot show, and it must never be silently counted as BUILT. 29// 30// usage: nx_gate_build_sweep <max> [skip] [journal] [timeout_ms] 31// argv[1] max REQUIRED, > 0 -- refuse rather than default to unbounded (no silent runaway) 32// argv[2] skip resume offset into the scan order, default 0 33// argv[3] journal append-only outcome log, default /tmp/gate_build_sweep.jrnl (absolute recommended: 34// this organ chdir's to the buildroot, so a relative path resolves THERE) 35// argv[4] timeout per-build deadline in ms, default 180000 36// license_tier: ORIGINAL No hw writes (Rule 26). 37import "nx_syscalls.nx" 38import "nx_gate_verdict.nx" 39import "nx_tool_run.nx" 40 41const GS_DIRBUF: i64 = 262144 42const GS_PATH: i64 = 512 43const GS_CAP: i64 = 262144 44const GS_SLOT: i64 = 16 45const GS_LINE: i64 = 1024 46const GS_MODE: i64 = 420 47const GS_RECLEN_OFF: i64 = 16 48const GS_NAME_OFF: i64 = 19 49const GS_TAB: i64 = 9 50const GS_NL: i64 = 10 51const GS_ZERO: i64 = 48 52const GS_B10: i64 = 10 53const GS_DEF_TIMEOUT: i64 = 180000 54const GS_NOBUILDER: i64 = 0 - 99 55 56// counter slots -- named because a cross-function index contract written as bare integers is exactly 57// how two halves of one organ silently drift apart 58const GS_C_SEEN: i64 = 0 59const GS_C_SKIPPED: i64 = 1 60const GS_C_EXISTS: i64 = 2 61const GS_C_BUILT: i64 = 3 62const GS_C_FAILED: i64 = 4 63const GS_C_TIMEOUT: i64 = 5 64const GS_C_ANOMALY: i64 = 6 65const GS_C_ATTEMPT: i64 = 7 66const GS_C_WAITED: i64 = 8 67const GS_C_PAUSED: i64 = 9 68const GS_C_PROMOTED: i64 = 10 69const GS_C_COMPILED_ONLY: i64 = 11 70const GS_C_NEVER: i64 = 12 71const GS_CN: i64 = 13 72 73// ---- BUILD ADMISSION ------------------------------------------------------------------------ 74// A 2600-target compile sweep on a box seven sibling seats share is EXACTLY the shape that froze 75// every seat once already (nx_skullsdf took 27.7GB in 2m48s and no allocator asked permission). 76// The lesson banked from that incident was not "add a primitive" -- nx_build_admit ALREADY EXISTED 77// and was simply unreachable from inside the thing doing the work. So this sweep is a good citizen 78// BY CONSTRUCTION rather than by an operator remembering to check first. 79// DRY (rule 15): it COMPOSES nx_build_admit and never re-derives its thresholds -- those are rule-11 80// config that belongs to that organ, not duplicated here where the two copies would silently drift. 81// FAIL-CLOSED: if the admission organ cannot be found, this REFUSES to sweep. An ungated sweep is 82// the hazard; "could not check, so proceeded" is how the freeze happened. 83const GS_ADMIT_EVERY: i64 = 8 84const GS_ADMIT_WAIT_MS: i64 = 30000 85const GS_ADMIT_MAX_WAITS: i64 = 20 86const GS_ADMIT_TIMEOUT: i64 = 20000 87const GS_PAUSED: i64 = 0 - 97 88const GS_NOADMIT: i64 = 0 - 96 89 90// config slots 91const GS_K_MAX: i64 = 0 92const GS_K_SKIP: i64 = 1 93const GS_K_TIMEOUT: i64 = 2 94const GS_K_JFD: i64 = 3 95const GS_KN: i64 = 4 96 97func gs_atoi(s: *u8) -> i64 { 98 var v: i64 = 0 99 var i: i64 = 0 100 while s[i] != (0 as u8) { 101 let c: i64 = s[i] as i64 102 if c < GS_ZERO { return 0 - 1 } 103 if c > GS_ZERO + 9 { return 0 - 1 } 104 v = v * GS_B10 + (c - GS_ZERO) 105 i = i + 1 106 } 107 if i == 0 { return 0 - 1 } 108 return v 109} 110 111// cheap existence probe: openat for read, never a read of contents 112func gs_exists(path: *u8) -> i64 { 113 let fd: i64 = sys_openat_rd(path) 114 if fd < 0 { return 0 } 115 sys_close(fd) 116 return 1 117} 118 119// does name end with "_gate.nx" ? same predicate as nx_gatebuilt_gate so the corpora match 120func gs_is_gate_src(nm: *u8, n: i64) -> i64 { 121 if n < 8 { return 0 } 122 let t: *u8 = "_gate.nx" as *u8 123 var k: i64 = 0 124 while k < 8 { 125 if nm[n - 8 + k] != t[k] { return 0 } 126 k = k + 1 127 } 128 return 1 129} 130 131// discover + enter the buildroot: the ONE place the two-roots-one-name ambiguity is resolved. 132// The toolchain marker _offc/nx_sov_build_run.elf IS the definition of "this is the buildroot". 133func gs_enter_buildroot() -> i64 { 134 if gs_exists("_offc/nx_sov_build_run.elf" as *u8) == 1 { return 1 } 135 if sys_chdir("buildroot" as *u8) == 0 { 136 if gs_exists("_offc/nx_sov_build_run.elf" as *u8) == 1 { return 1 } 137 } 138 return 0 139} 140 141// WHERE THE ARTIFACT LANDS IS A FACT TO BE DISCOVERED, NOT ASSUMED. nx_buildonly.nx's header says the 142// builder "leaves /tmp/<target>.sov.elf"; the LIVE nx_sov_build_run writes buildroot/_build/<t>.sov.elf. 143// Trusting the header is exactly how this organ's first run scored 5/5 ANOMALY-RC0-NO-ARTIFACT on five 144// builds that had every one of them SUCCEEDED -- the builder was honest and the probe was looking in the 145// wrong place. Same wrong assumption is frozen into nx_gate_migrate's gm_artifact (also /tmp), which is 146// one of the three reasons that verifier cannot run. Probe both; the artifact is wherever it actually is. 147func gs_artifact(target: *u8, out: *u8) -> i64 { 148 var o: i64 = gv_cat(out, 0, "_build/" as *u8) 149 o = gv_cat(out, o, target) 150 o = gv_cat(out, o, ".sov.elf" as *u8) 151 out[o] = 0 as u8 152 return o 153} 154 155func gs_artifact_alt(target: *u8, out: *u8) -> i64 { 156 var o: i64 = gv_cat(out, 0, "/tmp/" as *u8) 157 o = gv_cat(out, o, target) 158 o = gv_cat(out, o, ".sov.elf" as *u8) 159 out[o] = 0 as u8 160 return o 161} 162 163func gs_have_artifact(target: *u8, out: *u8) -> i64 { 164 gs_artifact(target, out) 165 if gs_exists(out) == 1 { return 1 } 166 gs_artifact_alt(target, out) 167 if gs_exists(out) == 1 { return 1 } 168 return 0 169} 170 171// build ONE target, deadline-bounded. Prefers the thin wrapper when it exists, else drives the canonical 172// builder directly -- so a missing nx_buildonly.elf degrades to the real toolchain instead of exec-failing 173// into a 127 that reads like a broken gate. Returns builder rc, or GS_NOBUILDER when NEITHER exists 174// (a distinct value on purpose: no builder is a HARNESS failure, never a verdict about the gate). 175// the PROMOTED location: <name>.elf at the nishihost root, which is the parent of the buildroot we 176// chdir'd into. This is the ONLY location nx_gatebuilt_gate probes -- which is exactly why it reports 177// UNBUILT for gates that are compiled and merely unpromoted. 178func gs_promoted(target: *u8, out: *u8) -> i64 { 179 var o: i64 = gv_cat(out, 0, "../" as *u8) 180 o = gv_cat(out, o, target) 181 o = gv_cat(out, o, ".elf" as *u8) 182 out[o] = 0 as u8 183 return gs_exists(out) 184} 185 186func gs_admit_path(out: *u8) -> i64 { 187 var o: i64 = gv_cat(out, 0, "../nx_build_admit.elf" as *u8) 188 out[o] = 0 as u8 189 if gs_exists(out) == 1 { return 1 } 190 o = gv_cat(out, 0, "nx_build_admit.elf" as *u8) 191 out[o] = 0 as u8 192 if gs_exists(out) == 1 { return 1 } 193 return 0 194} 195 196// 1 = GRANT (an opening exists). ANYTHING else -- QUEUE, REFUSE, a harness error, an unreadable 197// answer -- is treated as CLOSED. An admission check that cannot produce a GRANT must never be read 198// as permission: a check and its own failure mode must not look alike. 199func gs_admit_ok(p: *u8, out: *u8, ol: *i64) -> i64 { 200 let av: *i64 = sys_mmap(32) as *i64 201 av[0] = p as i64 202 av[1] = "check" as *u8 as i64 203 av[2] = 0 204 let rc: i64 = tr_run_capture_to(p, av, out, GS_CAP, ol, GS_ADMIT_TIMEOUT) 205 if rc < 0 { return 0 } 206 return tr_contains(out, ol[0], "VERDICT=GRANT" as *u8) 207} 208 209func gs_build(target: *u8, timeout_ms: i64, out: *u8, outlen: *i64, ctr: *i64) -> i64 { 210 // ADMISSION IS BOUND TO THE ONE ACT THAT CONSUMES THE MACHINE. Checking at call sites means every 211 // future call site has to REMEMBER; checking here means none of them can forget. 212 if ctr[GS_C_PAUSED] == 1 { return GS_PAUSED } 213 let ap: *u8 = sys_mmap(GS_PATH) 214 if gs_admit_path(ap) == 0 { return GS_NOADMIT } 215 if ctr[GS_C_ATTEMPT] % GS_ADMIT_EVERY == 0 { 216 var waits: i64 = 0 217 var open: i64 = gs_admit_ok(ap, out, outlen) 218 while open == 0 { 219 if waits >= GS_ADMIT_MAX_WAITS { return GS_PAUSED } 220 waits = waits + 1 221 ctr[GS_C_WAITED] = ctr[GS_C_WAITED] + 1 222 sys_sleep_ms(GS_ADMIT_WAIT_MS) 223 open = gs_admit_ok(ap, out, outlen) 224 } 225 } 226 let av: *i64 = sys_mmap(64) as *i64 227 if gs_exists("_offc/nx_buildonly.elf" as *u8) == 1 { 228 av[0] = "_offc/nx_buildonly.elf" as *u8 as i64 229 av[1] = target as i64 230 av[2] = 0 231 return tr_run_capture_to("_offc/nx_buildonly.elf" as *u8, av, out, GS_CAP, outlen, timeout_ms) 232 } 233 if gs_exists("_offc/nx_sov_build_run.elf" as *u8) == 1 { 234 av[0] = "_offc/nx_sov_build_run.elf" as *u8 as i64 235 av[1] = target as i64 236 av[2] = "--build-only" as *u8 as i64 237 av[3] = 0 238 return tr_run_capture_to("_offc/nx_sov_build_run.elf" as *u8, av, out, GS_CAP, outlen, timeout_ms) 239 } 240 return GS_NOBUILDER 241} 242 243// one append-only frame: ts TAB sweep TAB target TAB status TAB rc 244func gs_frame(jfd: i64, target: *u8, status: *u8, rc: i64) -> i64 { 245 if jfd < 0 { return 0 } 246 let ln: *u8 = sys_mmap(GS_LINE) 247 var o: i64 = gv_catn(ln, 0, sys_now_realtime_sec()) 248 ln[o] = GS_TAB as u8; o = o + 1 249 o = gv_cat(ln, o, "gatesweep" as *u8) 250 ln[o] = GS_TAB as u8; o = o + 1 251 o = gv_cat(ln, o, target) 252 ln[o] = GS_TAB as u8; o = o + 1 253 o = gv_cat(ln, o, status) 254 ln[o] = GS_TAB as u8; o = o + 1 255 o = gv_catn(ln, o, rc) 256 ln[o] = GS_NL as u8; o = o + 1 257 sys_write(jfd, ln, o) 258 return 0 259} 260 261// scan ONE dir flat and sweep the gate sources in it 262func gs_scan(dir: *u8, ctr: *i64, cfg: *i64) -> i64 { 263 let fd: i64 = sys_openat_rd(dir) 264 if fd < 0 { return 0 - 1 } 265 let dbuf: *u8 = sys_mmap(GS_DIRBUF) 266 let target: *u8 = sys_mmap(GS_PATH) 267 let art: *u8 = sys_mmap(GS_PATH) 268 let out: *u8 = sys_mmap(GS_CAP) 269 let ol: *i64 = sys_mmap(GS_SLOT) as *i64 270 var n: i64 = sys_getdents64(fd, dbuf, GS_DIRBUF) 271 while n > 0 { 272 var p: i64 = 0 273 while p < n { 274 let reclen: i64 = (dbuf[p + GS_RECLEN_OFF] as i64) + ((dbuf[p + GS_RECLEN_OFF + 1] as i64) * 256) 275 if reclen <= 0 { p = n } 276 else { 277 let nm: *u8 = ((dbuf as i64) + p + GS_NAME_OFF) as *u8 278 var ln: i64 = 0 279 while nm[ln] != (0 as u8) { ln = ln + 1 } 280 if gs_is_gate_src(nm, ln) == 1 { 281 ctr[GS_C_SEEN] = ctr[GS_C_SEEN] + 1 282 // CENSUS MODE (max=0): classify every gate against BOTH locations and build nothing. 283 // This is the mode that answers the question nx_gatebuilt_gate gets wrong -- it reports 284 // one axis (promoted) under a name that claims another (built) -- and it costs three 285 // openat probes per gate instead of a 33-hour recompile of a corpus that is already compiled. 286 if cfg[GS_K_MAX] == 0 { 287 var w2: i64 = 0 288 while w2 < ln - 3 { target[w2] = nm[w2]; w2 = w2 + 1 } 289 target[w2] = 0 as u8 290 if gs_promoted(target, art) == 1 { ctr[GS_C_PROMOTED] = ctr[GS_C_PROMOTED] + 1 } 291 else { 292 if gs_have_artifact(target, art) == 1 { ctr[GS_C_COMPILED_ONLY] = ctr[GS_C_COMPILED_ONLY] + 1 } 293 else { ctr[GS_C_NEVER] = ctr[GS_C_NEVER] + 1 } 294 } 295 } 296 if cfg[GS_K_MAX] == 0 { ctr[GS_C_SKIPPED] = ctr[GS_C_SKIPPED] + 0 } 297 else { 298 if ctr[GS_C_SEEN] <= cfg[GS_K_SKIP] { ctr[GS_C_SKIPPED] = ctr[GS_C_SKIPPED] + 1 } 299 else { 300 if ctr[GS_C_ATTEMPT] >= cfg[GS_K_MAX] { ctr[GS_C_SKIPPED] = ctr[GS_C_SKIPPED] + 1 } 301 else { 302 var w: i64 = 0 303 while w < ln - 3 { target[w] = nm[w]; w = w + 1 } 304 target[w] = 0 as u8 305 if gs_have_artifact(target, art) == 1 { 306 ctr[GS_C_EXISTS] = ctr[GS_C_EXISTS] + 1 307 gs_frame(cfg[GS_K_JFD], target, "SKIP-EXISTS" as *u8, 0) 308 } else { 309 let rc: i64 = gs_build(target, cfg[GS_K_TIMEOUT], out, ol, ctr) 310 if rc == GS_PAUSED { 311 ctr[GS_C_PAUSED] = 1 312 ctr[GS_C_SKIPPED] = ctr[GS_C_SKIPPED] + 1 313 gs_frame(cfg[GS_K_JFD], target, "PAUSED-ADMISSION" as *u8, rc) 314 } 315 if rc == GS_NOADMIT { 316 ctr[GS_C_PAUSED] = 1 317 ctr[GS_C_SKIPPED] = ctr[GS_C_SKIPPED] + 1 318 gs_frame(cfg[GS_K_JFD], target, "NO-ADMISSION-ORGAN" as *u8, rc) 319 } 320 if rc != GS_PAUSED { if rc != GS_NOADMIT { 321 ctr[GS_C_ATTEMPT] = ctr[GS_C_ATTEMPT] + 1 322 if rc == GS_NOBUILDER { 323 gs_frame(cfg[GS_K_JFD], target, "NO-BUILDER" as *u8, rc) 324 ctr[GS_C_ANOMALY] = ctr[GS_C_ANOMALY] + 1 325 } else { 326 if rc == 0 - 5 { 327 ctr[GS_C_TIMEOUT] = ctr[GS_C_TIMEOUT] + 1 328 gs_frame(cfg[GS_K_JFD], target, "TIMEOUT" as *u8, rc) 329 } else { 330 if rc == 0 { 331 if gs_have_artifact(target, art) == 1 { 332 ctr[GS_C_BUILT] = ctr[GS_C_BUILT] + 1 333 gs_frame(cfg[GS_K_JFD], target, "BUILT" as *u8, 0) 334 } else { 335 ctr[GS_C_ANOMALY] = ctr[GS_C_ANOMALY] + 1 336 gs_frame(cfg[GS_K_JFD], target, "ANOMALY-RC0-NO-ARTIFACT" as *u8, 0) 337 } 338 } else { 339 ctr[GS_C_FAILED] = ctr[GS_C_FAILED] + 1 340 gs_frame(cfg[GS_K_JFD], target, "FAILED" as *u8, rc) 341 } 342 } 343 } 344 } } 345 } 346 } 347 } 348 } 349 } 350 p = p + reclen 351 } 352 } 353 n = sys_getdents64(fd, dbuf, GS_DIRBUF) 354 } 355 sys_close(fd) 356 return 0 357} 358 359func main(argc: i64, argv: *i64) -> i64 { 360 gv_puts("=== nx_gate_build_sweep -- are the unbuilt gates BROKEN, or merely NEVER COMPILED? ===\n" as *u8) 361 if argc < 2 { 362 gv_puts("REFUSED: <max> is required. An unbounded sweep over ~2900 targets is a runaway, not a default.\n" as *u8) 363 gv_puts("usage: nx_gate_build_sweep <max> [skip] [journal] [timeout_ms]\n" as *u8) 364 return 2 365 } 366 let mx: i64 = gs_atoi(argv[1] as *u8) 367 if mx < 0 { 368 gv_puts("REFUSED: <max> must be 0 (CENSUS: classify only, build nothing) or a positive integer.\n" as *u8) 369 return 2 370 } 371 var sk: i64 = 0 372 if argc > 2 { 373 sk = gs_atoi(argv[2] as *u8) 374 if sk < 0 { gv_puts("REFUSED: <skip> must be a non-negative integer.\n" as *u8); return 2 } 375 } 376 var jpath: *u8 = "/tmp/gate_build_sweep.jrnl" as *u8 377 if argc > 3 { jpath = argv[3] as *u8 } 378 var tmo: i64 = GS_DEF_TIMEOUT 379 if argc > 4 { 380 tmo = gs_atoi(argv[4] as *u8) 381 if tmo <= 0 { gv_puts("REFUSED: <timeout_ms> must be positive.\n" as *u8); return 2 } 382 } 383 384 if gs_enter_buildroot() == 0 { 385 gv_puts("REFUSED: cannot find the buildroot (no _offc/nx_sov_build_run.elf at . or ./buildroot).\n" as *u8) 386 gv_puts(" A sweep that cannot locate its toolchain must refuse, never report zero built.\n" as *u8) 387 return 4 388 } 389 390 let ctr: *i64 = sys_mmap(GS_CN * 8) as *i64 391 var i: i64 = 0 392 while i < GS_CN { ctr[i] = 0; i = i + 1 } 393 let cfg: *i64 = sys_mmap(GS_KN * 8) as *i64 394 cfg[GS_K_MAX] = mx 395 cfg[GS_K_SKIP] = sk 396 cfg[GS_K_TIMEOUT] = tmo 397 cfg[GS_K_JFD] = sys_openat_append(jpath, GS_MODE) 398 399 let r1: i64 = gs_scan("runtime" as *u8, ctr, cfg) 400 let r2: i64 = gs_scan("runtime/_hdl_build" as *u8, ctr, cfg) 401 if cfg[GS_K_JFD] >= 0 { sys_close(cfg[GS_K_JFD]) } 402 403 if r1 < 0 { 404 gv_puts("REFUSED: cannot open runtime -- a census that cannot read its corpus must refuse.\n" as *u8) 405 return 4 406 } 407 if r2 < 0 { 408 gv_puts("REFUSED: cannot open runtime/_hdl_build -- a census that cannot read its corpus must refuse.\n" as *u8) 409 return 4 410 } 411 412 if mx == 0 { 413 gv_puts("\nNX-GATECENSUS gate_sources=" as *u8); gv_num(ctr[GS_C_SEEN]) 414 gv_puts(" PROMOTED=" as *u8); gv_num(ctr[GS_C_PROMOTED]) 415 gv_puts(" COMPILED-NOT-PROMOTED=" as *u8); gv_num(ctr[GS_C_COMPILED_ONLY]) 416 gv_puts(" NEVER-COMPILED=" as *u8); gv_num(ctr[GS_C_NEVER]) 417 var cpm: i64 = 0 418 if ctr[GS_C_SEEN] > 0 { cpm = (ctr[GS_C_PROMOTED] + ctr[GS_C_COMPILED_ONLY]) * 1000 / ctr[GS_C_SEEN] } 419 gv_puts(" compiled_permil=" as *u8); gv_num(cpm) 420 var ppm: i64 = 0 421 if ctr[GS_C_SEEN] > 0 { ppm = ctr[GS_C_PROMOTED] * 1000 / ctr[GS_C_SEEN] } 422 gv_puts(" promoted_permil=" as *u8); gv_num(ppm) 423 gv_puts("\n" as *u8) 424 gv_puts("THREE POPULATIONS, NOT TWO. nx_gatebuilt_gate probes ONLY the promoted location and calls\n" as *u8) 425 gv_puts(" everything else UNBUILT, so it charges the COMPILED-NOT-PROMOTED column -- whose remedy is a\n" as *u8) 426 gv_puts(" cheap promote -- to the NEVER-COMPILED column, whose remedy is a full recompile. Only the\n" as *u8) 427 gv_puts(" NEVER-COMPILED figure supports the claim 'authored gates with NO binary exist'.\n" as *u8) 428 gv_puts("envelope: FLAT scan of runtime + runtime/_hdl_build under the DISCOVERED buildroot, same corpus\n" as *u8) 429 gv_puts(" as nx_gatebuilt_gate so the counts are directly comparable; compiled = _build/<t>.sov.elf OR\n" as *u8) 430 gv_puts(" /tmp/<t>.sov.elf; promoted = ../<t>.elf; classification only, NOTHING was built or promoted.\n" as *u8) 431 return 0 432 } 433 gv_puts("\nNX-GATESWEEP seen=" as *u8); gv_num(ctr[GS_C_SEEN]) 434 gv_puts(" attempted=" as *u8); gv_num(ctr[GS_C_ATTEMPT]) 435 gv_puts(" BUILT=" as *u8); gv_num(ctr[GS_C_BUILT]) 436 gv_puts(" FAILED=" as *u8); gv_num(ctr[GS_C_FAILED]) 437 gv_puts(" TIMEOUT=" as *u8); gv_num(ctr[GS_C_TIMEOUT]) 438 gv_puts(" ANOMALY=" as *u8); gv_num(ctr[GS_C_ANOMALY]) 439 gv_puts(" skip-existing=" as *u8); gv_num(ctr[GS_C_EXISTS]) 440 gv_puts(" not-reached=" as *u8); gv_num(ctr[GS_C_SKIPPED]) 441 gv_puts(" admission-waits=" as *u8); gv_num(ctr[GS_C_WAITED]) 442 if ctr[GS_C_PAUSED] == 1 { gv_puts(" PAUSED=yes(admission-closed;resume-with-same-args-the-journal-makes-it-idempotent)" as *u8) } 443 var permil: i64 = 0 444 if ctr[GS_C_ATTEMPT] > 0 { permil = ctr[GS_C_BUILT] * 1000 / ctr[GS_C_ATTEMPT] } 445 gv_puts(" compile_permil=" as *u8); gv_num(permil) 446 gv_puts("\n" as *u8) 447 gv_puts("envelope: FLAT scan of runtime + runtime/_hdl_build under the DISCOVERED buildroot (no recursion,\n" as *u8) 448 gv_puts(" shadow trees excluded -- same corpus as nx_gatebuilt_gate so the counts are comparable);\n" as *u8) 449 gv_puts(" bounded by max, resumable by skip, every build deadline-bounded; COMPILE ONLY -- nothing was\n" as *u8) 450 gv_puts(" promoted, so this moves no gate from UNBUILT to built in the nx_gatebuilt_gate census.\n" as *u8) 451 gv_puts(" compile_permil is over ATTEMPTED, not over the corpus -- a partial sweep never implies the whole.\n" as *u8) 452 return 0 453}