test(cardano): reproduce import EWRAP-finalize-window resume gap (#1018)
Extends the boundary-resume harness while evaluating import crash/resume safety across the full RUPD -> EWRAP -> ESTART boundary. Findings: - RUPD re-run is idempotent (PendingRewardState writes are overwrite-by-key, recompute is deterministic, finalize overwrites). - ESTART shard crash + resume is safe (shard-skip via estart_progress + atomic, guarded finalize) — Scenario A still passes, now also asserting pots. - EWRAP has a finalize-window gap: the last shard sets ewrap_progress.committed == total (EWrapProgress::apply), but EpochWrapUpV3 (which assembles the final EndStats and rotates rolling/pparams) commits separately and does NOT touch ewrap_progress. On restart, EwrapWorkUnit::initialize reads committed == total -> is_complete() -> skips BOTH shards and finalize. A crash in [last EWRAP shard committed, before EpochWrapUpV3 commits] therefore permanently skips EpochWrapUpV3 on resume, so ESTART reset consumes a non-finalized `end` (default epoch_incentives) and un-rotated rolling stats: reserves stay too high, treasury too low. Adds: - pots (reserves, treasury, utxos, rewards, fees) to the state fingerprint so monetary-accounting corruption is caught, not just per-entity epoch drift. - import_crash_ewrap_finalize_window_resumes_to_identical_state (#[ignore], reproduces the gap): crashes the 2nd EWRAP after all shards, before finalize, then resumes; pots diverge from a clean run by exactly the skipped epoch-1 incentives (~8.99e12 reserves/treasury). Un-ignore once the EWRAP finalize marker is fixed. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>