Files
troupe-standup/wizard-work/spark/verify_environment.py

39 lines
1.2 KiB
Python

#!/usr/bin/env python3
"""Verify Python environment is properly configured for Hermes snippet tasks.
Verifies:
1. Python 3.14+ is available
2. Working directory is /root (not elsewhere)
3. Hermes profiles directory exists
4. Wizard outputs directory exists
5. Troupe standup repo exists with wizard-work/spark
Verdict: PASS/FAIL based on directory existence.
"""
import os
import sys
import json
def verify_snippet_environment():
"""Check required directories for snippet lane tasks."""
checks = {
"python_ok": sys.version_info >= (3, 14),
"cwd_is_root": os.getcwd() == "/root",
"hermes_profiles": os.path.isdir("/root/.hermes/profiles/spark"),
"wizard_outputs": os.path.isdir("/root/.hermes/wizard-outputs/spark"),
"troupe_standup": os.path.isdir("/root/troupe-standup"),
"wizard_work_spark": os.path.isdir("/root/troupe-standup/wizard-work/spark"),
}
all_passed = all(checks.values())
return checks, all_passed
if __name__ == "__main__":
checks, passed = verify_snippet_environment()
report = {
"checks": checks,
"all_passed": passed,
"verdict": "PASS" if passed else "FAIL"
}
print(json.dumps(report, indent=2))
sys.exit(0 if passed else 1)