pytc.solver.test.test_isdf_gauge_reuse

Gauge-sync ordering gate for ISDF store reuse.

The fail-closed gauge guard in ISDFXTC.from_xtc refuses to consume a fresh mf whose gauge differs from the cache – so a reuse run MUST call sync_mf_from_cache BEFORE XTC.from_pyscf, not after. This test builds a real store, flips the fresh gauge, and proves: (1) without the sync, the guard fires (exactly the production failure); (2) with the sync placed before any mo_coeff consumer, the guard passes and the gauge is adopted from the cache.

Classes

GaugeReuseTest

sync_mf_from_cache must run BEFORE XTC.from_pyscf consumes the gauge.