
"""Quick V5.8 release checks."""

from pathlib import Path

root = Path(__file__).resolve().parents[1]
required = [
    root / "static/css/sentinel-v58.css",
    root / "static/css/monitoring-v58.css",
    root / "templates/dashboard.html",
    root / "templates/monitoring_console.html",
    root / "sentinel/api/app.py",
]

missing = [str(path) for path in required if not path.exists()]
if missing:
    raise SystemExit("Missing files:\n" + "\n".join(missing))

dashboard = (root / "templates/dashboard.html").read_text()
if "sentinel-v58.css" not in dashboard:
    raise SystemExit("Dashboard V5.8 stylesheet is not linked.")

app = (root / "sentinel/api/app.py").read_text()
if '/api/system/version' not in app:
    raise SystemExit("V5.8 backend version endpoint is missing.")

print("Sentinel V5.8 files: OK")
