Background
Currently we have two AI-powered PR checks in CI:
review: Code quality review (checks for bugs, style, security, performance)
feature-missing: Compares PR implementation against linked issue specs to find missing features
We need a third check: regression-test-missing. When a PR fixes a bug or modifies existing behavior, it should include regression tests to prevent the same issue from recurring.
Existing Pattern
Both current checks follow the same structure:
- A composite action directory (
review/, feature-missing/) with action.yml
- A workflow file (
.github/workflows/review.yml, .github/workflows/feature-missing.yml) triggered on PR events
- The action wraps
github-run-opencode/run-github-opencode.py with a specialized prompt
Deliverables
1. regression-test-missing/ composite action
An independent composite action (same level as review/ and feature-missing/) that:
- Detects bugfix/refactor PRs: Identifies when a PR is fixing a bug, addressing a crash, or modifying existing behavior (not just adding new features)
- Checks for regression tests: Verifies if the PR includes tests that would catch the same bug/issue if it were reintroduced
- Distinguishes scenarios:
- Bugfix without regression test → flag as missing
- Pure feature addition (no existing behavior change) → skip or pass
- Bugfix with adequate test coverage → pass
- Output format (consistent with other checks, in Chinese):
- First line:
"无需回归测试" or "缺少回归测试"
- Summary of analysis
- If missing: specific suggestions on what regression tests should be added
2. Integrated workflow action (pr-checks/ or similar)
A new composite action that combines all three checks in one workflow:
- 3 parallel jobs:
review, feature-missing, regression-test-missing
- Each job calls the corresponding independent composite action
- Shares opencode install cache across jobs (方案 C)
- Users can adopt this single action instead of configuring 3 separate workflows
Implementation Checklist
Acceptance Criteria
Background
Currently we have two AI-powered PR checks in CI:
review: Code quality review (checks for bugs, style, security, performance)feature-missing: Compares PR implementation against linked issue specs to find missing featuresWe need a third check:
regression-test-missing. When a PR fixes a bug or modifies existing behavior, it should include regression tests to prevent the same issue from recurring.Existing Pattern
Both current checks follow the same structure:
review/,feature-missing/) withaction.yml.github/workflows/review.yml,.github/workflows/feature-missing.yml) triggered on PR eventsgithub-run-opencode/run-github-opencode.pywith a specialized promptDeliverables
1.
regression-test-missing/composite actionAn independent composite action (same level as
review/andfeature-missing/) that:"无需回归测试"or"缺少回归测试"2. Integrated workflow action (
pr-checks/or similar)A new composite action that combines all three checks in one workflow:
review,feature-missing,regression-test-missingImplementation Checklist
regression-test-missing/action.ymlcomposite action (modeled afterfeature-missing/action.yml)action.ymlcontaining 3 parallel jobs.github/workflows/ci.ymlsmoke test to cover new actionAcceptance Criteria
regression-test-missingcomposite action works standalonereviewandfeature-missing