Why this exists

Most test suites are written aspirationally. Engineers write tests for the code they wish they had, the invariants they hope hold, the edge cases they imagine at desk-time. The tests that would actually save the team are the ones that would have caught the failures the team has already paid for. The git log knows what your tests don't. Every revert is a confession that something shipped, broke, and got pulled back — and that the test suite never saw it coming. Mine that history. It is a free, ranked, evidence-backed specification of every test you should have written.

What you get back

  • A ranked list of generated tests, each annotated with the exact revert commit it would have prevented.
  • The failure pattern each test protects against — the shape of the bug, not just the symptom.
  • A triage by ROI: which tests to add first based on how many similar reverts they would have caught.
  • The tests in mergeable form — runnable in your existing framework, scoped to the modules that actually break.

When to reach for this pattern

Reach for this after a string of reverts has made it clear the suite is not catching the class of bugs that ships. Reach for it pre-launch, when you are hardening a release and need to know what the codebase has historically been bad at. Reach for it when auditing test coverage on a legacy codebase whose original authors are gone but whose history is intact. Reach for it when you have time to add five tests, not five hundred, and you need the five that pay for themselves on day one.