Skip to content

Strengthen reviewer skill: add step-back analysis dimensions#13504

Merged
JanProvaznik merged 1 commit intodotnet:mainfrom
JanProvaznik:skills/reviewer-stepback
Apr 8, 2026
Merged

Strengthen reviewer skill: add step-back analysis dimensions#13504
JanProvaznik merged 1 commit intodotnet:mainfrom
JanProvaznik:skills/reviewer-stepback

Conversation

@JanProvaznik
Copy link
Copy Markdown
Member

Learnings from reviewing PR #13477 — the 24-dimension checklist missed design-level issues that required stepping back from the diff.

Changes

  • Dim 4 (Tests): Flag weak assertions that would pass with incorrect output
  • Dim 10 (Design): Check alignment with original design intent, flag workarounds when better APIs exist in existing dependencies, validate borrowed patterns
  • Dim 22 (Correctness): Generalize 2-participant fixes to N participants, flag symptom-only fixes
  • Workflow: Add historical context step (read linked issue + original feature PR) before dispatching dimension agents
  • Tasks instructions: Document \Microsoft.IO.Redist\ API availability for .NET Framework

Why

The review agents evaluated the diff mechanically but missed:

  1. The fix patches a TOCTOU symptom; a better API (\Microsoft.IO.File.Move(overwrite: true)) exists in an already-referenced package
  2. The fix handles 2 concurrent writers but fails with 3+
  3. Test assertions were too weak to verify correct behavior
  4. The approach was borrowed from the VS editor (which never has 'file doesn't exist' case) without validating assumptions

Add rules for historical context analysis, root-cause vs symptom fixes,
N-participant race generalization, assertion strength validation, and
API alternative awareness to the expert-reviewer agent.

- Dim 4 (Tests): flag weak assertions that pass with wrong output
- Dim 10 (Design): check design intent alignment, API alternatives,
  and borrowed-pattern assumptions
- Dim 22 (Correctness): generalize N=2 to N=3+ participants, flag
  symptom-only fixes
- Workflow: add historical context step before dimension dispatch
- Tasks instructions: document Microsoft.IO.Redist API availability

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@JanProvaznik JanProvaznik marked this pull request as ready for review April 8, 2026 11:29
@JanProvaznik JanProvaznik requested a review from a team as a code owner April 8, 2026 11:29
Copilot AI review requested due to automatic review settings April 8, 2026 11:29
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the repo’s review guidance to help reviewers “step back” from mechanical diff-checking and catch design-level issues (especially around concurrency, TOCTOU patterns, and weak test assertions), incorporating lessons from PR #13477.

Changes:

  • Strengthen the Tests dimension to flag weak assertions that could pass with incorrect behavior.
  • Expand Design and Correctness dimensions to emphasize design-intent alignment, avoiding workaround chains when better APIs exist, validating borrowed patterns, and generalizing race fixes beyond 2 participants.
  • Update workflow to include a historical context step (read linked issue + original feature PR) and document Microsoft.IO.Redist API availability for tasks targeting .NET Framework.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
.github/instructions/tasks.instructions.md Adds guidance to check Microsoft.IO.* backported APIs (via Microsoft.IO.Redist) before implementing workaround-based I/O patterns in tasks.
.github/agents/expert-reviewer.md Extends the reviewer checklist with “step-back” design/correctness checks and adds a historical-context workflow step.

Comment thread .github/agents/expert-reviewer.md
@JanProvaznik JanProvaznik requested a review from JanKrivanek April 8, 2026 11:46
@JanProvaznik JanProvaznik enabled auto-merge (squash) April 8, 2026 13:11
@JanProvaznik JanProvaznik merged commit 225d17f into dotnet:main Apr 8, 2026
14 checks passed
dfederm pushed a commit to dfederm/msbuild that referenced this pull request Apr 9, 2026
…13504)

Learnings from reviewing PR dotnet#13477 — the 24-dimension checklist missed
design-level issues that required stepping back from the diff.

### Changes
- **Dim 4 (Tests)**: Flag weak assertions that would pass with incorrect
output
- **Dim 10 (Design)**: Check alignment with original design intent, flag
workarounds when better APIs exist in existing dependencies, validate
borrowed patterns
- **Dim 22 (Correctness)**: Generalize 2-participant fixes to N
participants, flag symptom-only fixes
- **Workflow**: Add historical context step (read linked issue +
original feature PR) before dispatching dimension agents
- **Tasks instructions**: Document \Microsoft.IO.Redist\ API
availability for .NET Framework

### Why
The review agents evaluated the diff mechanically but missed:
1. The fix patches a TOCTOU symptom; a better API
(\Microsoft.IO.File.Move(overwrite: true)\) exists in an
already-referenced package
2. The fix handles 2 concurrent writers but fails with 3+
3. Test assertions were too weak to verify correct behavior
4. The approach was borrowed from the VS editor (which never has 'file
doesn't exist' case) without validating assumptions

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

4 participants