Add Copilot code review for v2 shim PRs#2635
Open
shreyanshjain7174 wants to merge 1 commit intomicrosoft:mainfrom
Open
Add Copilot code review for v2 shim PRs#2635shreyanshjain7174 wants to merge 1 commit intomicrosoft:mainfrom
shreyanshjain7174 wants to merge 1 commit intomicrosoft:mainfrom
Conversation
Add automated GitHub Copilot review that triggers only when v2 shim code paths are modified. Copilot is guidance-only; CI remains the gate. - copilot-instructions.md: global review tone and format rules - v2-shim.instructions.md: Go best practices + hcsshim-specific rules (resource lifecycle, handle leaks, concurrency, package layering) - copilot-review.yml: workflow to auto-request Copilot review on PRs touching shim binaries, internal/hcs*, uvm, controller, vm packages Signed-off-by: Shreyansh Sancheti <shreyanshjain7174@gmail.com> Signed-off-by: Shreyansh Sancheti <shsancheti@microsoft.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.
Add Copilot Code Review for V2 Shim PRs
Adds automated GitHub Copilot code review that triggers only on PRs touching v2 shim code paths.
What
Three files:
.github/copilot-instructions.md[BLOCKER]/[ISSUE]/[SUGGESTION]/[QUESTION]), no speculation.github/instructions/v2-shim.instructions.md.github/workflows/copilot-review.ymlWhy
V2 shim code has specific patterns that are easy to get wrong:
ResourceCloserregistration,Close()ordering, deferred cleanup)hcs.Systemis not goroutine-safe, UVM device maps are mutex-protected)Having Copilot flag these before human review saves reviewer time.
Design
internal/hcs*,internal/uvm,internal/controller,internal/vm, etc. are touched.Admin steps required after merge
copilot-reviewlabel (or remove label step from workflow)