"""Fail if the route labelling prompt differs from Maven's deployed prompt."""
import argparse
import re
from pathlib import Path

from gen_route_data import ROUTE_SYSTEM


def main() -> None:
    ap = argparse.ArgumentParser()
    ap.add_argument("--maven", default="/mnt/server/home/kami/apps/Maven")
    args = ap.parse_args()
    go = Path(args.maven, "internal/router/llmrouter.go").read_text(encoding="utf-8")
    match = re.search(r"const routeSystem = `([\s\S]*?)`\n", go)
    if not match:
        raise SystemExit("routeSystem not found in Go source")
    if match.group(1) != ROUTE_SYSTEM:
        raise SystemExit("route prompt drift: update Go and gen_route_data.py together")
    print("route prompt parity OK")


if __name__ == "__main__":
    main()
