volt: q152 gate -- posts-census offline repair, check_sweep --only scopes the grade
This commit is contained in:
1 parent
4e853b25c7
commit
8837bb5053
9 files changed
+532
-136
No files matched your search
@@ -521,8 +521,13 @@ PIN_OPENED = [51, 52, 53, 65, 100, 101, 102, 103, 104, 105, 106, 107, 109,
|
||||
# record_only stays 55 (the new id has a heading, so it is not record-only) and
|
||||
# open / opened stay 0 / 26 -- a same-tick "OPENED and REPAIRED" is a closure
|
||||
# (the Q138 rule), so no probe is registered for it and CHECK-q151 is its guard.
|
||||
PIN_COUNTS = {"headings": 99, "heading_ids": 87, "records": 113,
|
||||
"record_ids": 79, "ids": 142, "open": 0, "opened": 26,
|
||||
# Q152 (2026-11-01): the same move again -- one heading (## Q152 closure) and
|
||||
# one record (**Q152 — OPENED and REPAIRED ...) for a new id, so headings
|
||||
# 99 -> 100, heading_ids 87 -> 88, records 113 -> 114, record_ids 79 -> 80,
|
||||
# ids 142 -> 143; record_only stays 55 and open / opened stay 0 / 26 (same-tick
|
||||
# closure, no probe; CHECK-2026-11-01-posts-census is its guard).
|
||||
PIN_COUNTS = {"headings": 100, "heading_ids": 88, "records": 114,
|
||||
"record_ids": 80, "ids": 143, "open": 0, "opened": 26,
|
||||
"record_only": 55}
|
||||
|
||||
PIN_STATE = {
|
||||
|
||||
@@ -140,3 +140,13 @@ CHECK-q150 0 q150: 6 leg(s), all passed
|
||||
# this file was touched: the five NEW paths `--paths` reports at that rev belong
|
||||
# to other lanes and are left for their own tick.
|
||||
CHECK-q151 0 q151: 3 leg(s), all passed
|
||||
# row added by hand (Q152, 2026-11-01): the posts-census entry point was
|
||||
# NEW at 76471ad and read rc 2 there (python under a bash invocation). The
|
||||
# row below is the repaired reading, taken with this directory's own run
|
||||
# entry point at the commit this record lands after: rc 0, and the note is
|
||||
# the wrapper's own verdict line. No other row was touched.
|
||||
wizard-work/ledger/CHECK-2026-11-01-posts-census 0 VERDICT=PASS posts-census-2026-11-01 users=10 posts=100 rows=10
|
||||
# row added by hand (Q152, 2026-11-01): the Q152 gate, measured after this
|
||||
# record took its edits. Four legs (snapshot, CSV mutant, scoped sweep,
|
||||
# sweep selftest), none of them touching the network.
|
||||
CHECK-q152 0 q152: 4 leg(s), all passed
|
||||
|
Can't render this file because it contains an unexpected character in line 93 and column 87.
|
@@ -35,12 +35,20 @@ EXIT CODES
|
||||
|
||||
USAGE
|
||||
python3 check_sweep.py --repo . --check
|
||||
python3 check_sweep.py --repo . --only CHECK-2026-11-01-posts-census --check
|
||||
python3 check_sweep.py --repo . --list
|
||||
python3 check_sweep.py --repo . --take wizard-work/volt/q143-check-sweep/check_entry_baseline.tsv
|
||||
python3 check_sweep.py --selftest
|
||||
|
||||
`--only` scopes the grade as well as the sweep: the rows it did not run are
|
||||
reported as not swept, never as missing from the tree. Before that rule, a
|
||||
one-path run on a clean tree read 1 green row and 110 phantom MISSING faults,
|
||||
rc 1 -- a scoped invocation that could not pass whatever the tree did.
|
||||
"""
|
||||
import argparse
|
||||
import concurrent.futures
|
||||
import contextlib
|
||||
import io
|
||||
import json
|
||||
import os
|
||||
import re
|
||||
@@ -317,6 +325,22 @@ def selftest():
|
||||
cells.check("grade-clean-control", faults == [] and graded == 5,
|
||||
(faults, graded))
|
||||
|
||||
# --- a scoped run grades the rows it swept, not the whole baseline --
|
||||
tree6 = os.path.join(tmp, "tree6")
|
||||
write_fixture(tree6)
|
||||
base6 = os.path.join(tmp, "base6.tsv")
|
||||
take(tree6, base6, timeout=3)
|
||||
buf = io.StringIO()
|
||||
with contextlib.redirect_stdout(buf):
|
||||
rc_scoped = main(["--repo", tree6, "--baseline", base6,
|
||||
"--only", "CHECK-green", "--check"])
|
||||
scoped = buf.getvalue()
|
||||
cells.check("only-scoped-is-green", rc_scoped == 0, scoped)
|
||||
cells.check("only-grades-one-row",
|
||||
"1 baseline row(s) graded (1), 0 fault(s)" in scoped, scoped)
|
||||
cells.check("only-names-the-unswept",
|
||||
"4 row(s) not swept (--only)" in scoped, scoped)
|
||||
|
||||
# --- four mutants, each must be caught by name ----------------------
|
||||
(faults, _) = grade(sweep(tree, timeout=3),
|
||||
base_rows + [("CHECK-ghost", 0, "fixture")])
|
||||
@@ -468,14 +492,23 @@ def main(argv=None):
|
||||
with open(args.json, "w", encoding="utf-8") as fh:
|
||||
json.dump({"rev": rev, "rows": rows}, fh, indent=1, sort_keys=True)
|
||||
|
||||
# --only sweeps a subset, so it must grade that same subset: a row it did
|
||||
# not run was not read, and calling it "missing from the tree" is a phantom
|
||||
# fault. Measured before this line existed: `--only <one path> --check`
|
||||
# graded 1 row green and 110 unswept rows as MISSING, rc 1, on a clean tree.
|
||||
base_in_scope = [r for r in base_rows if not args.only or args.only in r[0]]
|
||||
for row in rows:
|
||||
print(" %-11s rc=%-3d %s" % (row["state"], row["rc"], row["path"]))
|
||||
faults, graded = grade(rows, base_rows)
|
||||
faults, graded = grade(rows, base_in_scope)
|
||||
for line in faults:
|
||||
print("FAIL: " + line)
|
||||
green = sum(1 for r in rows if r["rc"] == 0)
|
||||
scope_note = ("" if not args.only else
|
||||
", %d row(s) not swept (--only)"
|
||||
% (len(base_rows) - len(base_in_scope)))
|
||||
print("check-sweep: %d entry point(s), %d green, %d baseline row(s) graded (%d), "
|
||||
"%d fault(s)" % (len(rows), green, len(base_rows), graded, len(faults)))
|
||||
"%d fault(s)%s" % (len(rows), green, len(base_in_scope), graded,
|
||||
len(faults), scope_note))
|
||||
return 0 if not faults else 1
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user