#!/usr/bin/env python3
"""Verify illustrative help-desk outputs for HDS-READONLY-20260823."""
import csv
import pathlib
import sys

EXPECTED = ["5140", "11", "13", "returns-portal", "0"]

def main() -> int:
    path = pathlib.Path(__file__).with_name("sla-summary-HDS-READONLY-20260823.csv")
    with path.open(newline="", encoding="utf-8") as handle:
        rows = list(csv.DictReader(handle))
    values = [row["value"] for row in rows if row["status"] == "published"]
    held = [row for row in rows if row["status"].startswith("held_")]
    if values != EXPECTED or len(held) != 3 or any(row["value"] for row in held):
        print("FAIL: help-desk outputs or held items are incorrect.", file=sys.stderr)
        return 1
    print("OK: five help-desk outputs and three held items verified.")
    return 0

if __name__ == "__main__":
    raise SystemExit(main())
