aislop.day
FRIDAY, 22 MAY 2026

Findings Concerning Unused Feature Flag

The feature flag was created for a safe rollout in March. It is now August. The feature shipped fully in April. The flag is still in the code.

4 MIN READdeveloper life

The feature flag was created in March.

Its purpose: to allow the feature to be enabled for a percentage of users, allowing rollout to be monitored before full release. This is a good practice. The flag was used correctly.

In April, the rollout was complete. The flag was set to 100%. All users see the feature. The flag has not been removed.

The Current State

The code contains a conditional: if feature_flag_enabled. The flag is enabled for 100% of users. The conditional is always true. The false branch is never executed.

The false branch is the original behavior before the feature existed. It is correct code. It is also code that runs on zero percent of executions.

Why It Was Not Removed

Removing the flag requires: identifying all places the flag is checked, removing the conditional logic in each place, removing the configuration entry, and testing that the removal did not introduce any regressions.

This is a fifteen-minute task with low risk. It was not done when the rollout completed because the rollout was the priority and cleanup was the follow-up. The follow-up was added to the backlog. The backlog moved on. The flag persisted.

The Flag's Current Function

The flag is now documentation. Its presence in the code says: this feature was introduced gradually and was once optional. This is accurate historical information that is not available anywhere else.

It is also technical debt. It adds a conditional that clutters the code path. It could be misread as meaningful by a future developer.

The Resolution

The flag will be removed during the next cleanup sprint. The cleanup sprint is scheduled for next quarter. The flag will be there when the sprint arrives. The sprint will remove it.

Until then, the flag is at 100% and conditions everything correctly and costs one line per check.

TAGSdeveloper life
Share this