feat: ADR-0006 §8 step 6 — .snapshots/ gitignore + export + cleanup

The undo ring is local working state, handled at all three
project-file seams (R13):
- .gitignore template ignores /.snapshots/
- export excludes .snapshots/ (like playground.db / history.log)
- safely_delete_temp_project allowlists .snapshots/ so a temp that
  was modified then undone back to empty stays auto-deletable
- undo::SNAPSHOTS_DIR is now a pub const referenced by all three
- tests: gitignore content, export exclusion, cleanup allowlist

1693 passed / 0 failed / 1 ignored; clippy clean.
This commit is contained in:
claude@clouddev1
2026-05-24 20:53:00 +00:00
parent 25800e3eb5
commit d6c5674bf5
5 changed files with 56 additions and 4 deletions
+5 -1
View File
@@ -49,7 +49,11 @@ use crate::project::{DATA_DIR, PLAYGROUND_DB, PROJECT_YAML};
pub const DEFAULT_RING_CAPACITY: usize = 50;
/// Directory under the project that holds the ring.
const SNAPSHOTS_DIR: &str = ".snapshots";
///
/// Public so the `.gitignore` template, the export exclusion, and
/// the temp-project cleanup allowlist all reference the one
/// canonical name (ADR-0006 Amendment 1).
pub const SNAPSHOTS_DIR: &str = ".snapshots";
/// In-flight snapshot directory (one at a time).
const STAGING_DIR: &str = ".staging";
/// The ring index file.