Skip to content

Require red/green proof before claiming a bug fix is verified - #68457

Merged
PureWeen merged 2 commits into
dotnet:mainfrom
PureWeen:pureween-bug-fix-verification-guidance
Aug 14, 2026
Merged

PureWeen merged 2 commits into
dotnet:mainfrom
PureWeen:pureween-bug-fix-verification-guidance

Conversation

@PureWeen

Copy link
Copy Markdown
Member

Adds two bullets to the ## Running tests section of .github/copilot-instructions.md.

Problem

The repo-wide pre-prompt currently says nothing about what counts as proof that a bug is actually fixed. The common failure mode is an agent that reads the source, reasons that the change looks correct, adds a test that passes on the first run, and then reports the fix as "verified." A test that was never observed failing proves nothing about the bug — it may assert on the wrong thing, exercise a path that never regressed, or pass identically before and after the change. That produces confident but unfounded verification claims in PRs, which reviewers then have to catch by hand.

Change

* Before claiming a bug fix is verified, confirm that the relevant test or check fails for the expected reason without the fix and passes with it. Reading the source or seeing a test pass on its own is not proof that the bug is fixed.
* If that red/green verification isn't practical, say so explicitly and state what you did verify rather than describing the fix as verified.

Notes on the wording:

  • "test or check" rather than "assertion" so it covers this repo's E2E, Playwright, and browser-based verification, not just unit tests.
  • "fails for the expected reason" closes the loophole where a pre-fix run fails for an unrelated reason (a compile error, an unrelated failure) and gets counted as red.
  • The second bullet is deliberately an escape hatch, not a blocker. Red/green isn't always achievable — crashes and hangs, build-infra fixes, timing-dependent bugs, or fixes whose removal prevents compilation. Requiring the agent to state what it did verify keeps the exception honest rather than silent, and mirrors the existing allowance in CONTRIBUTING.md that "if there is a scenario that is far too hard to test there does not need to be a test for it."

Why here

Follows the convention established by #62046 and #62129, both of which made small, targeted additions to this file in reaction to observed agent behavior. Placed in ## Running tests because the rule is about executing tests and the standard of evidence drawn from them, rather than test-authoring style (### Testing, which is nested under ## Formatting and holds only conventions like xUnit/Moq/naming).

This is not duplicative of src/Components/AGENTS.md. That guidance applies only to src/Components/** and asks for interactive browser reproduction in a sample app before starting a fix; this is repo-wide and concerns the evidence required before claiming the fix works.

Markdown-only change.

Adds two bullets to the "Running tests" section of the repo-wide Copilot
pre-prompt so an agent cannot describe a bug fix as verified without
actually observing the failure it claims to have fixed.

Follows the convention established by dotnet#62046 and dotnet#62129 of making small,
targeted additions in reaction to observed agent behavior.

Co-authored-by: Copilot App <[email protected]>
@PureWeen
PureWeen requested a review from wtgodbe as a code owner August 12, 2026 16:18
Copilot AI lite review requested due to automatic review settings August 12, 2026 16:18
@PureWeen
PureWeen requested a review from a team as a code owner August 12, 2026 16:18

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

Updates the repository-wide Copilot instructions to require stronger evidence before an agent claims a bug fix is “verified,” improving the quality and credibility of verification statements in PRs.

Changes:

  • Adds guidance to require red/green proof (fail without fix, pass with fix) before claiming a bug fix is verified.
  • Adds an explicit escape hatch requiring agents to state what they verified when red/green isn’t practical.
Show a summary per file
File Description
.github/copilot-instructions.md Adds red/green verification requirements and an explicit exception/clarification to prevent unfounded “verified” claims.

Review details

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

@kotlarmilos kotlarmilos left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants