Skip to content

check: summarize findings and repairs#9891

Open
charmikadi wants to merge 4 commits into
borgbackup:masterfrom
charmikadi:fix/check-repair-summary
Open

check: summarize findings and repairs#9891
charmikadi wants to merge 4 commits into
borgbackup:masterfrom
charmikadi:fix/check-repair-summary

Conversation

@charmikadi

@charmikadi charmikadi commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Description

borg check already reports individual problems as it finds them, but it was hard to tell at a glance how many issues there were overall, or how many --repair actually fixed.
This adds a short summary at the end of the check:

  • for archive consistency checks, count problems found and repairs done
  • for repository checks, include the error count in the finish message (repo repair still isn't implemented)
    Also updated a few repair tests to cover the new summary lines.

Fixes #2397

Checklist

  • PR is against master (or maintenance branch if only applicable there)
  • New code has tests and docs where appropriate
  • Tests pass (run tox or the relevant test subset)
  • Commit messages are clean and reference related issues

@codecov

codecov Bot commented Jul 9, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 71.42857% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.22%. Comparing base (6854dca) to head (14337fe).
⚠️ Report is 4 commits behind head on master.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/borg/archive.py 69.69% 10 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9891      +/-   ##
==========================================
- Coverage   85.24%   85.22%   -0.03%     
==========================================
  Files          93       93              
  Lines       15570    15595      +25     
  Branches     2357     2365       +8     
==========================================
+ Hits        13273    13291      +18     
- Misses       1598     1604       +6     
- Partials      699      700       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@ThomasWaldmann

Copy link
Copy Markdown
Member

@charmikadi Thanks for helping with this!

Just be aware that @mr-raj12 is currently working on packs and that might need bigger changes in borg check also.

@charmikadi
charmikadi marked this pull request as ready for review July 10, 2026 13:25
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.

check: summarize findings, --repair: summarize repairs

2 participants