Skip to content

Feature flag rollouts

When a pull request ships behind a feature flag, Rimfe holds the public docs change until the flag is released, so the docs never describe a feature most users cannot see. It finds flags from LaunchDarkly, Unleash, PostHog, GrowthBook, Statsig and other SDKs in the code, and learns each rollout from a signed webhook your flag tool sends.

Updated

How it works

  • A pull request merges with a change behind a flag. Internal docs update on merge as usual.
  • The public docs patch for it is held and listed under Held public patches on the repository's History tab, with the flag as the reason.
  • Your flag tool reports the rollout to Rimfe. When the flag reaches the rollout threshold in production, 100% by default, the patch is released.
  • If the flag drops back below the threshold, new docs for it are held again and the audit log records the roll-back.
  • Changelog entries Rimfe drafts leave out pull requests whose flags are not released.
Docs drift history for a repository

How Rimfe finds the flag

  • Flag calls in the pull request's added lines, in any language: LaunchDarkly, Unleash, PostHog, GrowthBook, Statsig, Flagsmith, Split, OpenFeature, Optimizely, ConfigCat, DevCycle, Django waffle, Flipper and similar SDKs.
  • Flag reads in changed JavaScript and TypeScript files, including keys held in constants and useFlags().key.
  • Flags that already gate the changed code elsewhere in the repository, found through the code graph.
  • Your own flag functions and env var flag prefixes, once you declare them under product.flags in .rimfe.json.

Send rollouts to Rimfe

Under Settings, Integrations, Flag rollouts, the workspace owner creates a signing secret and copies the URL. Send this JSON from your flag tool's webhook or automation each time a flag's rollout changes. environment and targeting are optional; leave out environment only for production. Set targeting to segments when the flag is on only for chosen users or accounts, such as staff or beta testers. Rimfe counts that as 0% public.

rollout.json
{  "repository": "acme/backend-api",  "flagKey": "new-billing",  "percentage": 100,  "environment": "production",  "targeting": "everyone"}

Signing and responses

Send X-Rimfe-Timestamp with the current Unix time in seconds, and X-Rimfe-Signature with sha256= followed by the hex HMAC-SHA256 of <timestamp>.<body> using the secret. Requests more than five minutes off are rejected.

StatusMeaning
200The rollout is recorded.
400The body does not match the format.
401Bad signature or old timestamp.
404Rimfe does not know the repository.
413The body is over 16 KB.
429Too many requests.

Release policy settings

SettingWhat it does
Rollout thresholdThe percentage a flag must reach before its public docs go out. 100 by default.
Flag with no rollout reportedHold public docs (the default) or publish them.
Flags to ignoreKill switches and ops flags that never hold docs, such as kill-* or ops.*.
Production environmentRollouts in other environments never release public docs.

Without a webhook

You can still use flag holds without connecting a flag tool. Choose Mark released on a flag once it is on for everyone, or Mark not released to hold new docs for it again. Any held patch can also be published by hand with Publish now.

Plans and limits

  • Feature flag holds and the rollout webhook are not limited to a plan.
  • Rimfe reads flags from code. It does not call your flag tool's API, so it learns rollouts only from what you send.
  • A flag your code reads in a way the list above does not cover is missed unless you declare it in .rimfe.json.
  • Holds apply to public docs. Internal pages always update on merge.
  • The webhook-only events patch_held, patch_released and flag_rolled_back can tell your own systems what happened.

Try it on your next pull request.

Free for public repositories, with unlimited members.

Start free with GitHub