Two-layer defense for AI PR review
In AI code review, green checkmarks are supposed to mean safe to ship. This is the story of a routine change that passed every check — and still broke every user. The question the rest of this deck answers: what actually earns trust when the tests go green?
During implementation, python_check verified syntax before committing locally. Then a shadow environment confirmed the CLI actually launched.
Verified, credible confidence — before we break it.
python_check to verify syntax, then commit locally before shadow testingamplifier --version and amplifier --helpamplifier --version returns outputA routine change shadow-tested 11/11 tests passed and was pushed to production as commit 87e42ae. Users updated and crashed — they could not start sessions.
Every check was green. So how did this happen?
Testing must match how a real user encounters the feature — a realistic scenario from the user's perspective, not just that the CLI starts.
The pivot: harden both sides of the defense.
The static side hardened around the design claim: if "X is overridable" is the claim, test the override — and review adversarially every time.
That stops false confidence at the source. Now the dynamic side.
It installs the changed code from source and runs an actual amplifier run against the bundle — not a launch-only check.
Real user behavior, exercised. Now, who grades it?
The amplifier-smoke-test agent runs SEPARATELY from the operator for unbiased verification: "Don't trust claims — verify with evidence." It scores a 100-point rubric before push approval.
An unbiased verifier is what makes green mean green.
After the regression, the missing pattern was found in under 30 minutes and users were unblocked within 1 hour — then the gap was folded into an updated checklist.
Turn each escape into a permanent guard.
Data as of: Feb–Mar 2026 (git history). Feature status: Present and active in microsoft/amplifier-foundation (v1.0.0) — two-layer defense codified across ISSUE_HANDLING Phases 4–6. Active
Primary sources: microsoft/amplifier-foundation (co-primary) and microsoft/amplifier-bundle-recipes.
Commands run (independently re-verified):
grep -nE 'python_check|Commit locally' amplifier-foundation/context/ISSUE_HANDLING.md — deterministic syntax gate (lines 133/134/458)grep -nE 'amplifier --version|amplifier --help|CLI tools respond' …shadow-tests.md …smoke-test.md — CLI launch checkssed -n '226,300p' amplifier-foundation/docs/ISSUE_CASE_STUDIES.md — "11/11 tests passed", commit 87e42ae, "Cannot start sessions"git cat-file -t 87e42ae → commit (dated 2026-01-15 22:14:56)grep -nE 'run SEPARATELY|Validation Rubric|Total >= 75' …amplifier-smoke-test.md — 100-point rubric, PASS ≥ 75sed -n '341,363p' …ISSUE_CASE_STUDIES.md — "<30 minutes", "unblocked within 1 hour"git log --format='%an' … → 24 commits, sole author Brian KrabachGaps (disclosed): No explicit ruff invocation is configured in this repo (pyright is, at pyproject.toml line 72); "python_check" is a named gate whose exact commands are not defined inside amplifier-foundation. No single PR number literally passing static+launch checks then breaking was found beyond the documented P0 case study.
Primary contributor: Brian Krabach (24/24 commits across these files).