#!/bin/sh
# Q134 CHECK -- `tools/inspect_tree.py` must stay retired, not lost, and the
# invariant it broke (every tracked tools/*.py is a graded instrument) must
# still red a tree that puts it back.
#
# rc 0 = every leg as expected; 1 = a graded fault; 2 = could not grade.
# The work is done by wizard-work/volt/q134_verify.py beside this file: it
# grades the absence from `git ls-tree HEAD tools/`, the resolvability of blob
# 3fea636f at 93fa377, write_probe.py's 15-cell contract selftest, and one
# mutant clone with the retired bytes recommitted.  The graded tree is only
# ever read; the mutant is built inside a TemporaryDirectory.
set -u
REPO="$(cd "$(dirname "$0")/../.." && pwd)" || exit 2
if ! cd "$REPO"; then
    echo "q134: could not grade -- cannot cd to $REPO"
    exit 2
fi
if ! command -v python3 >/dev/null 2>&1; then
    echo "q134: could not grade -- no python3 on PATH"
    exit 2
fi
exec python3 wizard-work/volt/q134_verify.py "$@"
