DEVOPS

Scan repo for flag references with no matching flag record

Greps the GitLab repo for flag-check call sites, compares them to the live flag registry in Postgres, and reports orphaned references and registry entries with zero code usage.

CategoryDevOps
Enginesim
Difficultyadvanced
Triggerschedule
Steps6
Setup~25 min

How it runs

The automated pipeline, trigger to output.

  • TriggerWeekly schedule
  • ActionClone repo and grep flag call sitesShell
  • ActionFetch registered flag keysPostgreSQLPostgres
  • LogicDiff code vs registry into buckets
  • ActionOpen GitLab triage issueGitLabGitLab
  • OutputSummarize counts in SlackSlack

What it does

Reconciles your code against your flag registry. It scans the repository for every feature-flag evaluation call site, compares the set of keys found in code to the keys in your Postgres flag table, and flags two failure modes: code referencing flags that no longer exist, and registry flags that nothing in code reads.

When to use it

Use it when you suspect drift between what your flag service knows about and what the code actually checks. Orphaned references throw at runtime; unread registry flags are pure debt. This finds both before they bite.

How it works

  1. 1A weekly schedule starts the reconciliation.
  2. 2A shell step clones the repo and greps for the flag-evaluation pattern, emitting the set of referenced flag keys with file and line.
  3. 3A Postgres query returns the full set of registered flag keys.
  4. 4A logic step diffs the two sets into orphaned-in-code and unread-in-registry buckets.
  5. 5A GitLab action opens a tracking issue listing both buckets for triage.
  6. 6A Slack post summarizes counts and links the issue.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect GitLabRepos, MRs, pipelines, registry.
  2. 2
    Connect PostgresAny Postgres URL — query, write, migrate.
  3. 3
    Connect ShellRun sandboxed commands inside the workspace.
  4. 4
    Connect SlackChannels, DMs, threads, mentions.
  5. 5
    Set each agent's modelWe leave models unset so you pick the tier — fast + cheap, or top-quality.
  6. 6
    Tune it to your dataEdit the prompts, filters, and field mappings so it matches how your team works.
  7. 7
    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.