Skip to content

Fix false and over-broad checks in the expert-reviewer agent - #14533

Merged
JanProvaznik merged 1 commit into
dotnet:mainfrom
JanProvaznik:copilot/fix-reviewer-false-checks
Jul 27, 2026
Merged

JanProvaznik merged 1 commit into
dotnet:mainfrom
JanProvaznik:copilot/fix-reviewer-false-checks

Conversation

@JanProvaznik

@JanProvaznik JanProvaznik commented Jul 27, 2026 •

Copy link
Copy Markdown
Member

Rules that don't match this repo, so the reviewer flags correct code. Each fix is a one-liner.

# Was Now Why
6 Low = detailed, Diagnostic = debug Low = detailed The enum only has High, Normal, Low — src/Framework/BuildMessageEventArgs.cs:22,27,32. logging.instructions.md:25 (auto-applied to src/Build/Logging/**) already states it correctly, so the reviewer was contradicting an always-loaded file.
3 - [ ] LINQ - [ ] LINQ on a hot path 181 non-test files use System.Linq; the bare check fires on nearly every PR.
1 can be percieved by customers as breaking ...(name the specific scenario) Unbounded, misspelled, and BLOCKING — which forces REQUEST_CHANGES (line 685) as the default verdict.
— "Build the PR branch locally. Run existing tests." "if the PR head is checked out, build it... Otherwise validate via GitHub MCP" review-on-open.agent.md:38-40 checks out only the trusted base repo at base.sha and never executes PR code. The instruction was impossible where the reviewer actually runs.
19/23 Same eng/Versions.props-without-Darc check in both Kept only in 23 Duplicate comments on the same line.

Plus one addition to Wave 3: deduplicate findings before posting. Dimensions overlap and each runs as an independent sub-agent, so one defect can produce several comments against a 30-comment budget (review-shared.md:23).

10 insertions / 10 deletions, one file. No dimension removed, no severity lowered. The PublicAPI.Unshipped.txt rule in dimension 8 is untouched.

No .lock.yml regeneration needed — expert-reviewer.agent.md is read from the checked-out repo at run time.

Copilot AI review requested due to automatic review settings July 27, 2026 10:20
@JanProvaznik
JanProvaznik requested a review from a team as a code owner July 27, 2026 10:20
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Skill Validator Results

✅ All checks passed

Scope Checked
Skills 0
Agents 1
Total 1
Severity Count
--- ---:
❌ Errors 0
⚠️ Warnings 0
ℹ️ Advisories 0

Summary

Level Finding
ℹ️ Found 1 agent(s)
ℹ️ Validated 1 agent(s)
ℹ️ ✅ All checks passed (1 agent(s))
Full validator output ```text Found 1 agent(s) Validated 1 agent(s) ✅ All checks passed (1 agent(s)) ```

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the .github/agents/expert-reviewer.agent.md guidance to eliminate rules that were demonstrably incorrect for this repo (or too over-broad), and to reduce duplicate inline comments produced by overlapping dimensions.

Changes:

  • Tightened two checklists to avoid false positives: “breaking change” now requires a specific scenario, and “LINQ” findings are limited to hot paths.
  • Corrected logging guidance to match the actual MessageImportance enum (no Diagnostic member) and clarified the distinction between importance vs logger verbosity.
  • Removed duplicated dependency/version-pinning guidance from Build Infrastructure and added a “deduplicate before posting” step to preserve the 30-comment budget.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expert Review — .github/agents/expert-reviewer.agent.md

24-Dimension Scan

# Dimension Verdict
1 Backwards Compatibility ✅ LGTM
10 Design ✅ LGTM
12 Code Simplification ✅ LGTM
14 Naming Precision ✅ LGTM
18 Documentation Accuracy ✅ LGTM
20 Scope & PR Discipline ✅ LGTM
22 Correctness ✅ LGTM

Details:

  • Backwards Compat: Narrowing LINQ flags to hot paths reduces false positives without missing real issues.
  • Documentation Accuracy: Verified MessageImportance enum in src/Framework/BuildMessageEventArgs.cs — exactly 3 members (High, Normal, Low). No Diagnostic member. Claim is correct.
  • Correctness: Darc rule relocated to Dependency Management (not deleted); dedup guidance references correct dimension overlaps; typo fix (percieved→perceived) correct.
  • Design: Dedup step, hot-path scoping, and build/test trust-boundary clarification are well-reasoned.

Dimensions 2–9, 11, 13, 15–17, 19, 21, 23–24: N/A for documentation. All clean.

Result: 0 actionable findings across 24 dimensions.

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • awmgmcpg

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "awmgmcpg"

See Network Configuration for more information.

Generated by Expert Code Review (on open) for #14533 · sonnet46 · 77 AIC · ⌖ 7.56 AIC · ⊞ 4.9K

Rules that don't match this repo, so the reviewer flags correct code:

- Dimension 6 listed a `Diagnostic` MessageImportance. The enum only has
  High, Normal, Low (src/Framework/BuildMessageEventArgs.cs).
- Dimension 3's check was the bare word "LINQ". 181 non-test files use
  System.Linq, so it fires on nearly every PR. Scoped to hot paths.
- Dimension 1's first check was unbounded (and misspelled). It is
  BLOCKING, which makes REQUEST_CHANGES the default verdict.
- Wave 2 said to build the PR branch locally. review-on-open.agent.md
  checks out only the base repo and never runs PR code, so this was
  impossible where the reviewer actually runs.
- Dimensions 19 and 23 had the same eng/Versions.props check; removed
  the copy in 19.

Also deduplicate findings before posting: dimensions overlap, so one
defect could produce several comments against a 30-comment budget.

Co-authored-by: Copilot <[email protected]>
Copilot-Session: d205cff8-23b3-4dd7-9b51-416173f342b0
@JanProvaznik
JanProvaznik force-pushed the copilot/fix-reviewer-false-checks branch from 0fb103a to 20396b5 Compare July 27, 2026 10:33
@JanProvaznik
JanProvaznik merged commit 4f9cab6 into dotnet:main Jul 27, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants