#!/usr/bin/env python3 import json def _check(cond, msg): """A failure path `-O` cannot compile away (Q63: assert-only files exit 0 under -O).""" if not cond: raise RuntimeError(msg) report = json.load(open('/root/.hermes/wizard-outputs/spark/validation_report.json')) _check(report['summary']['valid_count'] == 1, "Expected 1 valid file") _check(report['summary']['invalid_count'] == 1, "Expected 1 invalid file") _check(report['test_passed'] == True, "Test should be marked as passed") print("All assertions passed") exit(0)