find-regression-risk

Detects regression risks by cross-referencing PR removals against recent bug-fix additions.

23.3k|2.0k|Updated May 8, 2020
One-click install
npx skills add https://github.com/dotnet/maui --skill find-regression-risk
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: find-regression-risk
Source: https://github.com/dotnet/maui/tree/main/.github/skills/find-regression-risk
Command: npx skills add https://github.com/dotnet/maui --skill find-regression-risk

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

When reviewing a pull request, it is hard to know whether the change accidentally undoes a previous bug fix. This Skill mechanically compares the lines a PR removes against lines added by recent labeled bug-fix PRs touching the same files, surfacing potential reverts before merge.

Core Features & Use Cases

  • Revert Detection: Flags an exact match between a removed line and a line added by a prior fix PR as a REVERT risk, with OVERLAP and CLEAN verdicts for lower-risk cases.
  • Label-Filtered History: Uses git log and GitHub labels (i/regression, t/bug, p/0, p/1) to focus only on relevant bug-fix PRs within a configurable time window.
  • Structured Outputs: Emits result.txt, risks.json, content.md, and optional inline findings for downstream review agents and PR comments.
  • Use Case: Before merging a PR that modifies MauiWindowInsetListener.cs, run the script to confirm it does not revert a fix shipped last month for a p/1 bug.

Quick Start

Ask the AI to check PR 33908 in dotnet/maui for regression risks by running the Find-RegressionRisks.ps1 script with an output directory.

Frequently Asked Questions about find-regression-risk

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I check if a PR reverts a previous bug fix?

Run the Find-RegressionRisks.ps1 script with the PR number and an output directory. It compares lines the PR removes against lines added by recent labeled bug-fix PRs and reports a REVERT verdict on exact matches.

How to detect regression risk in a GitHub pull request?

Use the script with -PRNumber to auto-detect changed files, or pass -FilePaths to check specific files. It filters git history by labels like i/regression and t/bug, then performs whitespace-insensitive line comparison.

What tools are required to run regression risk detection?

The script requires PowerShell (pwsh), git, and the GitHub CLI (gh) authenticated against the target repository. It runs on any platform where pwsh is available, including CI agents.

Why does a whitespace-only change not trigger a REVERT verdict?

The comparison normalizes whitespace before matching lines, so an indent-only change to a fix line will not match. This is intentional to avoid false positives from code reformatting.

What are the limitations of line-based revert detection?

Inline findings are emitted as LEFT-side annotations, but the current posting script only supports RIGHT-side comments, so they are silently dropped. The analysis is also purely textual and does not understand semantic equivalence.