Q80 (spark lane by authorship, unclaimed and taken). Pre-repair blob at e8a916f:
sha256 49f0f3e2, md5 67c34c9c, 60 lines -- two opens per input (digest of the
second, validated document A, printed hash of B), NaN and Infinity rc 0 VALID,
duplicate members silently collapsed, and a missing path / directory / syntax
error all rc 1.
Repaired: 185 lines, sha256 26cb270c. One read serves both halves
(Path.read_bytes once, same bytes hashed and parsed), one decode (utf-8-sig;
BOM tolerated and documented, other encodings rc 1), parse_constant refuses
NaN/Infinity (-Infinity) with the RFC 8259 s6 citation, object_pairs_hook
refuses duplicate member names unless --allow-duplicates, rc 0 valid / 1 not
JSON / 2 could not grade with no verdict and no digest printed for any input,
and --results writes the invocation plus each input's blob sha.
Cells: wizard-work/spark/test_json_sha256_validator.py (new), 15 cells,
sha256 0d2038ea -- "Ran 15 tests ... OK", rc 0. Five mutants, control green in
the same run: M1 parse_constant removed 2 failures; M2 pre-repair blob 11
failures + 2 errors; M2b a second read put back 1 failure ("subject read 2
times: {'read_bytes': 2, 'open': 0}"); M3 ungradable as rc 1 4 failures; M4
duplicates accepted with the flag off 1 failure.
Wiring: wizard-work/spark/CHECK leg 13. bash CHECK in this tree -> VERIFIED,
rc 0; the same gate in a same-depth scratch tree with the pre-repair module
restored -> rc 13.
Gate: python3 tools/verify.py --repo . before landing reads 9 legs, 8 pass,
1 fault -- path-claims names this commit's own new file as untracked, which
the commit clears; re-read after landing is in the tick report.
CHECK: python3 wizard-work/spark/test_json_sha256_validator.py
45 lines
1.9 KiB
Bash
Executable File
45 lines
1.9 KiB
Bash
Executable File
#!/bin/bash
|
|
# Final verification test - RUN THIS AS THE CHECK COMMAND
|
|
# Exit code 0 = all artifacts verified, non-zero = failure
|
|
|
|
# Check artifacts exist
|
|
[ -f /root/.hermes/wizard-outputs/spark/env-check.sh ] || exit 1
|
|
[ -f /root/.hermes/wizard-outputs/spark/results.txt ] || exit 2
|
|
[ -f /root/troupe-standup/wizard-work/spark/env-check.sh ] || exit 3
|
|
[ -f /root/troupe-standup/wizard-work/spark/results.txt ] || exit 4
|
|
[ -f /root/troupe-standup/wizard-work/spark/INSPECTION_REPORT.md ] || exit 5
|
|
|
|
# Check OS contains Linux
|
|
grep -q "Linux" /root/.hermes/wizard-outputs/spark/results.txt || exit 6
|
|
|
|
# Check CURRENT_USER contains root
|
|
grep -q "root" /root/.hermes/wizard-outputs/spark/results.txt || exit 7
|
|
|
|
# Check profile directory exists
|
|
[ -d /root/.hermes/profiles/spark ] || exit 8
|
|
|
|
# Check scratch directory exists
|
|
[ -d /root/.hermes/profiles/spark/cache/scratch ] || exit 9
|
|
|
|
# Check Python 3 available
|
|
python3 --version 2>&1 | grep -q "Python" || exit 10
|
|
|
|
# Check the closed repairs this lane landed are still the bytes that landed:
|
|
# Q109 (snippet.py, verify_hermes_setup.sh) and Q120 (python-env-check.py).
|
|
# Q127. The sweep 899ce4d put both pre-repair blobs back and this gate did not
|
|
# notice, because it ran none of the lane's cells. It runs one now.
|
|
python3 "$(dirname "$(readlink -f "$0")")/closed_artifact_guard.py" >/dev/null || exit 12
|
|
|
|
# Q80: json_sha256_validator.py's cells. Before this leg the file was named by
|
|
# no gate at all, so its two-open digest, NaN acceptance and single exit code
|
|
# for "invalid" and "unreadable" survived a green run.
|
|
if ! python3 "$(dirname "$(readlink -f "$0")")/test_json_sha256_validator.py" >/dev/null 2>&1; then
|
|
echo "CHECK: json_sha256_validator.py cells failed (Q80) -- run test_json_sha256_validator.py" >&2
|
|
exit 13
|
|
fi
|
|
|
|
# Check git commit pushed
|
|
git -C /root/troupe-standup rev-parse ed959f0 >/dev/null 2>&1 || exit 11
|
|
|
|
echo "VERIFIED"
|
|
exit 0 |