#!/usr/bin/env python3 # Author: Simon-Pierre Boucher — simon-pierre.boucher@uqo.ca """Write (or --check) results/freeze.json: the protocol freeze (prompt, config, code and model-id hashes).""" from __future__ import annotations import argparse import sys from pathlib import Path sys.path.insert(0, str(Path(__file__).resolve().parents[1] / "src")) from agentic_valuation.experiments.freeze import check_freeze, write_freeze # noqa: E402 def main(argv: list[str] | None = None) -> int: ap = argparse.ArgumentParser(description=__doc__) ap.add_argument("--check", action="store_true") a = ap.parse_args(argv) if a.check: diffs = check_freeze() print("freeze OK" if not diffs else "PROTOCOL DEVIATION:\n " + "\n ".join(diffs)) return 1 if diffs else 0 print("freeze written:", write_freeze()) return 0 if __name__ == "__main__": sys.exit(main())