The monitor's retry (3 attempts, 2 s apart) had no reader: CHECK-q115 grades the carry path and its harness replaces get_folder with a stub, so a repair that retried once or never would have read the same. q118_verify.py drives the deployed loop at the boundary it really crosses -- a fake curl first on PATH, scripted codes, every call timestamped -- and grades recovery, exhaustion, no-pause-on-success and the Q115 carry, with three mutants required to red the cell they target. Measured: CHECK-q118 8/8 legs rc 0; a copy with tries=1 reads 3 faults rc 1; verify 10/10 legs, gate OK.
40 lines
1.4 KiB
Bash
Executable File
40 lines
1.4 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Q118 gate: the pipe change-monitor retries a folder read before calling it a
|
|
# failure -- 3 attempts, 2 s apart, the last code named, and a wake rather than
|
|
# a fabricated deletion when every attempt fails.
|
|
#
|
|
# The artifact under repair is NOT in this repository -- the pipe's monitor lives
|
|
# at /root/.hermes/scripts/troupe_pipe_monitor.py because the cron job runs it by
|
|
# host path -- so like CHECK-q115 this gate reads a host path. That is stated,
|
|
# not hidden (the Q106 host-pin class); moving the monitor into the tree is the
|
|
# pipe's decision, not this item's. Everything the gate grades is the deployed
|
|
# retry loop itself: the fake `curl` sits at the module's real boundary, so no
|
|
# function under test is stubbed.
|
|
set -u
|
|
HERE="$(cd "$(dirname "$0")" && pwd)"
|
|
VERIFY="$HERE/q118_verify.py"
|
|
|
|
if [ ! -f "$VERIFY" ]; then
|
|
echo "FAIL: verifier missing at $VERIFY" >&2
|
|
exit 2
|
|
fi
|
|
|
|
out="$(python3 "$VERIFY" 2>&1)"
|
|
rc=$?
|
|
printf '%s\n' "$out" | grep -E '^FAIL:|^q118:' || true
|
|
|
|
if [ "$rc" -eq 2 ]; then
|
|
echo "FAIL: could not grade (rc 2) -- see the line above" >&2
|
|
exit 2
|
|
fi
|
|
if [ "$rc" -ne 0 ]; then
|
|
echo "FAIL: rc=$rc -- a leg above is red" >&2
|
|
exit 1
|
|
fi
|
|
if ! printf '%s\n' "$out" | grep -q '^q118: 8 leg(s), 8 passed, 0 fault(s)$'; then
|
|
echo "FAIL: expected 8/8 legs, got: $(printf '%s\n' "$out" | tail -1)" >&2
|
|
exit 1
|
|
fi
|
|
echo "q118: retry absorbs a transient read, names attempts= and last=, wakes on exhaustion -- OK"
|
|
exit 0
|