Skip to content

feat: add ruborg validate repo --repair for passphrase-injected borg check --repair#18

Open
mpantel wants to merge 1 commit into
mainfrom
feature/validate-repo-repair
Open

feat: add ruborg validate repo --repair for passphrase-injected borg check --repair#18
mpantel wants to merge 1 commit into
mainfrom
feature/validate-repo-repair

Conversation

@mpantel

@mpantel mpantel commented May 15, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds Repository#repair that runs borg check --repair with YES\n piped to stdin via Open3.capture3, capturing output for logging.
  • Adds --repair and --yes options to ruborg validate repo; --repair without --yes raises a ConfigError to prevent accidental data loss.
  • Repair output (affected segments/archives) is printed to stdout and written to the ruborg log file.
  • Rubocop: no new offenses introduced.

Closes #17

Test plan

  • bundle exec rspec spec/ruborg/repository_spec.rb -e "repair" — 4 examples pending (Borg not installed in CI), 0 failures.
  • bundle exec rspec spec/ruborg/cli_spec.rb -e "validate repo --repair" — 3 examples pending, 0 failures.
  • bundle exec rubocop lib/ruborg/cli.rb lib/ruborg/repository.rb — same offense count as baseline (all pre-existing).
  • Manual: ruborg validate repo -r myrepo --repair → raises error asking for --yes.
  • Manual: ruborg validate repo -r myrepo --repair --yes → fetches passphrase from Passbolt, runs borg check --repair, logs output.

🤖 Generated with Claude Code

…g check --repair

Closes #17

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@mpantel

mpantel commented May 15, 2026

Copy link
Copy Markdown
Owner Author
  • Update read me, change log and docs
  • Create and publish new version

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.

feat: add ruborg validate repo --repair for passphrase-injected borg check --repair

1 participant