liveBook · Manning

Regression

As explained in Vibe Engineering

A regression is an unintended loss or degradation of previously correct software behavior.

A regression is an unintended loss or degradation of previously correct software behavior. Performance work makes the risk visible: a change intended to accelerate AccountFinder can instead increase runtime substantially. section 7.1.2 section 5.3.2

Treat regression prevention as an evidence and ownership problem:

  • Benchmark competing implementations under representative data sizes rather than trusting a simple parallelization change. section 7.1.2
  • Compare results as well as timing; the benchmark verifies that alternative methods return consistent results. section 7.1.2
  • Keep deterministic checks as the real gate and use AI review as advisory coverage, not independent verification. section 5.3.2
  • Assign narrowly scoped detectors to accountable owners, such as a platform team for performance regressions. section 5.3.2

When optimization becomes regression

AccountFinder's custom benchmark measured single-threaded execution at 25 ms, parallel streams at 63 ms, concurrent execution at 30,398 ms, and an optimized variant at 406 ms. The intended performance improvement produced slower implementations, so the benchmark exposed the regression before deployment. section 7.1.2

Listing 5.4 Pre-commit hook example
#!/bin/bash
# .git/hooks/pre-commit
set -euo pipefail
 
DIFF=$(git diff --cached)
[ -z "$DIFF" ] && exit 0
 
# Deterministic checks block. This is the real gate.
gitleaks protect --staged --redact || exit 1
 
# The model advises. It cannot block on its own.
VERDICT=$(printf '%s' "$DIFF" | claude -p "Review this diff against our
conventions: error handling, test coverage for new public functions,
naming. Reply with exactly one line of JSON and nothing else:
{\"verdict\":\"clean\"} or {\"verdict\":\"concerns\",\"notes\":\"...\"}")
 
if [ "$(printf '%s' "$VERDICT" | jq -r '.verdict')" = "concerns" ]; then
    echo "AI reviewer raised concerns (advisory, not blocking):"
    printf '%s' "$VERDICT" | jq -r '.notes'
fi
exit 0

Use the pre-commit pattern to separate blocking deterministic checks from advisory model feedback when guarding changes against regressions. section 5.3.2

How Vibe Engineering covers it

How deep it goes
Demonstrates detection through benchmarks and review gates, but stops short of a general taxonomy or formal regression-testing method.
Examples
Uses AccountFinder concurrency variants, custom timing results, JMH benchmarks, and Git-based AI review hooks.
What it assumes
Assumes familiarity with Git changes, automated tests, Java concurrency, and benchmark measurements.
What you can do after
Diagnose regressions by combining deterministic gates, scoped review, result-consistency checks, and representative performance benchmarks.
How it connects
Connects regression with performance engineering, benchmarking, code review, automated testing, security review, and API compatibility.

Also explained in

Compare how 11 books explain regression →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Vibe Engineering. The section links point to the parts of the book it draws on.