#!/usr/bin/env python3 """Validate Headroom PR template compliance for GitHub Actions.""" from __future__ import annotations import argparse import json import os import re import sys from dataclasses import asdict, dataclass, field from pathlib import Path from typing import Any COMMENT_MARKER = "" READY_LABEL = "status: ready for review" AUTHOR_ACTION_LABEL = "status: needs author action" REQUIRED_SECTIONS = ( "Description", "Type of Change", "Changes Made", "Testing", "Real Behavior Proof", "Review Readiness", ) PROOF_FIELDS = ( "Environment", "Exact command / steps", "Observed result", "Not tested", ) SECTION_RE = re.compile(r"^##\s+(.+?)\s*$", re.MULTILINE) CHECKBOX_RE = re.compile(r"^- \[(?P[ xX])\] (?P