Series-A SaaS — PR cycle and CI flake cleanup
⚠️ This is an anonymised scenario narrative. It illustrates the shape of an engagement. It is not a real client story and contains no real names, metrics, or claims about a specific company.
The problem
The team had been using an AI coding assistant in the editor for about six months. Velocity looked healthy on the dashboards, but two things kept nagging:
- PR cycle times had drifted up. Time-to-first-review had roughly doubled over the previous quarter.
- CI was flaky in a way no one could pin down. Engineers learned to click “rerun” and stopped trusting the red.
A semi-technical founder suspected AI-generated code was part of the story but did not have the evidence to act on it.
What we did
Express audit (2 working days)
Read-only access to the repo, CI configs, retros, and two weeks of incident logs. One short interview with the tech lead.
Findings, in priority order:
- AI-generated PRs were skipping the existing test suite on about a third of merges. The CI config had an opt-out branch that was being used as a shortcut.
- Several “AI fixes” introduced dependencies without the lockfile getting updated, leading to inconsistent local builds.
- The review template did not require evidence of a local run, so reviewers had nothing to anchor on.
Delivery sprint (10 working days)
- Fixed the CI opt-out so it required an explicit override comment.
- Added a pre-commit hook that fails on lockfile drift and on missing test runs.
- Rewrote the PR template to require a “how I tested this” line and a screenshot or log excerpt.
- Paired with three engineers on their next AI-assisted PRs. Reviewed the rest.
The result (qualitative)
- PR cycle times came back down inside the sprint. We did not measure a percentage because the baseline was noisy — but the team noticed.
- CI flakes dropped from a daily complaint to an occasional one.
- Engineers stopped hitting “rerun” as a reflex.
- The tech lead kept the PR template changes after the sprint ended.
[See the AI Delivery Audit page for the format that started this engagement.]