Add repository-local code-review-test-trigger-map Copilot review skill - #19942
Add repository-local code-review-test-trigger-map Copilot review skill#19942Ankit Jain (radical) with Copilot wants to merge 2 commits into
code-review-test-trigger-map Copilot review skill#19942Conversation
There was a problem hiding this comment.
Copilot wasn't able to review any files in this pull request.
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
…ests Co-authored-by: radical <1472+radical@users.noreply.github.com>
code-review-test-trigger-map Copilot review skill
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
| var corpus = JsonSerializer.Deserialize<EvalCorpus>(stream, new JsonSerializerOptions | ||
| { | ||
| PropertyNamingPolicy = JsonNamingPolicy.SnakeCaseLower, | ||
| }); |
| Assert.StartsWith("---\n", text, StringComparison.Ordinal); | ||
| var end = text.IndexOf("\n---", 3, StringComparison.Ordinal); | ||
| Assert.True(end > 0, "SKILL.md has no closing frontmatter delimiter."); | ||
|
|
||
| var yaml = text[4..end]; |
|
|
||
| Assert.Contains("test:Infrastructure.Tests", targets); | ||
| Assert.Contains(".github/skills/**", map.Prefilter!.KeepRouted); |
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 19942Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 19942" |
Tests selector1 / 99 PR test projects · 0 PR jobs · 0 advisory-only targets, from 5 changed files. Selected PR test projects (1 / 99)
Selected PR jobs (0)none Advisory workflow impact (0)none How these were chosen — grouped by what changed📄 📄 📄 📄 🧪 Job reasonsnone Selection computed for commit |
Description
Extracts the specialized test-trigger-map review guidance out of broad agent instructions into a focused, on-demand Copilot code review skill, and adds a curated evaluation corpus. PR #19939 motivated this: the two defects found there (an over-broad
src/*/api/**skip glob, and a removed ATS route whose replacement test only assertedNotEmpty) are exactly the failure modes this subsystem produces, and they were buried in a paragraph of general review instructions.New skill
.github/skills/code-review-test-trigger-map/SKILL.md— frontmatterdescriptionnames the activation triggers (eng/github-ci/test-trigger-map.yml,eng/github-ci/ci-skip-entirely-patterns.txt,tools/SelectTests/**, workflow gates / reusable workflows /run_*outputs, loose CI inputs, test project add/remove/rename), so Copilot loads it only on those diffs.ALL/ prefiltered / dedicated workflow / no consumer) → trace the real consumer → verify narrowest-complete additive routing and end-to-endrun_*wiring → evaluate glob semantics literally → weigh under- vs over-selection → require exact-invariant regression tests → post only high-confidence, diff-anchored findings naming path, consumer, target, and regression scenario. Authoritative details stay indocs/ci/test-trigger-map.mdanddocs/ci/test-trigger-selector-design.md.Guidance moved
AGENTS.mdand its duplicate in.agents/skills/code-review/SKILL.mdare replaced by short pointers. No requirement dropped.Evaluation
evals/cases.json— 5 cases with expected findings, expected non-findings, and required evidence per finding: both PR Skip CI entirely for API/ATS baseline-only PRs #19939 defects, a Layer 1-owned true negative (the most likely false positive: demanding a manual rule for an ordinary ProjectGraph input), a workflow/run_*gate case, and an over-selection case.evals/README.md— separates the two halves explicitly: the automated tests are structural only; semantic quality is scored manually via skill attribution plus recall/precision/evidence/duplication over the corpus, with success criteria.tests/Infrastructure.Tests/TestTriggerMap/ReviewSkillTests.cs— 13 tests for skill discoverability, frontmatter, trigger coverage, corpus schema, defect-class coverage, and the map routing below.CI routing (dogfooding)
eng/github-ci/test-trigger-map.ymlroutes.github/skills/**totest:Infrastructure.Testsand adds akeep_routedcarve-out — without it the prefilter's**.mdwould dropSKILL.mdbefore both layers and the verifier would never run:Validation:
Infrastructure.Tests.TestTriggerMap198/198 green; markdownlint clean.Checklist
<remarks />and<code />elements on your triple slash comments?