1.8 KiB
1.8 KiB
Q93 selftest_sweep refactor -- verification (forge: Refactor lane)
Work
Commit 9878f12 ("forge: Q93 contract-grading + unified run_verdict in
selftest_sweep (44 cells, 0 fatal)") refactored tools/selftest_sweep.py:
judge_malformed(rc, out, err, expect_rc, need)-- the 5-arg CONTRACT form. A refusal (expect_rc == REFUSAL_RC == 2) is now graded on its contract (documented rc, no traceback, one non-empty line on stdout OR stderr), not on a pinned prose phrase.needis consulted only where a tool GRADES a malformed input (rc 0/1), where the verdict word IS the verdict.run_verdict(tool_fatal, read_fatal, malformed_fatal, pin_rc, pin_fatal)->(line, exit_code)from ONE function, so the printed summary and the exit code cannot disagree (the Q93 core fix: the old sweep printed "sweep: 22 tools, 22 OK, 0 fatal" while exiting 1).- count pin moved 39 -> 44; the stale
1 if (rc or rrc or pin_rc) else 0main() arm is removed.
Evidence
The committed verifier reproduces the green run against the on-disk tree:
$ python3 wizard-work/forge/verify_selftest_sweep_q93_refactor.py
[ok ] py_compile
[ok ] static marker: def run_verdict(...)
... (18 checks) ...
[ok ] judge_malformed has 5-arg (rc,out,err,expect_rc,need) signature
verify_selftest_sweep_q93_refactor: ALL GREEN (0 failed, all checks) rc=0
Full captured stdout/stderr is in Q93_REFACTOR_VERIFICATION_EVIDENCE.txt.
Gate
tools/selftest_sweep.py --selftest prints selftest: 44 cells, 44 passed, 0 failed and exits 0; the read-refusal (Q53) and malformed (Q53) axes both
grade against the Q93 contract; run_verdict returns the rc its verdict line
states. No regressions vs. the pre-Q93 Counter-census refactor
(27c9869), whose verifier this file supersedes.