pub struct CleanupPlan {
pub action: CleanupAction,
pub affected_classes: Vec<DataClass>,
pub estimated_recovered_bytes: u64,
pub requires_rebuild: bool,
pub requires_confirmation: bool,
pub model_id: Option<ModelId>,
}Expand description
A cleanup plan: produced first, executed second (RFC-001 §14).
Fields§
§action: CleanupAction§affected_classes: Vec<DataClass>§estimated_recovered_bytes: u64§requires_rebuild: bool§requires_confirmation: bool§model_id: Option<ModelId>Task 099: the embedding model DeleteVectorIndex rebuilds against
– the file(s) it deletes get re-embedded only once a model is
known, so the executor needs one to mark the rebuild. None for
every other action, and None here too when no model is currently
configured (the executor still deletes the index; it just cannot
queue anything to rebuild it against).
Implementations§
Source§impl CleanupPlan
impl CleanupPlan
Sourcepub fn for_action(action: CleanupAction, estimated_recovered_bytes: u64) -> Self
pub fn for_action(action: CleanupAction, estimated_recovered_bytes: u64) -> Self
Build the plan for an action with an estimated byte impact.
Sourcepub fn with_model(self, model_id: ModelId) -> Self
pub fn with_model(self, model_id: ModelId) -> Self
Task 099: attach the embedding model a DeleteVectorIndex plan
rebuilds against. A no-op field on every other action’s plan.
Sourcepub fn assert_safe_for_ordinary_cleanup(&self) -> Result<(), OrbokError>
pub fn assert_safe_for_ordinary_cleanup(&self) -> Result<(), OrbokError>
Safe cleanup must never include the persistent catalog. Executors call this before running anything that has not been explicitly confirmed as a destructive reset.