"""Reconcile one or two retained major victories against frozen native saves. Supply only completed logs and public closed-victory attempt records. Reads no live game/logs or future battle decisions; writes only an optional new report. Glass122–124 must continue using reconcile_glass_items.py and its chain proof. """ import argparse from datetime import datetime import hashlib import json import math from pathlib import Path import re import subprocess from reconcile_glass_items import ROOT, reconcile, file_evidence, bind_native_chain IDENTITY_FIELDS=('id','session','attempt','interaction_start_epoch','battle_start_epoch','battle_end_epoch','victory_epoch','result') def attempt_identity(row): identity={key:row[key]for key in IDENTITY_FIELDS} if identity['result']!='victory':raise ValueError('Retained battle attempt must be a completed victory') if any(type(identity[key])is not int or identity[key]<1 for key in ['id','session','attempt']): raise ValueError('Major ID/session/attempt must be positive integers') times=[identity[key]for key in ['interaction_start_epoch','battle_start_epoch','victory_epoch','battle_end_epoch']] if not all(type(value)in[int,float] and math.isfinite(value)for value in times) or not times[0]<=times[1]identities[0]['interaction_start_epoch'] or post