From Incident to Failing Build: Incident-Derived Regression Testing for AI-Agent Guardrails
Preprint — not peer reviewed. Self-published. Measured results are reproducible from the companion code.
Abstract
The 2024–2026 period produced an abundance of AI-agent failure taxonomies and a steady supply of agent-security benchmarks. It also produced a steady supply of actual production failures: a customer-service agent inventing a refund policy its operator was held to, a coding agent dropping a production database during an explicit code freeze, an agent loop billing tens of thousands of dollars before anyone noticed. These two bodies of work barely touch. The benchmarks are large, sophisticated, and authored — scenarios written to exercise a threat model. The incidents are real, attributable, and inert: they live in press coverage and incident databases, where they inform nobody's build. We connect them. We contribute (1) a corpus of ten publicly documented agent production failures spanning six failure classes, each normalised to a replayable scenario with a decision-time plane separated from adjudication, and each carrying its cited public sources; (2) a reference guard chain of five deliberately minimal controls, offered as an honest baseline rather than a product; (3) a CI gate that replays the corpus against a guard configuration and fails the build on any escape; and (4) a measured ablation study (E1–E4, deterministic and exactly reproducible). The study finds: an unguarded configuration reproduces all ten incidents and the reference chain contains all ten; four of the five guards are each the sole container of exactly one failure class, a 1:1 necessity partition with no redundancy to trade away; of the 31 non-empty guard subsets exactly two are sufficient and exactly one is minimal, at size four, with the fifth guard load-bearing in no minimal chain — an honest null we report rather than bury; and, most consequentially for practice, configuration drift is indistinguishable from guard deletion: widening one trust list to admit tool output readmits precisely the two incidents that deleting that guard readmits, while a budget guard built from two ceilings in disjunction masks drift in either one for as long as the other still binds, so a CI assertion on one parameter reports green across a real loss of containment. The corpus is small — ten incidents against benchmark suites two orders of magnitude larger — and we argue the axis it competes on is provenance and consequence, not scale.
Keywords: AI agents, guardrails, regression testing, incident analysis, agent safety, continuous integration, prompt injection, site reliability engineering
Cite
@techreport{baby2026incident,
title = {From Incident to Failing Build: Incident-Derived Regression Testing for AI-Agent Guardrails},
author = {Ajin Baby},
year = {2026},
institution = {cloudandsre.com},
type = {Preprint},
url = {https://cloudandsre.com/research/incident-derived-regression-testing/}
}