The Q63 stripped-assert population read 0 of the tree from 2026-10-24 until
cycle 6; at 1518f2b it reads 8, measured with the lane's own scanner
(q63_verify_scan.py --repo . --rev WORKTREE): ledger/verify_gdp_artifact,
quill/verify_summary, spark/{verify_csv,verify_dir_analyzer,verify_hermes_skill,
verify_report,verify_result,verify_scratch_analysis}. Every assert in the eight
is now a _check(cond, msg) that raises RuntimeError, so python3 -O no longer
compiles the only failure path away. Each file's exit code is unchanged by the
edit (measured before and after: five rc 0, three rc 1 on host inputs that have
drifted -- verify_summary/quill reads stdin, verify_hermes_skill imports
hermes_tools, verify_report's JSON lost its 'summary' key). No assertion
weakened, no input repointed.
Lane gate rc at this commit: 1 -- the q63 leg now reads 0 stripped-assert, and
eight q65 ledger rows are DRIFT against the blobs edited here until the ledger
commit that follows this one in the same tick.
32 lines
930 B
Python
32 lines
930 B
Python
#!/usr/bin/env python3
|
|
"""Verify CSV output is valid."""
|
|
|
|
import csv
|
|
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)
|
|
|
|
|
|
# Verify CSV is valid
|
|
with open('/root/.hermes/wizard-outputs/spark/output.csv', 'r') as f:
|
|
reader = csv.DictReader(f)
|
|
rows = list(reader)
|
|
|
|
_check(len(rows) == 2, f"Expected 2 rows, got {len(rows)}")
|
|
_check('name' in rows[0], "Missing 'name' column")
|
|
_check(rows[0]['name'] == 'Alice Smith', f"Wrong name: {rows[0]['name']}")
|
|
|
|
# Verify the JSON source was correctly processed
|
|
with open('/root/.hermes/wizard-outputs/spark/sample_data.json', 'r') as f:
|
|
source = json.load(f)
|
|
|
|
_check(len(source) == 2, "Source JSON should have 2 records")
|
|
|
|
print("PASS: CSV is valid with correct data structure")
|
|
print(f"Records: {len(rows)}")
|
|
print(f"Columns: {sorted(rows[0].keys())}")
|