# Lights-out for AI coding agents: Gemini, ADK and a canary that rolls itself back

DevFeed: [Lights-out for AI coding agents: Gemini, ADK and a canary that rolls itself back](<https://devfeed.tech/articles/lights-out-for-ai-coding-agents-gemini-adk-and-a-canary-that-rolls-itself-back-131170.md>)

Original publisher: [Read original article](<https://medium.com/google-developer-experts/lights-out-ai-coding-agents-gemini-adk-canary-rollback-36ac910de522?source=rss----a67bd6fa7d58---4>)

Author: Nicola Guglielmi

Published: 2026-11-12T15:44:05Z

Content type: article

Language: en

Sources: [Google Developer Experts](<https://devfeed.tech/sources/google-developer-experts-medium.md>)

Topics: [Loop Engineering](<https://devfeed.tech/topics/loop-engineering.md>), [google-adk](<https://devfeed.tech/topics/google-adk.md>), [CI/CD](<https://devfeed.tech/topics/cicd.md>), [canary release](<https://devfeed.tech/topics/canary-release.md>), [Deployment Strategies](<https://devfeed.tech/topics/deployment-strategies.md>), [Multi Agent Systems](<https://devfeed.tech/topics/multi-agent-systems.md>), [Static code analysis](<https://devfeed.tech/topics/static-code-analysis.md>), [Pull Request](<https://devfeed.tech/topics/pull-request.md>)

Tags: [adk](<https://devfeed.tech/tags/adk.md>), [agents](<https://devfeed.tech/tags/agents.md>), [ai](<https://devfeed.tech/tags/ai.md>), [ai-agent](<https://devfeed.tech/tags/ai-agent.md>), [ai-coding-agents](<https://devfeed.tech/tags/ai-coding-agents.md>), [canary](<https://devfeed.tech/tags/canary.md>), [devops](<https://devfeed.tech/tags/devops.md>), [error](<https://devfeed.tech/tags/error.md>), [gemini](<https://devfeed.tech/tags/gemini.md>), [google-cloud-platform](<https://devfeed.tech/tags/google-cloud-platform.md>), [mutation](<https://devfeed.tech/tags/mutation.md>), [production](<https://devfeed.tech/tags/production.md>), [pull-request](<https://devfeed.tech/tags/pull-request.md>), [rollback](<https://devfeed.tech/tags/rollback.md>), [software-engineering](<https://devfeed.tech/tags/software-engineering.md>)

## AI overview

Lights-out moves a ticket from code changes to a staged canary using six agent roles, with scripts--not models--making GO/NO-GO decisions from numeric gates. PR checks include risk, secrets, dependencies, static analysis, tests, and mutation testing; post-merge, a signed image is deployed to 5% then 25% of traffic, with PromQL comparisons triggering automatic rollback. A person must approve promotion beyond 25%. It runs locally with Podman and recorded model responses, or live with a Gemini API key; its gates and deployment path remain active in either mode. Coding roles use Gemini CLI by default, while document roles use ADK with evals; Claude and OpenAI options are described, and a Claude change was blocked by the mutation threshold. The Google Cloud profiles are documented but untested, and the project says its approach is not yet proven on repositories outside its own.

## Source excerpt

What I learned putting six agents behind numeric gates, on a laptop, with no cloud account An agent opens a pull request on a codebase nobody on the team trusts. The tests are green. Now what? Do you merge it? Do you read every line? Do you let it reach production, and if so, who notices when it breaks? A lights-out factory runs in the dark because its safety systems are trusted. I wanted to know what that safety system looks like for AI coding agents that write and ship code, so I built one: lights-out. It takes a ticket all the way to production with six agent roles, and stops it at every point where a number says no. One human decision is left, before 100% of the traffic. Everything else is either a gate or a rollback. Reading every line doesn't scale when an agent can write a thousand of them before lunch. So I stopped trying to check the code and started designing the road it drives on: which files a ticket may touch, which numbers a change has to beat, how much real traffic a canary gets before a person looks at it. The agents pick the route, the guardrails decide where it can end up. My job moved from reviewing lines to choosing thresholds, and writing down where each one comes from. It runs complete on a laptop: no cloud account, no API key, no credit card. That constraint shaped most of the design, so I'll come back to it. The rule that comes first The model never decides whether a change is good. A number does. Every station in the pipeline is a script that prints exactly one line on stdout: GO: <name> or NO-GO: <name> -- <reason>. Tests, dependency advisories, static analysis, mutation score, the canary's error rate against stable. The agents write code, review it, explain a release and triage an alert. They never sit where a threshold sits. Written down it sounds obvious. In practice it's the first thing that erodes, because asking a model "is this canary healthy?" is easier than writing the PromQL query. So it became a rule with a check behind it, and ev