In plain words
Feature flags let software teams turn features on or off. Once a feature has fully rolled out, its old flag and the code around it can become extra work to remove, especially when the flag is linked to code across many files.
The paper presents a DoorDash system that checks the live flag value, asks an engineer to confirm it, then edits code, updates tests, and prepares a pull request.
In 50 recent Kotlin-repository cleanups, 45 pull requests were accepted outright or after minor fixes; five needed significant correction.
The research
DoorDash reported 1,659 stale feature flags across about 623 repositories as of May 2026. The code for a flag can be spread across files, and the value currently used in production may differ from the default in the code. How can cleanup remove the linked code while using the correct value?
A DoorDash system checks live flag values, gets engineer confirmation, then coordinates code and test edits to prepare cleanup pull requests.
The DoorDash system checks a stale flag’s live production value, searches for its code references, and asks an engineer to confirm the proposed value before editing. Removal agents then update code and tests, validate the changes, and prepare pull requests. The confirmation step matters because the production value can differ from the code default.
In the authors’ review of 50 recent removals in Kotlin-based DoorDash repositories, 45 pull requests were accepted immediately or after minor fixes, while 5 required significant engineer correction. The authors also found that 22 of 26 cases they later classified as complex produced usable pull requests.
These outcomes show the system handled many evaluated cleanups, though complex cases more often needed revision or intervention.
The evaluation covered 50 recent removals in Kotlin repositories at DoorDash, with each flag processed once. The authors note that reruns could produce different outcomes, and results may not carry over to other languages, flag frameworks, or codebases.
Analysis
Deep
- Original paper authors
- Atharv Chandratre, Jai Datar
- Submitted to arXiv
- License
- arXiv non-exclusive