mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-10-19 10:22:17 +00:00
bd62b6d8ad
Extend ProtectionRollup with a tri-state VerifyIntent (verified / stale / unknown) plus LastVerifiedAt, derived at read-time from the existing recovery_points.verified column. Stale means: a successful backup exists but no verification-bearing point has landed within BackupVerifyStaleWindow (7d, package-level constant for the MVP). Both fields are omitempty so existing rollup snapshot consumers see no shape change until they opt into the verify loop. The SQL ListRollups path projects verified into the filtered CTE and folds MAX(CASE WHEN verified=1 THEN ts_ms END) into the per-subject aggregate. The in-memory BuildRollupsFromPoints mirrors the same logic via the new ComputeVerifyIntentAt helper so mock mode and the persisted store agree.