Skip to content

.NET: Add a verify-samples tool and skill#5005

Merged
westey-m merged 4 commits into
microsoft:mainfrom
westey-m:verify-samples-tool
Apr 1, 2026
Merged

.NET: Add a verify-samples tool and skill#5005
westey-m merged 4 commits into
microsoft:mainfrom
westey-m:verify-samples-tool

Conversation

@westey-m

Copy link
Copy Markdown
Contributor

Motivation and Context

This tool can run samples and verify that they work correctly based on configurations that determine what inputs to pass to samples and what outputs to expect.
There is also a skill, which can be used to build/modify the configurations and run specific samples using the tool

Description

  • Add a verify-samples tool and skill

Contribution Checklist

  • The code builds clean without any errors or warnings
  • The PR follows the Contribution Guidelines
  • All unit tests pass, and I have added new tests where possible
  • Is this a breaking change? If yes, add "[BREAKING]" prefix to the title of the PR.

Copilot AI review requested due to automatic review settings March 31, 2026 17:54
@markwallace-microsoft markwallace-microsoft added documentation Improvements or additions to documentation .NET labels Mar 31, 2026
@github-actions github-actions Bot changed the title Add a verify-samples tool and skill .NET: Add a verify-samples tool and skill Mar 31, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new .NET CLI tool under dotnet/samples/verify-samples/ to run sample projects and validate their output (deterministic substring checks + AI/structured-output verification for nondeterministic samples), plus a GitHub skill doc describing how to use and maintain it.

Changes:

  • Introduces the verify-samples runner/orchestrator, output verifier, and CSV/log writers.
  • Adds curated sample-definition registries for 01-get-started, 02-agents, and 03-workflows.
  • Wires the tool into dotnet/agent-framework-dotnet.slnx and documents usage via a new skill.

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
dotnet/samples/verify-samples/Program.cs CLI entrypoint: resolves repo root, sets up AI verifier client, runs orchestrator, writes summaries.
dotnet/samples/verify-samples/VerifyOptions.cs Parses CLI args, registers sample categories, builds filtered sample list.
dotnet/samples/verify-samples/VerificationOrchestrator.cs Filters skipped/runnable samples, runs samples in parallel, reports/logs results.
dotnet/samples/verify-samples/SampleRunner.cs Executes dotnet run for sample projects, captures stdout/stderr, supports stdin injection + timeout.
dotnet/samples/verify-samples/SampleVerifier.cs Performs exit-code + substring checks; uses RunAsync<T> structured-output to verify nondeterministic output.
dotnet/samples/verify-samples/VerificationResult.cs Result model used for console/log/CSV reporting.
dotnet/samples/verify-samples/ConsoleReporter.cs Thread-safe, prefixed, colored console output + end-of-run summary.
dotnet/samples/verify-samples/LogFileWriter.cs Thread-safe sequential log writer with per-sample output sections and final summary.
dotnet/samples/verify-samples/CsvResultWriter.cs Writes a CSV summary of pass/fail/skip results.
dotnet/samples/verify-samples/SampleDefinition.cs Defines per-sample config: paths, env vars, deterministic checks, AI expectations, stdin inputs.
dotnet/samples/verify-samples/GetStartedSamples.cs Sample definitions for 01-get-started.
dotnet/samples/verify-samples/AgentsSamples.cs Sample definitions for 02-agents.
dotnet/samples/verify-samples/WorkflowSamples.cs Sample definitions for 03-workflows.
dotnet/samples/verify-samples/verify-samples.csproj New executable project with dependencies + removal of inherited sample helpers.
dotnet/agent-framework-dotnet.slnx Adds the verify-samples project to the solution.
dotnet/.github/skills/verify-samples-tool/SKILL.md Documentation/skill: running the tool, categories, and authoring sample definitions.

Comment thread dotnet/eng/verify-samples/SampleVerifier.cs
Comment thread dotnet/eng/verify-samples/VerificationOrchestrator.cs
Comment thread dotnet/eng/verify-samples/VerifyOptions.cs
Comment thread dotnet/eng/verify-samples/VerifyOptions.cs
Comment thread dotnet/samples/verify-samples/SampleDefinition.cs Outdated
Comment thread dotnet/samples/verify-samples/Program.cs Outdated
Comment thread dotnet/eng/verify-samples/AgentsSamples.cs
Comment thread dotnet/eng/verify-samples/ConsoleReporter.cs
@westey-m westey-m added this pull request to the merge queue Apr 1, 2026
Merged via the queue into microsoft:main with commit acaadc9 Apr 1, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation .NET

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants