Repository navigation
Update MTPHelpSnapshotTests snapshot for --progress option changes - #54949
Closed
MichaelSimons wants to merge 9 commits into
Closed
MichaelSimons wants to merge 9 commits into
MichaelSimons wants to merge 9 commits into
Conversation
Add a new agent skill for creating and validating Known Build Error GitHub issues. The skill guides the agent through an interactive workflow: 1. Gather build/PR input from the user 2. Fetch failures using AzDO and Helix MCP tools 3. Let the user select which failures to track 4. Draft ErrorMessage/ErrorPattern JSON with quality guidance 5. Validate patterns against actual build logs 6. Check pattern specificity to avoid false positives 7. File the GitHub issue with proper template and label Includes: - SKILL.md with full workflow instructions - references/pattern-quality.md with pattern writing guidance - scripts/Validate-KnownIssuePattern.ps1 for local validation Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add Step 2b to check for existing Known Build Error issues before creating a new one. Searches both the repo and dotnet/dnceng for similar patterns and suggests updating existing issues when appropriate. - Add Validate-KnownIssuePattern.sh bash script for Linux/macOS users who may not have PowerShell installed. - Update SKILL.md to reference both scripts with platform-specific examples. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Update BuildRetry recommendations to cover race conditions, concurrency issues, and other flaky test categories beyond just infrastructure failures. Frame the decision as intermittent vs deterministic. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Remove the Validation Results section from the issue body template — Build Analysis infrastructure handles validation and injects results automatically. Use the canonical template with the guidance comments and build break warning that the system expects. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Clarify that Build Analysis only runs on PR validation builds, not CI/rolling builds. The absence of known issue matches on a CI build does NOT mean the pattern is wrong or that no known issue exists. - Add guidance to detect build type via sourceBranch (refs/pull vs refs/heads). - Fix double-numbering: instruct the agent not to include numbers in ask_user choices since the UI adds its own numbering. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
After filing a known build error, prompt the user to create more from the same build's remaining failures without restarting the skill. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Rewrite Validate-KnownIssuePattern.sh to fix: - Single-quote escaping bug in parse_array_or_single (sed command used literal single quotes inside a single-quoted string) - Replace all echo piped to grep with printf to handle lines starting with - or containing backslashes - Extract line_contains/line_matches_regex helper functions that use printf and grep -- for safe argument passing - Use set +e around grep regex validation to properly detect exit code 2 (regex error) vs 1 (no match) - Use printf throughout for output to avoid echo portability issues Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The MTP help output was updated to include a new --progress option and
remove the duplicate --ansi from Extension Options. The snapshot file
was not regenerated, causing test failures across all legs.
Changes:
- --no-progress reference updated to --progress off
- New --progress platform option added
- --ansi removed from Extension Options (was duplicated from Platform Options)
- {arch} placeholder added to --report-trx-filename description
Fixes #54948
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 --help Verify snapshot to match the current Microsoft.Testing.Platform help output, and (additionally) introduces a new GitHub skill for drafting/validating “Known Build Error” issue patterns.
Changes:
- Regenerates
MTPHelpSnapshotTests.VerifyMTPHelpOutputverified snapshot to reflect--progresshelp updates and TRX placeholder changes. - Adds
.github/skills/create-known-build-errordocumentation plus Bash/PowerShell helper scripts to validateErrorMessage/ErrorPatternmatching. - Adds a pattern quality reference doc for writing safer/more specific Known Build Error patterns.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| test/dotnet.Tests/CommandTests/Test/snapshots/MTPHelpSnapshotTests.VerifyMTPHelpOutput.verified.txt | Updates the expected dotnet test --help output snapshot (progress/ansi/TRX placeholder text). |
| .github/skills/create-known-build-error/SKILL.md | Adds a workflow guide for creating/validating Known Build Error GitHub issues. |
| .github/skills/create-known-build-error/scripts/Validate-KnownIssuePattern.sh | Adds a Bash helper to validate candidate patterns against sample error text. |
| .github/skills/create-known-build-error/scripts/Validate-KnownIssuePattern.ps1 | Adds a PowerShell helper to validate candidate patterns against sample error text. |
| .github/skills/create-known-build-error/references/pattern-quality.md | Adds guidance on writing high-quality, low-false-positive Known Build Error patterns. |
Comment on lines
+1
to
+10
| --- | ||
| name: create-known-build-error | ||
| description: >- | ||
| Create and validate Known Build Error GitHub issues for flaky or infrastructure | ||
| build/test failures. USE FOR: creating known build error issues, validating | ||
| ErrorMessage/ErrorPattern JSON against real build failures, checking pattern | ||
| specificity to avoid false positives, filing issues with the Known Build Error | ||
| label. DO NOT USE FOR: investigating CI failures themselves (use ci-analysis), | ||
| debugging test crashes (use ci-crash-dump), general build troubleshooting. | ||
| --- |
Comment on lines
+31
to
+35
| The script validates that the pattern matches the error text using the same | ||
| matching rules as the Build Analysis system: | ||
| - ErrorMessage: case-insensitive substring match, per line | ||
| - ErrorPattern: case-insensitive regex match, per line | ||
| - Multi-line: pass JSON array syntax ["pat1","pat2"] |
Comment on lines
+7
to
+11
| using the same matching rules as the Build Analysis system: | ||
| - ErrorMessage: case-insensitive String.Contains, per line | ||
| - ErrorPattern: Regex with Singleline | IgnoreCase flags, per line | ||
| - Multi-line: all entries must match consecutively in order | ||
|
|
|
|
||
| # Compile regexes | ||
| $regexes = @() | ||
| $regexOptions = [System.Text.RegularExpressions.RegexOptions]::Singleline -bor [System.Text.RegularExpressions.RegexOptions]::IgnoreCase |
| Rules: | ||
| - All entries must match in the order specified | ||
| - Each entry matches against a single line | ||
| - Lines must appear consecutively in the log |
This was referenced Jun 23, 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.
Summary
Regenerates the
MTPHelpSnapshotTests.VerifyMTPHelpOutputVerify snapshot to match the currentdotnet test --helpoutput. This test is failing across all legs on the main CI build.Changes to snapshot
--no-progressreference updated to--progress offin the--ansiplatform option description--progressplatform option added (control whether progress is reported to screen)--ansiremoved from Extension Options (it was duplicated from Platform Options){arch} (process architecture)placeholder added to--report-trx-filenamedescriptionFailing build
https://dev.azure.com/dnceng-public/public/_build/results?buildId=1477619
Fixes #54948