Add prompt-scenario coverage check to code-testing-generator gate#789
Merged
Evangelink merged 2 commits intoJun 18, 2026
Merged
Conversation
The pre-completion gate already verifies assertion strength (pseudo-mutation and assertion-depth checks), but two recurring failure modes still slip through when the prompt enumerates specific behaviors: - Testing an *adjacent* function/helper instead of the exact feature named in the objective, leaving the requested behavior uncovered. - Covering only a single representative case when the scenario wording implies multiple variations or pins a condition to a specific position or structure. Add a third gate item that maps each enumerated scenario to a dedicated test, requires targeting the exact named function (preferring the canonical existing test file), and requires honoring range/positional qualifiers literally. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the dotnet-test code-testing generator agent documentation to add an explicit “prompt-scenario coverage” item to the Step 7 pre-completion gate, aiming to ensure generated tests cover the exact behaviors/scenarios enumerated by the prompt (not adjacent/sibling functionality or only a single representative case).
Changes:
- Add a third Step 7 pre-completion gate item: prompt-scenario coverage check.
- Document guidance to (1) target the exact named function/feature, (2) cover implied scenario ranges, and (3) honor positional/structural qualifiers literally.
Show a summary per file
| File | Description |
|---|---|
| plugins/dotnet-test/agents/code-testing-generator.agent.md | Adds a new Step 7 gate item describing prompt-scenario coverage expectations for generated tests. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 1/1 changed files
- Comments generated: 2
- Remove benchmark-specific symbol names from the target-the-named-function bullet to avoid overfitting; phrase it generically. - Fix the gate intro that said 'The two skills below' now that there are three numbered items (the third is a prompt self-review, not a skill). - Update Step 8 and Rule 11 so re-running the gate includes the new prompt-scenario coverage check, not just test-gap-analysis + assertion-quality. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Member
Author
|
/evaluate |
Contributor
|
⏭️ No skills to evaluate — no changed skills with tests were found in this PR. View workflow run |
YuliiaKovalova
approved these changes
Jun 18, 2026
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.
Motivation
While comparing two MSBench
sweatlas-tw-unitruns that used the same model (claude-opus-4.6) and the samedotnet-testcode-testing-*agents — differing only in the CLI harness — I traced every instance where one run passed and the other failed. The failures clustered into two patterns that the current pre-completion gate does not explicitly catch, even though the agent enumerated the scenarios from the prompt:in6_mactoifaceid, but the generated tests targeted the siblingin6_mac_eui64; another asked for therewrapline-buffer behavior but tests landed in a neighboring module. The requested behavior was left uncovered (rubric/mutation failure).The existing gate items (
test-gap-analysispseudo-mutation +assertion-quality) verify that assertions are strong, but not that the generated tests cover the exact scenarios the prompt asked for. These are complementary.Change
Adds a third item to the Step 7 pre-completion gate in
code-testing-generator.agent.md: a prompt-scenario coverage check that, when the prompt enumerates behaviors/scenarios, requires the agent to:Docs-only change to one agent file (+5 lines).
markdownlint-cli2passes with 0 errors; file is well under the 30,000-char agent-prompt limit.