mirror of
https://relay.ngit.dev/npub15qydau2hjma6ngxkl2cyar74wzyjshvl65za5k5rl69264ar2exs5cyejr/ngit-grasp.git
synced 2026-10-06 07:28:23 +00:00
Purgatory and rejected-event snapshots were consumed on successful startup and only rewritten during graceful shutdown. A crash or power loss after restore therefore discarded all durable recovery history, allowing unresolved work and rejection backoff to restart from an empty state. Retain restored checkpoints, replace them atomically every 60 seconds, and write a final snapshot only after background mutation tasks have stopped. Snapshot replacement syncs a complete temporary file, renames it, and syncs the parent directory so interruption leaves either the old or new complete state. The checkpoint interval bounds mutation loss without adding synchronous disk I/O to event handling. Addressable purgatory restoration is idempotent and timestamp adjustment continues to preserve remaining lifetimes. Database durability, git repository state, and general LMDB backup policy are deliberately excluded. Validation: cargo test --lib passed all 668 tests before commit. Purgatory and rejected-index tests verify the checkpoint survives restore and can initialize a second fresh instance; the atomic writer test verifies complete replacement. Nix validation follows after rebasing onto the passive-ownership proposal.
15 lines
245 B
Rust
15 lines
245 B
Rust
mod atomic_file;
|
|
pub mod audit_cleanup;
|
|
pub mod cleanup_empty_repos;
|
|
pub mod config;
|
|
pub mod git;
|
|
pub mod grasp06;
|
|
pub mod http;
|
|
pub mod logging;
|
|
pub mod metrics;
|
|
pub mod nostr;
|
|
pub mod outbound;
|
|
pub mod purgatory;
|
|
pub mod server;
|
|
pub mod sync;
|