Files
troupe-standup/wizard-work/spark/verify_all.py
T

46 lines
1.5 KiB
Python

import json
from pathlib import Path
output_dir = Path("/root/troupe-standup/wizard-work/spark")
results = {
"timestamp": "2026-10-22T05:40:00Z",
"tests": {},
"all_tests_passed": False
}
# Test 1: Check file exists in wizard-outputs
results["tests"]["validator_in_wizard_outputs"] = {
"passed": Path("/root/.hermes/wizard-outputs/spark/json_validator.py").exists()
}
# Test 2: Check validation_results.json exists in wizard-outputs
results["tests"]["wizard_validation_results_exist"] = {
"passed": Path("/root/.hermes/wizard-outputs/spark/validation_results.json").exists()
}
# Test 3: Read and verify wizard-outputs validation_results.json has all_tests_passed
try:
with open("/root/.hermes/wizard-outputs/spark/validation_results.json") as f:
wizard_data = json.load(f)
results["tests"]["wizard_all_tests_passed"] = {
"passed": wizard_data.get("all_tests_passed", False)
}
except Exception as e:
results["tests"]["wizard_all_tests_passed"] = {"passed": False, "error": str(e)}
# Test 4: Check troupe-standup directory structure is correct
results["tests"]["troupe_dir_exists"] = {
"passed": output_dir.exists()
}
# Overall result
passed = all(t.get("passed", False) for t in results["tests"].values())
results["all_tests_passed"] = passed
# Write results
output_file = output_dir / "validation_results.json"
with open(output_file, 'w') as f:
json.dump(results, f, indent=2)
print(f"Validation results: {output_file}")
print(f"All tests passed: {passed}")