The Q137 record described bytes no ref held: wizard-work/volt/q137-open-set/ was untracked, the record cited open_set.py as 713 lines / sha256 72abfd440291 (no such object in any ref; disk is 721 lines / a81a976519), and the eleventh verify.py leg was uncommitted. path-claims read rc 1 with exactly the two new paths, and it was the gate's only red leg. Landing: open_set.py, CHECK-q137, REPORT.md, the queue addendum, the re-rendered index, tools/verify.py's open-set leg. After: CHECK-q137 4/4 rc 0; verify.py --selftest 59/59; verify.py --fast 11 legs, 10 pass, 0 fault, 1 skipped, gate OK; path claims 0 new; a clean clone of this commit reads the same and HEAD:.../open_set.py sha256 equals the digest the addendum states.
54 lines
1.9 KiB
Bash
Executable File
54 lines
1.9 KiB
Bash
Executable File
#!/bin/bash
|
|
# CHECK-q137 -- four legs over the work queue's declared open set.
|
|
#
|
|
# selftest 13 cells: 8 parser fixtures over synthetic text, then the pin
|
|
# logic itself -- green on the live queue, red on three mutated
|
|
# copies (an appended OPEN record, a DONE turned OPEN, a dropped
|
|
# heading). A gate that cannot fail is the class this repo keeps
|
|
# filing (Q113, Q120); this leg is what proves it can.
|
|
# open-set the derived open set and the counts, against their pin.
|
|
# order line order is commit order (git blame stamps), so "the last
|
|
# record for an id" is "the latest record", not an assumption.
|
|
# closures one probe per id that was ever opened: is the defect its record
|
|
# describes still present at HEAD? 20 measured, 6 unmeasurable
|
|
# from this tree (network, archive, live gate, database).
|
|
#
|
|
# Exit codes: 0 all legs green, 1 a leg faulted, 2 a leg could not grade.
|
|
set -u
|
|
HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
TOOL="$HERE/open_set.py"
|
|
PY="${PYTHON:-python3}"
|
|
rc=0
|
|
legs=0
|
|
faults=0
|
|
|
|
run_leg() {
|
|
name="$1"; shift
|
|
legs=$((legs + 1))
|
|
out="$("$PY" "$TOOL" "$@" 2>&1)"
|
|
lrc=$?
|
|
if [ "$lrc" -eq 0 ]; then
|
|
printf ' %-9s PASS rc=0 %s\n' "$name" "$(printf '%s' "$out" | tail -1)"
|
|
elif [ "$lrc" -eq 1 ]; then
|
|
faults=$((faults + 1))
|
|
printf ' %-9s FAULT rc=1 %s\n' "$name" "$(printf '%s' "$out" | tail -1)"
|
|
printf '%s\n' "$out" | grep -E '^(FAIL|!)' | head -5
|
|
else
|
|
faults=$((faults + 1))
|
|
printf ' %-9s UNGRADABLE rc=%s %s\n' "$name" "$lrc" "$(printf '%s' "$out" | tail -1)"
|
|
fi
|
|
[ "$lrc" -eq 0 ] || rc=1
|
|
}
|
|
|
|
run_leg selftest --selftest
|
|
run_leg open-set --check
|
|
run_leg order --order
|
|
run_leg closures --closures
|
|
|
|
if [ "$rc" -eq 0 ]; then
|
|
echo "q137: $legs leg(s), all passed"
|
|
else
|
|
echo "q137: $legs leg(s), $faults fault(s)"
|
|
fi
|
|
exit "$rc"
|