regression-testing
Write a test that reproduces a defect, fails before its fix and passes after it at the lowest useful level. Use when fixing a bug or turning a confirmed incident or reproduction into a permanent regression guard.
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- regression-testing
- description
- Write a test that reproduces a defect, fails before its fix and passes after it at the lowest useful level. Use when fixing a bug or turning a confirmed incident or reproduction into a permanent regression guard.
03 SKILL.md 正文
<!-- Generated by Paved plugin paved@2.29.0 from core.testing.regression-testing@0.2.1; edit Paved Core instead. -->
Regression testing
When to use
After root-cause-analysis produced a reproduction, and before the fix is written.
Required context
The reproduction, the tests near the affected code, and the verification profile (to know how to run a single test).
Preconditions
The cause is known well enough to assert the correct behavior.
Procedure
- Choose the lowest level that reproduces the bug and write the test with that
level's skill:
unit-testingif the cause is local,integration-testingif it lives in the interaction between components,e2e-testingonly if nothing lower captures it. - Name the test after the behavior, not after the ticket.
- Run it against the unfixed code and confirm it fails for the right reason (the assertion about the bug, not a setup error). Record that failure.
- After the fix, run it again, confirm it passes, then run the surrounding suite.
Tools
None. The targeted test command comes from the verification profile.
Rules
core.testing.regression-test-for-bug-fix is this skill's contract.
Verification
Required: unit. Recommended: integration or e2e when the test lives at that level;
when it does, record the unit requirement as a gap naming the level used.
Evidence
A check result for the new test whose summary states it failed before the fix, and a check result for the surrounding suite.
Completion criteria
- The test failed before the fix for the reason the bug describes.
- The test passes after the fix, and the surrounding suite passes.
Failure modes
| Failure | Signal | Response |
|---|---|---|
| Test passes before the fix | It does not reproduce the bug | Rework the test before fixing anything |
| Fails for the wrong reason | Setup or fixture error before the assertion | Fix the test setup |
| Too high level | Slow or flaky end-to-end test for a local defect | Move the test down a level |
References
None.
Paved integration
Use the project-local Paved contract as the source of truth. Discover state with node "<plugin root>/scripts/paved.mjs" status --json, load only relevant .paved/project/ context, and invoke verification with node "<plugin root>/scripts/paved.mjs" verify --json. <plugin root> is the installed Paved plugin directory, two directories above this SKILL.md. Always run the launcher from the repository being worked on, never from the plugin directory. Do not edit generated integration files or bypass Paved lifecycle and ownership checks.
04 同仓库更多 Skills
sample-skill
Does a sample task. Use when a sample is needed.
unexplained-contract
Does a sample task. Use when a sample is needed.
shell-block
Does a sample task. Use when a sample is needed.
project-identifier
Does a sample task. Use when a sample is needed.
oversized
Does a sample task. Use when a sample is needed.
no-activation
Does a sample task.