Topic · Regression

Why do the same bugs keep coming back in our codebase?

Proof does. Pin the class with a requirement and a reproducer that fails without the fix. PITest, Sentry, SonarQube, CODEOWNERS notice a recurrence. None of them shut the door.

proof audit --check tests_pass

Keep the quality gate. A green gate is not a pin.

01 · An unpinned door

A recurring bug is a class of defect with no permanent assertion.

Someone fixes the symptom, the ticket closes, the code moves on. Three releases later a refactor, a merge, or an agent touching the same area re-opens the exact partition, because nothing in the tree was standing guard over it.

BUG FIXED symptom patched CODE MOVES ON refactor · merge · agent SAME BUG BACK door re-opened REQUIREMENT + RED REPRO pinned in CI, fails without the fix this is the guard that is missing
Mutation testing, Sentry issue states, and quality gates notice the reappearance downstream. A pinned reproducer tied to a requirement blocks re-entry at the gate.

The fix

  • Ticket closed
  • Coverage still green
Symptom patched

The class

No requirement. No reproducer that fails without the fix.

Door open

The fix

Three releases later the partition is back.

Walked back in

Proof

  • Pin requirement + red reproducer
  • Gate fails without the fix
KI stays in CI

Same bug. Two endings. Click the tabs.

02 · The pin

Leave a requirement and a reproducer that fails without the fix.

Then the next change that re-opens the partition turns the reproducer red before it merges — not after a user files the ticket again. On the public jsonparser ledger this is a real entry, not a diagram:

KI-3 · Set() / array-index path under an object parent          status: fixed
expected     Set writes the value at the addressed path
observed     malformed JSON output on array-index paths under object parents
reproducer   set_spec_test.go · // Reproduces: KI-3 · red before the fix, green since
retest       fixed and pinned; the reproducer stays in CI as a regression test

The affected code carried 100% MC/DC when the defect shipped. Coverage of the code that existed said nothing about the partition nobody specified. That is why the pin is a requirement plus a reproducer, not a coverage number. Full case: jsonparser.