.NET: Improve resilience of verify-samples by building separately and improving evaluation instructions#5151
Open
westey-m wants to merge 2 commits intomicrosoft:mainfrom
Open
Conversation
…ving evaluation instructions
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the .NET verify-samples tool to reduce flakiness from parallel sample builds by defaulting to running samples with dotnet run --no-build (assuming a prior build step), and refines the AI-verifier prompt/schema to improve structured output compliance.
Changes:
- Add a
--buildoption to control whether sample projects are built during execution (default: do not build). - Update sample execution to pass
--no-buildby default, plus documentation/workflow updates to build the solution first. - Improve AI verification instructions and structured response schema (including stderr in the prompt).
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| dotnet/eng/verify-samples/VerifyOptions.cs | Adds CLI flag parsing for --build and exposes BuildSamples option. |
| dotnet/eng/verify-samples/VerificationOrchestrator.cs | Threads buildSamples through orchestration into sample runs. |
| dotnet/eng/verify-samples/SampleVerifier.cs | Enhances AI verification prompt/schema and includes stderr in the verification prompt. |
| dotnet/eng/verify-samples/SampleRunner.cs | Implements --no-build default behavior and adds a build parameter. |
| dotnet/eng/verify-samples/Program.cs | Wires BuildSamples into the orchestrator and updates usage comment. |
| dotnet/.github/skills/verify-samples-tool/SKILL.md | Documents the new default pre-build requirement and the --build escape hatch. |
| .github/workflows/dotnet-verify-samples.yml | Builds the solution before running verify-samples in CI. |
SergeyMenshykh
approved these changes
Apr 7, 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 and Context
Description
Contribution Checklist