pub fn mark_abandoned_active_sessions(
workspace: &Path,
max_age_days: u64,
preserve_session_id: Option<&str>,
) -> Result<usize, SessionStoreError>Expand description
Flip active manifests that have been idle past max_age_days to
completed so ordinary retention can evict them.
A crashed or killed thread never emits thread.completed, so its manifest
stays active forever and would otherwise pin the store. Live sessions are
younger than the cutoff and are left untouched. max_age_days == 0 disables
the sweep (the hard “never evict active” contract used by force-evict tests).
Returns how many manifests were marked abandoned.