F-008: fix(services): log JoinSet task panics in git file fetch#14
Open
Sephyi wants to merge 1 commit intodevelopmentfrom
Open
F-008: fix(services): log JoinSet task panics in git file fetch#14Sephyi wants to merge 1 commit intodevelopmentfrom
Sephyi wants to merge 1 commit intodevelopmentfrom
Conversation
The JoinSet loop in `fetch_file_contents` previously used `if let Ok(..)` to unpack the join result, silently discarding the `Err(JoinError)` variant emitted when a spawned git-show task panics or is cancelled. Panics under the async runtime were therefore invisible to operators even in `--verbose` / `COMMITBEE_LOG=debug` runs, making root-cause analysis of missing diff context nearly impossible. Switch to a full `match` arm and emit `tracing::warn!` with the JoinError context when a task fails to join. The returned HashMap shape is unchanged — panicked tasks are still omitted from the maps, matching the previous fallback behaviour — so no caller logic has to change. Closes audit entry F-008 from #3.
There was a problem hiding this comment.
Pull request overview
Fixes audit finding F-008 by ensuring tokio::task::JoinSet join failures (panic/cancellation) during concurrent git show fetches are no longer silently ignored.
Changes:
- Add
tracing::warnlogging when aJoinSettask fails to join inGitService::fetch_file_contents.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
fix(services): log JoinSet task panics in git file fetch.
Audit context
Closes audit entry F-008 from #3.
Verification
cargo fmt --checkcargo clippy --all-targets --all-features -- -D warningscargo test --all-targets