Clarify test WorkItem requirements in agent instructions#84017
Draft
Copilot wants to merge 1 commit into
Draft
Conversation
Co-authored-by: mwiemer-microsoft <80539004+mwiemer-microsoft@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
mwiemer-microsoft
June 4, 2026 17:54
View session
JoeRobich
reviewed
Jun 4, 2026
| - **Unit tests**: Test individual compiler phases (lexing, parsing) | ||
| - **Compilation tests**: Create `Compilation` objects and verify symbols/diagnostics | ||
| - **Cross-language patterns**: Many test patterns work for both C# and VB with minor syntax changes | ||
| - **Work items**: Always add `WorkItem` alongside test attributes, for example `[Fact, WorkItem("https://github.com/dotnet/roslyn/issues/1234")]`, replacing `1234` with the GitHub issue number |
Member
There was a problem hiding this comment.
Do we need this in each area's instruction if it is already in the base instructions?
Member
|
Out of curiosity, where is this not working currently? The base instruction seems to get picked up by the CLI -- I've never had to prompt to add the workitem attributes there. Is this not working on VS/VSCode/GitHub? |
davidwengier
reviewed
Jun 4, 2026
| ## Testing | ||
|
|
||
| - Place `[WorkItem("url")]` on tests that track a specific issue (GitHub or DevOps URL). | ||
| - Always add `WorkItem` alongside test attributes, for example `[Fact, WorkItem("https://github.com/dotnet/roslyn/issues/1234")]`, replacing `1234` with the GitHub issue number. |
Member
There was a problem hiding this comment.
The "always" wording here is interesting. Does it now add workitem attributes even if tests don't come from an obvious bug or issue?
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.
This updates the repo’s agent guidance so test-related instructions consistently require
WorkItemto appear directly alongside the test attribute, using the GitHub issue URL form. The goal is to make the expected test annotation pattern explicit and uniform across authoring and review guidance.Scope
Behavioral guidance
WorkItemfor issue-based tests” with a single explicit rule:WorkItemCanonical example
Why this matters
Microsoft Reviewers: Open in CodeFlow