Repository navigation
fix: rotate full backups and respect HOME for backup paths - #330
Merged
Merged
Conversation
edheltzel
force-pushed
the
fix/backup-rotation
branch
2 times, most recently
from
October 16, 2026 17:17
44afa9e to
56b6ab8
Compare
edheltzel
approved these changes
Oct 17, 2026
recall_create_backup writes manifest.txt even when it found no database to copy, so two DB-less installs or updates could rotate away the older recall.db snapshots. Count a backup only when it holds a non-empty recall.db or memory.db.
edheltzel
force-pushed
the
fix/backup-rotation
branch
from
October 17, 2026 11:24
56b6ab8 to
595a4db
Compare
edheltzel
pushed a commit
that referenced
this pull request
Oct 17, 2026
* fix(backup): keep the newest 2 full backups and follow HOME * no-mistakes(review): Preserve backup history during restores * no-mistakes(document): Clarify backup retention and consolidate restore documentation * fix(backup): rotate only backups that copied a database recall_create_backup writes manifest.txt even when it found no database to copy, so two DB-less installs or updates could rotate away the older recall.db snapshots. Count a backup only when it holds a non-empty recall.db or memory.db. * fix(backup): rotate backup names that contain spaces or newlines * no-mistakes(document): Clarify backup retention safeguards and HOME resolution * fix(backup): keep a spaced latest name when rotating --------- Co-authored-by: Atlas-Key <296298943+Atlas-Key@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Changed
latestwhile preserving other backup artifacts.HOME, falling back to the operating system’s home directory.Risk Assessment
✅ Low: The backup-retention and HOME-resolution changes are bounded, and no material defect or unnecessary component was substantiated across the full commit range.
Testing
After installing local dependencies, focused regressions and all 12 isolated live installer/CLI scenarios passed. CLI transcripts, SQL restore results, and filesystem/database readbacks were saved. Optional model-network probes were blocked, and all disposable worktree artifacts were removed.
Evidence: Live CLI transcripts and filesystem/database evidence
Evidence: Reproducible isolated validation driver
Pipeline
Updates from git push no-mistakes
⏭️ **intent** - skipped
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
✅ **Test** - passed
✅ No issues found.
bun install --frozen-lockfileto materialize temporary local dependencies.bun test tests/install/backup-rotation.test.ts tests/commands/doctor-mcp-env.test.tswith isolated HOME, TMPDIR, RECALL_HOME, and RECALL_DB_PATH.bun test tests/commands/migrate.test.ts -t 'CLI migrate writes pre-migrate under HOME'with isolated paths.bun test tests/commands/export.test.ts -t '^--backup'with isolated paths.python3 ~/.no-mistakes/evidence/01M54TTEHB4ASYXYVWXY6YW7Q6/live-driver.pydrove scenarios 1–11 through the real installer and source CLI.VALIDATION_CASES=12 python3 ~/.no-mistakes/evidence/01M54TTEHB4ASYXYVWXY6YW7Q6/live-driver.pyexercised mixed legacy/canonical rotation.Reimported generated SQL, queried retained SQLite records, compared migration and restore hashes, and drove interactive restores through a drained 40×160 PTY.Removed disposable homes, data, wrappers, and dependencies created by this phase; preserved evidence.✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.