#!/usr/bin/env python3 """Verify 2026-10-25-git-history.json against live git for date extremes.""" import json import subprocess REPO = "/root/troupe-standup" def git(*args): return subprocess.run( ["git", "-C", REPO, *args], check=True, capture_output=True, text=True ).stdout def main(): newest_git = git("log", "-1", "--format=%aI", "HEAD").strip() oldest_commit = git("rev-list", "--max-parents=0", "HEAD").strip() oldest_git = git("log", "-1", "--format=%aI", oldest_commit).strip() with open("/root/troupe-standup/wizard-work/ledger/2026-10-25-git-history.json") as f: payload = json.load(f) rows = payload["rows"] dates = sorted(r["date"] for r in rows) # commits with date >= 2026-10-25T08:00:00 recent = [r for r in rows if r["date"] >= "2026-10-25T08:00:00"] print("newest_git :", newest_git) print("script_latest :", payload["latest"]) print("oldest_git :", oldest_git) print("script_earliest:", payload["earliest"]) print("rows :", len(rows)) print("recent(>=08:00):", [(r["hash"][:7], r["date"]) for r in recent]) if __name__ == "__main__": main()