Regression test selection from code changes
The problem
Full regression takes 6 hours; running 'some tests' by gut feeling misses impact.
Workflow
- PR diffchanged files
- Mapcode ↔ tests ↔ features
- LLM riskimpact reasoning
- Test setmust-run + suggested
- CIrun selected suite
Real-world example
A PR changes tax-calculation utilities. The AI selects invoice, checkout total and refund tests (shared function) plus the GST report test — 46 tests instead of 900 — and explains why each was chosen.
Starter prompt
Given the diff and the test-to-feature map, list tests that must run (direct impact) and should run (indirect impact) with a one-line reason each. Never drop tests tagged 'critical'.
Tools
Git, coverage map, LLM, CI
Human check
Always keep a smoke + critical set; run full regression nightly as a safety net.
Measure success
Pipeline time saved; escaped defects for skipped areas (should stay ~0).