volt: Q130 -- re-land ten blobs a spark sweep reverted, pin the Q126 cells, run the guard as gate leg ten
This commit is contained in:
1 parent
afb231d10b
commit
e9991dc7dc
14 files changed
+763
-167
No files matched your search
+46
-9
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
"""verify.py -- the HOME the index gate did not have: one command, nine legs,
|
||||
"""verify.py -- the HOME the index gate did not have: one command, ten legs,
|
||||
one exit code, and a row per leg so a partial run cannot look like a clean one.
|
||||
|
||||
WHY THIS EXISTS
|
||||
@@ -83,6 +83,19 @@ WHAT IT RUNS -- one row per leg, cheapest first, never in parallel
|
||||
flag other than `--json` (`--write`, `--save-vocab`) on the
|
||||
same rule. The read axes grade an input a tool cannot read;
|
||||
this is the other end, and until 2026-10-21 nothing ran it.
|
||||
import-resolve tools/import_resolve_check.py --rev WORKTREE
|
||||
every committed test file binds the module it imports to the
|
||||
REPO, not to a host path the writer happened to have -- the
|
||||
Q61(b)/Q100 class, graded by `ast` rather than `grep` so a
|
||||
docstring that records the fix is not a fault
|
||||
closed-artifacts wizard-work/spark/closed_artifact_guard.py --root .
|
||||
every repair a CLOSED item landed is still the bytes that
|
||||
landed: sha256 pins for Q109/Q120's three artifacts and
|
||||
Q126's seven rebound cells, each cell run from its own
|
||||
directory. The instrument lives in the lane that owns those
|
||||
files; the leg is here because a guard nothing runs is not a
|
||||
guard -- `afb231d` reverted all ten blobs and no gate leg saw
|
||||
the three artifacts.
|
||||
|
||||
The legs are ordered by cost, and a leg is never skipped because an earlier
|
||||
one failed: a stale index and a broken selftest are different defects and the
|
||||
@@ -205,6 +218,11 @@ LEGS = (
|
||||
"what": "every committed test file binds the module it imports to the "
|
||||
"repo, not to a host path (static sys.path scan plus "
|
||||
"--import-probe)"},
|
||||
{"key": "closed-artifacts", "tool": "closed_artifact_guard.py", "slow": False,
|
||||
"path": os.path.join("wizard-work", "spark", "closed_artifact_guard.py"),
|
||||
"what": "every repair a closed item landed is still the bytes that landed "
|
||||
"(sha256 pins for Q109/Q120 and the seven Q126 cells) and its "
|
||||
"cell still runs green"},
|
||||
)
|
||||
|
||||
# A detail line is a courtesy, not the verdict -- but a verdict with no line
|
||||
@@ -410,6 +428,13 @@ def leg_argv(key, repo, queue, index, checkin_day=None):
|
||||
return [sys.executable, os.path.join(repo, "tools",
|
||||
"import_resolve_check.py"),
|
||||
"--repo", repo, "--rev", "WORKTREE", "--quiet"]
|
||||
if key == "closed-artifacts":
|
||||
# --root, so the tree graded is the tree named on the command line and
|
||||
# never the working directory this leg happened to inherit.
|
||||
return [sys.executable,
|
||||
os.path.join(repo, "wizard-work", "spark",
|
||||
"closed_artifact_guard.py"),
|
||||
"--root", repo]
|
||||
raise KeyError(key)
|
||||
|
||||
|
||||
@@ -425,7 +450,10 @@ def _elapsed_ms(started):
|
||||
|
||||
def run_leg(leg, repo, queue, index, timeout, checkin_day=None):
|
||||
"""One leg -> one row. rc 0/1/2 are graded; anything else is ungradable."""
|
||||
tool = os.path.join(repo, "tools", leg["tool"])
|
||||
# A leg names its tool inside `tools/` by default; `path` lets a leg grade an
|
||||
# instrument a lane owns in its own directory (the smoke rule is that the
|
||||
# gate runs it, not that it lives here).
|
||||
tool = os.path.join(repo, leg.get("path") or os.path.join("tools", leg["tool"]))
|
||||
started = time.time()
|
||||
row = {"key": leg["key"], "tool": leg["tool"], "verdict": None,
|
||||
"rc": None, "detail": "", "what": leg["what"]}
|
||||
@@ -644,7 +672,14 @@ def _fixture(base, rcs, outs=None, sleep=0.0, markers=None, argv_markers=None,
|
||||
for tool, rc in rcs.items():
|
||||
if rc is None: # tool absent on purpose
|
||||
continue
|
||||
_stub(os.path.join(repo, "tools", tool), rc,
|
||||
# A key with a separator is a leg whose instrument lives outside tools/;
|
||||
# it is stubbed where the leg will look for it.
|
||||
if os.sep in tool:
|
||||
dest = os.path.join(repo, tool)
|
||||
os.makedirs(os.path.dirname(dest), exist_ok=True)
|
||||
else:
|
||||
dest = os.path.join(repo, "tools", tool)
|
||||
_stub(dest, rc,
|
||||
out=(outs or {}).get(tool, ""), sleep=sleep,
|
||||
marker=(markers or {}).get(tool),
|
||||
argv_marker=(argv_markers or {}).get(tool))
|
||||
@@ -663,7 +698,9 @@ GREEN_ALL = {"checkin_check.py": 0, "path_claim_check.py": 0,
|
||||
"reply_check.py": 0, "queue_index.py": 0,
|
||||
"queue_append_audit.py": 0, "doc_command_check.py": 0,
|
||||
"selftest_sweep.py": 0, "write_probe.py": 0,
|
||||
"import_resolve_check.py": 0}
|
||||
"import_resolve_check.py": 0,
|
||||
os.path.join("wizard-work", "spark",
|
||||
"closed_artifact_guard.py"): 0}
|
||||
|
||||
|
||||
def selftest():
|
||||
@@ -680,11 +717,11 @@ def selftest():
|
||||
failures.append("%s\n got: %r\n want: %r" % (label, got, want))
|
||||
|
||||
with tempfile.TemporaryDirectory(prefix="verify-selftest-") as td:
|
||||
# 1. eight green stubs -> rc 0
|
||||
# 1. ten green stubs -> rc 0
|
||||
repo = _fixture(os.path.join(td, "c1"), GREEN_ALL)
|
||||
rc, out = _verify("--repo", repo)
|
||||
check("1 all nine legs green -> rc 0", rc, 0)
|
||||
check("1b summary counts the nine legs", "verify: 9 legs, 9 pass, 0 fault, "
|
||||
check("1 all ten legs green -> rc 0", rc, 0)
|
||||
check("1b summary counts the ten legs", "verify: 10 legs, 10 pass, 0 fault, "
|
||||
"0 ungradable, 0 skipped" in out, True)
|
||||
|
||||
# 2. a stale index is a FAULT, and its own line reaches the row
|
||||
@@ -741,7 +778,7 @@ def selftest():
|
||||
check("7 --json writes the rows", [r["key"] for r in obj.get("rows", [])],
|
||||
["checkin", "path-claims", "reply-headings", "index-current",
|
||||
"append-audit", "doc-commands", "selftest-sweep", "write-axis",
|
||||
"import-resolve"])
|
||||
"import-resolve", "closed-artifacts"])
|
||||
check("7b --json carries the same rc the process returned",
|
||||
obj.get("rc"), rc)
|
||||
|
||||
@@ -785,7 +822,7 @@ def selftest():
|
||||
check("12 skipped leg is its own count in --json",
|
||||
obj.get("counts", {}).get("SKIP"), 1)
|
||||
check("12b and the skipped leg is not counted as a pass",
|
||||
obj.get("counts", {}).get(PASS), 8)
|
||||
obj.get("counts", {}).get(PASS), 9)
|
||||
|
||||
# 13. the detail line must not contradict the verdict: a row graded
|
||||
# FAULT beside "0 fatal" is the SILENT failure this gate exists to catch.
|
||||
|
||||
Reference in new issue
Block a user