Skip to content
>devspeak
← glossary
patternCommunication Patterns

Test for regressions

Ask the agent to check that things which worked before your change still work after it, not just the new thing.

a bit more technical

After a change, run existing automated tests and targeted checks on related features to confirm previously working behavior still works. When fixing a bug, add a regression test so it can't return unnoticed.

picture it

After a mechanic replaces your brake lights, you also check the headlights and turn signals, since they share the same wiring.

✗ instead of
apple pay works now right? ship it
✓ try
Apple Pay is added. Before shipping, test for regressions: run the full test suite, check existing card and gift card checkout, and report anything that behaves differently than before.
why it matters

Agents tend to test what they just built. Breakage usually happens next door, in features that share the same code. This instruction points the agent there.

what your agent might say
agent
The new feature works. Regression check: all 112 existing tests pass, and I manually tested card and gift card checkout, which share the payment code.
how you might use it
you → your agent
After adding Apple Pay, test for regressions: run the full test suite and check card and gift card checkout. Add a regression test for the bug we fixed last week.
common mistake

Assuming a working new feature means the change is safe. Regressions show up in the old features, not the new one.