Skip to main content

Mountain/ApplicationState/Internal/Recovery/
RecoverState.rs

1#![allow(non_snake_case)]
2
3//! # RecoverState - Internal Recovery Utilities
4//!
5//! Three composable primitives the recovery flow uses to clean up
6//! corrupted state without taking the runtime down:
7//!
8//! Layout (one export per file, file name = identity):
9//! - `ValidateAndCleanState::Fn` - predicate-driven map filter with
10//!   warn-on-removal logging.
11//! - `SafeStateOperationWithTimeout::Fn` - off-thread blocking op with a hard
12//!   timeout (the worker is allowed to finish in the background; only the
13//!   receiver gives up).
14//! - `RecoverStateWithBackoff::Fn` - async retry with exponential backoff (100
15//!   ms, doubled per failure).
16//!
17//! TODO: zero callers as of 2026-05-02. Wire into the
18//! `ApplicationState/Internal/Recovery` flow once the recovery
19//! triggers are formalised.
20
21pub mod RecoverStateWithBackoff;
22pub mod SafeStateOperationWithTimeout;
23pub mod ValidateAndCleanState;