"""Export the hand-authored HackPairs from src/vgrout/pairs.py to a named JSON. These are 18 hand-crafted (hack, clean) pairs where both completions share the same solution body but differ only in whether run_tests() uses real assert vs fake/commented tests. They are the smallest, highest-precision pairset. Run: uv run python scripts/pairset_build_authored.py Output: out/pairsets/pairs_authored.json """ import json from dataclasses import asdict from pathlib import Path from vgrout.pairs import PAIRS out = Path("out/pairsets/pairs_authored.json") out.parent.mkdir(parents=True, exist_ok=True) out.write_text(json.dumps([asdict(p) for p in PAIRS])) print(f"wrote {len(PAIRS)} pairs -> {out}")