Files
Jan Krivanek 14ee3c90f9 Rework evaluation to allow sharding of resource intensive evaluations (#692)
* Shard plugin evaluation via executionShard tag in eval.yaml

MCP-heavy plugins like dotnet-msbuild reliably exhaust the GitHub-hosted runner host after ~87 min of cumulative MCP traffic (Copilot CLI plus dotnet dnx Microsoft.AITools.BinlogMcp child processes), which has produced no dashboard data for dotnet-msbuild scheduled runs since 2026-05-20. Cutting per-runner concurrency alone was insufficient: at the default 18-way concurrency the runner OOMs in 17-30 min; at 3-way it survives longer but still hits a host-level termination at ~87 min.

Two mitigations, both required:

1. Sharding (this change). The discover step reads an optional top-level 'executionShard:' string from each tests/<plugin>/<skill>/eval.yaml and groups skills by tag, emitting one matrix entry per shard so each shard runs on a fresh runner. Untagged skills fall into a 'default' bucket. Plugins where all skills resolve to a single bucket emit one entry (unchanged behavior). The validator already calls IgnoreUnmatchedProperties so no Models.cs change is needed. Shard names follow '<plugin>--shard-<tag>' so the existing 'skill-validator-results-<plugin>--*' artifact glob keeps working.

2. Per-MCP-plugin concurrency caps (already in place). When plugin.json declares mcpServers, parallelism is forced to 1x3x1 with --judge-timeout 600 to avoid acute OOM within a shard.

Also adds a workflow_dispatch 'plugin' input for targeted re-runs of a single plugin, and tags 10 dotnet-msbuild eval.yamls (heavy/medium); the remaining 8 fall into 'default'. Empirically the three shards complete in parallel in ~30-40 min each, well inside the 180-min job timeout, and successfully upload dashboard data.

* Address PR review: lenient shard regex and validate dispatch plugin input

- executionShard regex now tolerates optional leading whitespace, so an accidentally indented key still groups correctly instead of silently falling back to the default bucket.

- workflow_dispatch 'plugin' input is now validated against ^[a-zA-Z0-9._-]+$ before any Join-Path/Test-Path use, preventing path-traversal style values (e.g. '../foo') from being injected into filesystem paths.
2026-05-26 08:22:40 +00:00

23 lines
1.4 KiB
YAML

executionShard: medium
scenarios:
- name: "Organize build infrastructure for a multi-project repo"
prompt: >-
This .NET solution has grown organically and the build infrastructure needs
attention. Review all project files and suggest how to improve the build
organization. Focus on reducing duplication, improving maintainability, and
applying MSBuild best practices.
setup:
copy_test_files: true
assertions:
- type: "output_contains"
value: "Directory.Build.props"
- type: "output_matches"
pattern: "(Directory\\.Build\\.targets|\\btargets\\b)"
rubric:
- "Identified duplicated properties across projects and recommended centralizing them in a root Directory.Build.props"
- "Identified package version inconsistencies and recommended Central Package Management with Directory.Packages.props (ManagePackageVersionsCentrally)"
- "Proposed a multi-level Directory.Build.props hierarchy (e.g., separate files for src/ and test/ folders) with GetPathOfFileAbove import chaining"
- "Identified the DocumentationFile property as depending on $(OutputPath) — an SDK-defined value — and correctly recommended placing it in Directory.Build.targets rather than .props, explaining the MSBuild evaluation order"
- "Identified the duplicated PrintBuildInfo custom Target across src projects and recommended centralizing it in Directory.Build.targets"
timeout: 300