54 lines
1.7 KiB
Python
54 lines
1.7 KiB
Python
#!/usr/bin/env python3
|
|
"""Verify sol-lane daily ledger triage artifact (Sol-Lane-Triage-2026-10-24.json/.md)."""
|
|
import json
|
|
import os
|
|
import sys
|
|
|
|
REPO = "/root/troupe-standup/wizard-work/sol"
|
|
JSON = os.path.join(REPO, "Sol-Lane-Triage-2026-10-24.json")
|
|
MD = os.path.join(REPO, "Sol-Lane-Triage-2026-10-24.md")
|
|
|
|
errors = []
|
|
|
|
try:
|
|
record = json.load(open(JSON))
|
|
except Exception as exc:
|
|
print("FAIL: cannot load JSON: %s" % exc)
|
|
sys.exit(1)
|
|
|
|
lanes = record.get("lanes", [])
|
|
if len(lanes) != 7:
|
|
errors.append("expected 7 lanes, got %d" % len(lanes))
|
|
if len(record.get("generated_utc", "")) != 20:
|
|
errors.append("generated_utc missing/short: %r" % record.get("generated_utc"))
|
|
|
|
for lane in lanes:
|
|
if lane.get("status") != "STALE":
|
|
errors.append("lane %s status %r != STALE" % (lane.get("id"), lane.get("status")))
|
|
age = lane.get("age_hours")
|
|
if not (isinstance(age, (int, float)) and age > 168):
|
|
errors.append("lane %s age_hours %r should be >168" % (lane.get("id"), age))
|
|
|
|
counts = {"ACTIVE": 0, "WATCH": 0, "STALE": 0}
|
|
for lane in lanes:
|
|
counts[lane["status"]] += 1
|
|
if counts != {"ACTIVE": 0, "WATCH": 0, "STALE": 7}:
|
|
errors.append("count mismatch: %r" % counts)
|
|
|
|
if not os.path.exists(MD):
|
|
errors.append("MD missing")
|
|
else:
|
|
text = open(MD).read()
|
|
if not text.startswith("# Sol Lane Daily Ledger Triage"):
|
|
errors.append("MD does not start with expected header")
|
|
if "forge-2026-10-16-1446.txt" not in text:
|
|
errors.append("MD missing latest log reference")
|
|
|
|
if errors:
|
|
print("FAIL:")
|
|
for e in errors:
|
|
print(" -", e)
|
|
sys.exit(1)
|
|
|
|
print("CHECK ok: 7 lanes, all STALE, counts ACTIVE=0/WATCH=0/STALE=7, MD present")
|