Skip to content

feat: improve backup correctness and safety, add tests and CI - #15

Merged
Wxh16144 merged 3 commits into
masterfrom
wuxh/improve
Oct 9, 2026
Merged

Wxh16144 merged 3 commits into
masterfrom
wuxh/improve

Conversation

@Wxh16144

@Wxh16144 Wxh16144 commented Oct 9, 2026

Copy link
Copy Markdown
Owner

Problems addressed

  • Directory backups kept symlinks, so a backup was not self-contained and could break when restored on another machine — files and directories now behave the same.
  • Failed backups still reported success, making failures easy to miss — failures are now reported honestly.
  • Running prune together with --app could treat other apps' backups as orphans and delete them, risking data loss — prune now always validates the entire backup directory.
  • In non-interactive environments (e.g. CI) it could hang on a confirmation prompt, or silently overwrite existing backups — conflicts are now skipped instead of overwritten.
  • Config paths had no boundary checks and could read/write outside the backup directory — this is now restricted.

Other

  • Added automated tests (there were none before) and enabled CI.
  • Requires Node.js 18+.
  • Docs: corrected a misleading path example and added a note on the project's scope.

## Problems addressed

- Directory backups kept symlinks, so a backup could not be restored standalone on another machine — files and directories now behave the same and backups are self-contained.
- Failed backups still reported success, making problems easy to miss — failures are now reported honestly.
- Running `prune` together with `--app` could delete other apps' backups, risking data loss — prune now always validates the entire backup directory.
- In non-interactive environments (e.g. CI) it could hang on a confirmation prompt, or silently overwrite existing backups — conflicts are now skipped without overwriting.
- Config paths lacked boundary checks and could read/write outside the backup directory — this is now restricted.

## Other

- Added automated tests (there were none before) and enabled CI.
- Fixed a misleading path example in the docs and added a note on the project's scope.
@Wxh16144
Wxh16144 merged commit 45c2da0 into master Oct 9, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant