Add .github/copilot-review-instructions.md to reduce noisy automated PR comments#683
Add .github/copilot-review-instructions.md to reduce noisy automated PR comments#683YunchuWang wants to merge 1 commit intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a repository-level Copilot code review instruction file to constrain automated PR review feedback to the diff and reduce recurring false-positive / low-signal comments in this codebase.
Changes:
- Introduces
.github/copilot-review-instructions.mdwith scope, language-accuracy, and comment-quality guidance for Copilot PR reviews. - Documents repo-specific review heuristics around virtual-method default implementations, nullability checks, and test-related feedback.
- References
.github/copilot-instructions.mdfor consolidated, non-duplicated baseline rules.
|
|
||
| ## Test Code | ||
|
|
||
| - Test helper classes and mock implementations in `test/` directories are internal to the test project. Apply the same `sealed` requirement from `copilot-instructions.md` only to new classes introduced in the PR. |
There was a problem hiding this comment.
The “sealed” guidance in the Test Code section is narrower than the earlier guidance (which allows commenting when visibility/inheritance changes). To avoid inconsistent bot behavior, consider aligning this bullet with the earlier rule (e.g., allow comments when a test helper class is newly introduced or its inheritance/visibility was changed in the PR).
| - Test helper classes and mock implementations in `test/` directories are internal to the test project. Apply the same `sealed` requirement from `copilot-instructions.md` only to new classes introduced in the PR. | |
| - Test helper classes and mock implementations in `test/` directories are internal to the test project. Apply the same `sealed` requirement from `copilot-instructions.md` only when such a class is newly introduced in the PR or its visibility/inheritance was changed in the PR. |
|
|
||
| ## Language Accuracy | ||
|
|
||
| - **Verify C# syntax claims before posting.** This repository uses `<LangVersion>latest</LangVersion>` on .NET 10 (currently C# 14). Do not flag valid modern C# syntax as errors. In particular: |
There was a problem hiding this comment.
The statement tying <LangVersion>latest</LangVersion> specifically to “.NET 10 (currently C# 14)” is likely to go stale and is slightly inaccurate for this repo: LangVersion is set globally (Directory.Build.props), and the exact C# version implied by latest changes over time. Consider rephrasing to reference the repo setting without naming a specific C# version (or link to Directory.Build.props).
| - **Verify C# syntax claims before posting.** This repository uses `<LangVersion>latest</LangVersion>` on .NET 10 (currently C# 14). Do not flag valid modern C# syntax as errors. In particular: | |
| - **Verify C# syntax claims before posting.** This repository configures `<LangVersion>latest</LangVersion>` centrally (see `Directory.Build.props`). Do not flag valid modern C# syntax as errors. In particular: |
Summary
Adds a .github/copilot-review-instructions.md\ file to guide the GitHub Copilot PR review bot, reducing false-positive and low-signal automated comments.
Motivation
In recent PRs (e.g., #682), the Copilot review bot generated several noisy comments:
What this file does
Per GitHub docs, .github/copilot-review-instructions.md\ provides custom instructions that the Copilot code review bot reads when reviewing PRs. This is separate from .github/copilot-instructions.md\ (which controls Chat/Completion).
Key rules added
Review quality
This file was reviewed by the code-review-agent and scored 94/100 with 0 blockers, 0 high, 0 medium issues. Only 2 nit-level observations remain (sealed scope consistency in test section, C# version parenthetical staleness).