Detects potential regression risks in a PR by cross-referencing lines the PR REMOVES against lines ADDED by recent labeled bug-fix PRs (`i/regression`, `t/bug`, `p/0`, `p/1`) touching the same files. Purely mechanical — no AI/LLM. Emits a CLEAN / OVERLAP / REVERT verdict plus structured findings. Triggers on: "does this PR revert a previous fix", "check PR for regression risk", "find regression risks in PR", "is this change reverting a bug fix". Do NOT use for: assessing ship-readiness of a release branch (use release-readiness), investigating CI failures (use azdo-build-investigator), or general code review (use code-review).
77
96%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Low
Low-risk findings worth noting
Detects potential regression risks in a PR by cross-referencing removed lines against lines added by recent labeled bug-fix PRs.
Purely mechanical — no AI/LLM. Five-step algorithm:
git log --follow --since=6mo finds recent PRs that touched the same files.i/regression, t/bug, p/0, or p/1.# Analyze a specific PR (auto-detects files)
pwsh -NoProfile -Command '& ./.github/scripts/Find-RegressionRisks.ps1 -PRNumber 33908 -OutputDir /tmp/out'
# Analyze specific files only
pwsh -NoProfile -Command '& ./.github/scripts/Find-RegressionRisks.ps1 -PRNumber 33908 -OutputDir /tmp/out -FilePaths @("src/Core/src/Platform/Android/MauiWindowInsetListener.cs")'| Parameter | Required | Default | Description |
|---|---|---|---|
-PRNumber | Yes | — | PR number to analyze |
-Repo | No | dotnet/maui | Repository in owner/name form |
-FilePaths | No | auto-detect | Implementation files to check |
-MonthsBack | No | 6 | History window for git log |
-MaxRecentPRsPerFile | No | 20 | Rate-limit guard per file |
-BaseBranch | No | main | Base branch for git log scope |
-OutputDir | No | — | Directory for output files |
-WriteInlineFindings | No | off | Emit inline-findings.json |
When -OutputDir is specified:
result.txt — single token: CLEAN, OVERLAP, or REVERTrisks.json — structured findings for downstream agentscontent.md — markdown summary for the PR commentinline-findings.json — (only with -WriteInlineFindings) inline annotationsThe script runs as STEP 4 in Review-PR.ps1 (Regression Cross-Reference, after UI test detection and before the Gate step). Its content.md is assembled into the AI summary review by post-ai-summary-comment.ps1.
When REVERT risks are detected, the regression tests from the reverted fix PRs are executed:
BuildAndRunHostApp.ps1 -Platform <plat> -TestFilter <filter>Run-DeviceTests.ps1 -Project <proj> -Platform <plat> -TestFilter <filter>dotnet test <project> --filter <filter>The expert reviewer agent (maui-expert-reviewer.md, dimension #6) reads risks.json to check for REVERT entries.
-WriteInlineFindings flag emits deletion-side (LEFT) annotations, but post-inline-review.ps1 currently only posts RIGHT-side comments. LEFT-side findings are silently dropped. This is documented as future work.pwsh -File array parameters: When invoking standalone from bash, use pwsh -Command '& ./script.ps1 -FilePaths @(...)' syntax. pwsh -File doesn't evaluate @() expressions.pwsh -NoProfile -File .github/scripts/tests/Test-FindRegressionRisks.ps1699f16e
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.