Jump to content

Gatekeeping Dead Feature Flags

↳ Photo: StartupStockPhotos · Pixabay

Uber’s cleanup pipeline combines AI agents, rule-based rewrites and CI, then sends each change through separate checkers before the owning team signs off.

Reported by Prompt & Verdict News · 2 min read

Before any AutoClean change reaches the owning team, it has to clear a set of static checks and then four separate reviewers inside CodeCourt, an agentic validation layer. Each reviewer looks at one property alone: that nothing was added, that semantics are intact, that the change hasn’t drifted from its intent, and that no agent debris is left behind. If any of them fails, the change is abandoned.

The system is Uber’s, and according to InfoQ it has been used across the company’s monorepos to remove more than 16,000 stale feature flags along with over 1 million lines of code. It mixes AI agents, deterministic code transformations, continuous integration and independent validation, and hands finished work to people for review.

Feature flags let teams stage a rollout or back one out quickly. When a rollout ends, the branching logic, config fields, parameters and tests tied to the flag tend to linger. Uber argues that this residue complicates upkeep and testing, and it also widens what an AI agent must read when working on nearby tasks.

AutoClean reads from Uber’s flag management system to identify flags deemed safe to delete. A cleanup agent then searches and edits the code, calling PolyglotPiranha, Uber’s structural code transformation engine, over the Model Context Protocol. The agent replaces each flag with its permanent value and traces that value through callers, parameters and conditionals. Simplifying booleans and conditionals is left to PolyglotPiranha’s deterministic logic, so the model does not alone decide on rewrites that could change behavior. InfoQ’s summary frames the split this way: static tools do deterministic rewriting well, while AI earns its keep on propagation decisions.

↳ Exhibit C / Coding AidsGoogle Widens Phone Checks for Locked Accounts

↳ Photo: Kavali Chandrakanth KCK · Wikimedia Commons

The edit then goes to CI. When builds or tests break, AutoClean routes the failures to fixers, trying deterministic repairs before agent-based ones. Each fixer has narrow permissions. A test-focused fixer may modify only test files and must leave production code alone. Uber’s reasoning is that this stops an agent from forcing a failing test to pass by changing the behavior the test exists to check. The repair-and-CI loop runs until the change passes or reaches its attempt limit. Uber calls CI the source of truth for the change.

Two software engineers commented on a LinkedIn discussion that InfoQ cites. Muhammad Ali Akbar wrote that the CI-as-source-of-truth approach “is what sold me.” Deepanshu Udhwani pointed to the gap between passing tests and staying within a cleanup’s intended scope: “No intent drift is a different check than no regression.”

Uber states that a human reviewer still decides whether a flag is ready to be removed. AutoClean handles the investigation, rewriting, repair and validation stages, but that judgment stays with the team responsible for the code.


Source: InfoQ

Case file
On the record
Filed
Fri 4 Dec · 16:33
Reading
2 min
UberAI coding agentsFeature flagsCode refactoringMonorepo
Pass it on
Next case

More cases

Comments

Comments appear publicly under your name.
    The verdicts by email

    Send me the verdicts.

    Happy to. The newest cases from every exhibit, by email. Where should it go?