feat: Improve summary handling and error reporting in repository checks
Enhance the check_repository and check_cache_files functions to return a Summary, improve concurrency handling, and strengthen error logging for better reporting. Refactor summary handling in related functions for consistency.
Based on #365
Codecov Report
Attention: Patch coverage is 33.05785% with 81 lines in your changes missing coverage. Please review.
Project coverage is 42.0%. Comparing base (
4b3d073) to head (a2aee81). Report is 2 commits behind head on feat/summary.
Additional details and impacted files
| Files with missing lines | Coverage Δ | |
|---|---|---|
| crates/core/tests/integration.rs | 84.0% <ø> (+4.0%) |
:arrow_up: |
| crates/core/src/repository.rs | 42.4% <66.6%> (+0.1%) |
:arrow_up: |
| crates/core/src/archiver.rs | 58.9% <75.0%> (-0.8%) |
:arrow_down: |
| crates/core/src/commands/merge.rs | 0.0% <0.0%> (ø) |
|
| crates/core/src/commands/check.rs | 57.4% <30.4%> (-4.8%) |
:arrow_down: |
- Flaky Tests Detection - Detect and resolve failed and flaky tests
I'm still debating with myself, if passing in a summary: Arc<Mutex<Summary>> into the check functions would be better, instead of returning the Summary and initializing it at the beginning of the functions, calling complete at the end. For now, we have clearer contexts and timings due to that. But we could also add that functionality based on passing in a summary. We could impl start/stop on Summary, for timing purposes.
I do think it's a bit cleaner separation, to return a Summary and then merge it with the Summary up in the call stack.