Repository navigation
Agent test guidance: stop requesting low-value tests - #15653
Draft
JanProvaznik wants to merge 3 commits into
Draft
JanProvaznik wants to merge 3 commits into
JanProvaznik wants to merge 3 commits into
Conversation
Add a canonical 'What to test' section to tests.instructions.md and point the expert reviewer, AGENTS.md and running-unit-tests skill at it instead of duplicating test guidance. Reviewers must no longer request reflection/structure tests or nondeterministic race tests; they ask for PR-description evidence when no meaningful deterministic test exists. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
🔍 Skill Validator Results✅ All checks passed
Summary
Full validator output```text Found 1 skill(s) [running-unit-tests] 📊 running-unit-tests: 2,208 BPE tokens [chars/4: 2,171] (detailed ✓), 9 sections, 6 code blocks ✅ All checks passed (1 skill(s)) Found 1 agent(s) Validated 1 agent(s) ✅ All checks passed (1 agent(s)) ``` |
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…tests Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This branch has not been deployed
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.
Related issue(s): none (triggered by review on #15649)
Context
On #15649 the expert reviewer marked a missing test as MAJOR and pushed for a reflection test asserting that
Copy's cached strings arestatic readonlyand non-empty. The race it fixes can't be reproduced reliably. Maintainers have pushed back on bot-requested tests like this many times (table below), but our guidance still says "every behavioral change needs a test" and the reviewer template asks for a proof-of-concept[Fact].Changes Made
## What to testsection in.github/instructions/tests.instructions.md.expert-reviewer.agent.md:[Fact]stub is gone from the comment template.AGENTS.md:.github/copilot-instructions.mdis a symlink toAGENTS.md, so this reaches Copilot code review even on PRs that don't touch test files (like Fix Copy task ArgumentNullException from racy static resource-string initialization under -mt #15649, which changed onlysrc/Tasks/Copy.cs).applyTointests.instructions.md: it wassrc/*.Tests/**/*.cs, which matched only 26 files (TaskAnalyzer.Tests,MSBuild.EndToEnd.Tests) and none of the*.UnitTestsprojects. It is nowsrc/*Tests/**/*.cs,src/UnitTests.Shared/**/*.cs,src/Shared/UnitTests/**/*.cs, which matches 736 files across every test project.running-unit-testsskill: dropped the Quick reference table (every row is already covered in the skill body: direct test exe,-c Releasevalidation, TRX), fixed a--bullet typo, and linked "What to test".Line count (raw lines)
The diff adds 38 lines and removes 73.
Evidence behind each principle (17 cases). These are maintainer replies from roughly the last 15 months, mostly to Copilot or Expert Code Review comments.
IsInitOnlyreflection test)Counter-cases kept in the guidance (listed as "high-value examples" or as rules that stay):
>= 0is too weak to catch the failure mode the feature exists to prevent."Testing
Guidance-only change; no product code touched.
skill-validator check --skills .github/skills --allow-repo-traversal(dotnet/skills nightly, win-x64): ✅ all 17 skills pass. The only warnings were already there before this change.skill-validator check --agents .github/agents: ✅ 1 agent passes.