# Backfill the regression test for a bug that shipped without one

A bug that was fixed under time pressure and never got the test that stops it coming back.

Category: Test coverage and flaky tests
Source: https://letsship.ai/use-cases/backfill-a-regression-test
Published: 2026-08-25

## Goal

Write the regression test for a bug that was fixed without one.

## Acceptance criteria

- The test fails against the code as it was before the fix
- The test asserts the user-visible behaviour, not the internals of the fix
- It sits with the tests for that area rather than in a separate file
- The original issue is referenced in the description

## What lands as proof

A test proven to fail against the reverted fix, which is the only evidence that it actually covers the bug.

## Prompt

Copy this to an agent to open the ticket:

```text
Create a Linear issue in my team and assign it to the SHIP agent.

Title: Add the regression test for {bug}

Description: Write the regression test for a bug that was fixed without one.

Acceptance criteria:
- The test fails against the code as it was before the fix
- The test asserts the user-visible behaviour, not the internals of the fix
- It sits with the tests for that area rather than in a separate file
- The original issue is referenced in the description

Before you create the issue, find a recent bug-fix commit in this repository with no test alongside it and replace {bug} with the issue or commit reference.
```

## Questions

### What does the agent actually change?

The ticket is scoped to one outcome: write the regression test for a bug that was fixed without one. Work that serves that outcome is in scope, and anything outside it is left for a separate ticket, so the pull request stays reviewable.

### How do I know the work is done?

The pull request carries the evidence, not only the diff. Here that means the test fails when the fix is reverted, so a reviewer can confirm the result without reproducing the work locally.

### How much oversight does this need?

None is required before the run starts. Every claim this ticket makes can be checked by machine, so the agent works straight through and a person reviews the finished pull request like any other.
