fix(repo): progressive logging for parallel operations#57
Merged
rios0rios0 merged 3 commits intomainfrom Apr 2, 2026
Merged
Conversation
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves UX for parallel repo operations by emitting per-repo result logs as each goroutine completes, instead of buffering logs until after wg.Wait().
Changes:
- Moved per-repo “result” log lines into the worker goroutines for sync/restore/prune/mirror/fork-sync/failover.
- Simplified the post-
wg.Wait()loops to only compute summary counters (summary log still emitted at the end).
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| internal/repo/sync.go | Logs each sync result as the repo finishes; end loop now only computes summary counts. |
| internal/repo/restore.go | Streams restore results progressively from goroutines; keeps final aggregate summary. |
| internal/repo/prune.go | Streams prune results progressively (only for deletions/failures); summary loop left for counters. |
| internal/repo/mirror.go | Streams mirror outcomes progressively during parallel mirroring; preserves final counts. |
| internal/repo/fork_sync.go | Streams fork-sync results from parallelForkSync goroutines; summary function now only aggregates. |
| internal/repo/failover.go | Streams failover results progressively; keeps final aggregate summary. |
…dback - moved per-repo log calls from post-`wg.Wait()` loops into goroutines so results appear as each repo completes, instead of all at once at the end - applied to all 6 batch-logging operations: sync, prune, fork-sync, failover, mirror, and restore - post-Wait loops now only compute summary counters - logrus mutex ensures thread-safe concurrent writes Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
83c085c to
d8c1b79
Compare
…ure detection Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.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.



Summary
wg.Wait()loops into goroutines so results stream to the terminal as each repo completesTest plan
make buildcompiles successfullygo test ./...)dev repo sync ~/Development/github.com/rios0rios0and verify logs stream progressively🤖 Generated with Claude Code