Testing and reliability

Every AI change breaks something: how to stop the regression cycle

A practical regression-control workflow for AI-built software, with a permissions example, release checklist and evidence to retain.

Stop recurring regressions by defining expected behaviour before editing, reproducing failures as tests and reviewing small changes against critical customer journeys. A passing build is one check; it is not evidence that existing behaviour survived.

Reproduce → Protect → Change → Verify: Every AI change breaks something: how to stop the regression cycle
CodeSignOff Fieldnotes · Testing and reliabilityDownload banner ↗

Why a successful fix can break yesterday’s feature

A founder sees the same loop: a generated patch resolves one bug, a demo passes, and a different customer journey fails after deployment. The immediate temptation is another prompt. Before adding another patch, establish whether the team has a stable description of correct behaviour. A build can succeed while an access rule changes, a payment retry repeats work or a saved setting disappears. The proposed workflow below is our practical release discipline, not a claim that any particular AI model causes every regression.

Start with one failure that you can reproduce

Choose the most consequential recent regression. Write down the role, starting data, action, expected result and observed result. Run that sequence on the affected revision. If it fails only in production, investigate configuration and data differences before concluding the code is correct locally. Turn the reproduction into an automated check where practical; otherwise preserve a repeatable manual procedure. A useful check must fail on the broken version, or it has not demonstrated that it detects this problem.

Illustrative example: a role change that leaks an export

Imagine a SaaS product where a change to administrator reporting also lets a standard member export another workspace’s records. This is an illustrative scenario, not a client incident. A test that only checks whether an administrator can download a CSV misses the boundary. Add a second workspace, a standard member and records with unmistakable ownership. Test the HTTP endpoint directly as well as the interface. A hidden button is not an access control. Confirm that denied requests return no protected rows and do not create an accessible export in background storage.

Keep the patch small enough to judge

Separate the permission correction from unrelated cleanup. A reviewer should be able to explain which decision changed and why it fixes the reproduction. If the assistant proposes edits to authentication, billing and routing for one export defect, investigate that spread before accepting it. Check the affected module’s callers and background workers. NIST’s SSDF treats security work as part of development and includes responding to vulnerabilities; our application here is to preserve evidence of the failure, correction and follow-up checks rather than treating the generated patch as the conclusion.

Use a release checklist with observable outcomes

Assign an owner to each check and record the revision tested. Expand the set according to the affected features; this is a starting point, not a complete security assessment.

  • The original reproduction fails before the patch and passes after it.
  • Allowed and denied actions are checked for more than one role and account.
  • Related customer journeys still work, including failure and retry paths.
  • The deployment configuration matches the environment used for verification.
  • The rollback procedure accounts for any database or external side effects.

Know when to stop patching and review the structure

If each correction touches many unrelated areas, the underlying boundary may be unclear. Record which modules repeatedly change together and which rules are duplicated. That evidence helps distinguish missing tests from a design problem. Do not judge improvement by the number of generated tests: watch whether previously seen failures recur and whether release evidence is reproducible. OWASP’s testing guide provides a security-testing reference; your product requirements must still define correct business behaviour. If your team cannot explain the affected boundaries, scope an independent code assessment before the next high-stakes release.

Sources & further reading

Reference material for the guidance and examples above. Where included, community discussions provide context rather than verified incident evidence.

Prepared with AI assistance using the official references below. Worked examples are illustrative, not client case studies. The practical checklists are CodeSignOff editorial guidance, not certification criteria.

About CodeSignOff Editorial

CodeSignOff Editorial publishes engineering guidance for founders evaluating AI-built software. CodeSignOff is a product of Avi Root Info Solutions, led by Shekhar Juneja, whose software career began in 1998 and includes architecture for UK mortgage and credit-rating systems. This organisational byline does not indicate a personal review of this article by Shekhar.

Engineering background and editorial approach · Shekhar’s professional profile ↗

Evidence to take into your own review

Define the code revision and scope. For each finding, record the affected flow, the steps that reproduce it, its business consequence and the evidence for the next action. After a fix, repeat the check and record what remains uncertain. An audit delivers a verdict; remediation and verification are separate steps.

This article is general engineering guidance. It does not establish the security or compliance of your application. Contact us with a correction or a question about the guidance.

Continue reading

← Back to all insights
A clear next step

Put these questions to your own codebase.

Tell us what you’re building and what’s coming next.
We’ll help you scope the right review.