Skip to main content

Module retention

Module retention 

Source
Expand description

Retention and garbage-collection for the unified session store.

Structs§

RetentionPolicy
Retention policy applied to the set of per-session stores.

Constants§

RETENTION_PIN_FILE
Sidecar marker written when a session must outlive ordinary retention because an unresolved blocker archive references it.

Functions§

apply_retention
Apply the retention policy, removing the oldest / stale sessions.
apply_retention_preserving
Apply retention while preserving one session directory, even when its existing manifest still says completed (for example, a resumed session).
gc_legacy
Remove the legacy history/ and logs/ directories after they have been imported into the unified store by crate::migrate_legacy.
pin_session_retention
Write a retention pin for a session (best-effort path check by caller).
session_retention_pinned
Whether a session directory is pinned against ordinary retention eviction.
unpin_session_retention
Remove a retention pin if present.