#!/usr/bin/env python3
"""Verify illustrative ARR outputs for ARR-PREPAY-20260823."""
import csv, pathlib, sys
EXPECTED = ["380", "96000", "48000", "612000", "1152000", "5"]
def main() -> int:
    with pathlib.Path(__file__).with_name("arr-summary-ARR-PREPAY-20260823.csv").open(newline="", encoding="utf-8") as handle:
        rows = list(csv.DictReader(handle))
    values = [r["value"] for r in rows if r["status"] == "published"]
    held = [r for r in rows if r["status"].startswith("held_")]
    if values != EXPECTED or len(held) != 3 or any(r["value"] for r in held):
        print("FAIL: ARR outputs or held items are incorrect.", file=sys.stderr); return 1
    print("OK: six ARR outputs and three held items verified."); return 0
if __name__ == "__main__":
    raise SystemExit(main())
