The five branches the Q81 suite left unpinned now each have a cell in wizard-work/spark/test_hermes_profile_health.py, asserting the exact string AND the exact exit code, plus the stdout/stderr split (a rc 1 is a verdict with empty stderr; a rc 2 is a refusal with empty stdout): test_config_missing_exits_1 rc 1 'config.yaml missing' test_config_as_directory_exits_1 rc 1 'config.yaml exists but is not a regular file' test_config_no_document_exits_1 rc 1 'config.yaml parses to no document' test_config_empty_mapping_exits_1 rc 1 'config.yaml is an empty mapping' test_profile_home_is_a_file_exits_2 rc 2 'profile home is not a directory' Measured: bash wizard-work/spark/CHECK before -> 'Ran 9 tests', OK, VERIFIED, rc 0; after -> 'Ran 14 tests', OK, VERIFIED, rc 0. Mutant battery (q83_mutants.py, q83-mutants.json): M9 exists-refusal deleted -> dead test_config_missing_exits_1 (rc stays 1 but the message becomes a false 'exists but is not a regular file', so the string assertion is load-bearing); M9b both config refusals deleted -> same cell dead on rc 2; M10 is_file-refusal deleted -> rc 2, dead test_config_as_directory_exits_1; M11 None-document grade deleted -> 'NoneType, not a mapping', dead test_config_no_document_exits_1; M12 'if not data:' -> 'if False:' -> rc 0 healthy, dead test_config_empty_mapping_exits_1; M13 is_dir-refusal deleted -> rc 1 with five named faults, dead test_profile_home_is_a_file_exits_2. Baseline copy: rc 0, Ran 14, 0 dead. hermes_profile_health.py is not touched. Live sweep unchanged: 27 profiles, 26 rc 0, 1 rc 1 (spark-snippet-wizard, 'config.yaml missing').
40 lines
1.5 KiB
Bash
Executable File
40 lines
1.5 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 git commit pushed
|
|
git -C /root/troupe-standup rev-parse ed959f0 >/dev/null 2>&1 || exit 11
|
|
|
|
# Q81: the profile-health suite. One cell per graded behaviour (9 cells at 2026-10-26,
|
|
# 14 after Q83 pins the five config.yaml/profile-home refusals).
|
|
# Resolves its own directory from $0, so this leg grades THIS checkout, not a host path.
|
|
SPARK_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
suite_out="$(python3 -m unittest discover -s "$SPARK_DIR" -p 'test_hermes_profile_health.py' 2>&1)"
|
|
suite_rc=$?
|
|
echo "$suite_out" | tail -3
|
|
[ "$suite_rc" -eq 0 ] || exit 12
|
|
|
|
echo "VERIFIED"
|
|
exit 0 |