DEVOPS

Stale Feature Flag Harvester: Open GitLab Removal MRs Past Kill-Date

Weekly scan of your flag registry for flags whose kill-date has passed, then auto-opens a GitLab merge request that strips each stale flag's conditional branches from the code.

CategoryDevOps
Enginesim
Difficultyintermediate
Triggerschedule
Steps5
Setup~15 min

How it runs

The automated pipeline, trigger to output.

  • TriggerWeekly schedule fires the flag scan
  • ActionQuery flag registry for kill-dates in PostgresPostgreSQLPostgres
  • LogicFilter to flags past kill-date and still active
  • ActionGenerate removal patch and open MR per flagGitLabGitLab
  • OutputPost cleanup digest to SlackSlack

What it does

Reads your feature-flag registry, finds every flag whose configured kill-date is now in the past, and for each one opens a GitLab merge request that removes the flag's dead conditional branches. It posts a digest to Slack so the owning team sees the cleanup queue.

When to use it

Run this when flags accumulate faster than teams remove them and your codebase is littered with `if (flags.x)` branches that resolved months ago. Best for teams that tag each flag with an explicit kill-date and want the removal toil automated rather than nagged.

How it works

  1. 1A weekly schedule fires the harvester.
  2. 2It pulls the flag registry from Postgres and filters to flags whose `kill_date` is earlier than today and still marked active.
  3. 3For each stale flag it searches the GitLab repo for references, generates a patch that deletes the flag guard and keeps the live branch, and opens an MR assigned to the flag owner.
  4. 4A branch checks whether any stale flags were found.
  5. 5It posts a Slack summary listing the new MRs, owners, and how long each flag was overdue.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect PostgresAny Postgres URL — query, write, migrate.
  2. 2
    Connect GitLabRepos, MRs, pipelines, registry.
  3. 3
    Connect SlackChannels, DMs, threads, mentions.
  4. 4
    Set each agent's modelWe leave models unset so you pick the tier — fast + cheap, or top-quality.
  5. 5
    Tune it to your dataEdit the prompts, filters, and field mappings so it matches how your team works.
  6. 6
    Test, then turn it onRun once against a sample, confirm the output, then enable the trigger.

Run this workflow in your colony.

14-day trial. No DevOps. No Sales call. Provisioned in under a minute.