pub fn fix_session_memento(
db_path: &Path,
valid_session_ids: &HashSet<String>,
preferred_session_id: Option<&str>,
) -> Result<bool>Expand description
Fix the memento so it points to a session that actually exists.
If the current memento references a deleted/non-existent session, update it
to the most recently active valid session. Returns true if the memento was
changed.