"""Show api_hooks.py violations."""
import json
with open(r"docs/reports/PHASE12_AUDIT_POST_FIX_20260617.json") as f:
    d = json.load(f)
for f_info in d["files"]:
    if f_info["filename"].endswith("api_hooks.py"):
        print(f"## api_hooks.py — {len(f_info['findings'])} findings")
        for finding in f_info["findings"]:
            if finding["category"] in ("INTERNAL_SILENT_SWALLOW", "INTERNAL_BROAD_CATCH", "INTERNAL_OPTIONAL_RETURN", "UNCLEAR", "INTERNAL_RETHROW"):
                note = finding.get("note", finding.get("hint", ""))[:120]
                ctx = finding.get("context", "")
                print(f"  L{finding['line']:4d} [{finding['kind']:7s}] {finding['category']:30s} ctx={ctx:30s} note={note}")
        break