Pass the menu and read the page

SignupFolio

3 version formats a mobile flag rule must handle

Why version rules matter for a signup rollout

A new signup or onboarding step is rarely a small change for a mobile team. It may ask for a new field, change the order of screens, or depend on an API that only newer app builds know how to call. That means you often cannot show the step to everyone on the same day. You need a rule that says, in effect, "this step is for users on these app versions, and not for the rest."

Version targeting is the tool for that job. PostHog's documentation describes the use case directly: feature flags are especially useful for mobile apps where you want to roll out features to users on specific version ranges, such as enabling a feature for everyone on version >= 2.0.0 or targeting a bug fix at versions < 1.5.0. Those two examples show the basic pattern. One rule sets a floor, another sets a ceiling, and together they describe a band of builds.

The trouble is that a version rule is only as good as its reading of the version string. Mobile apps report versions in more shapes than most people expect. A rule that works for the builds you tested can quietly miss builds you did not think about. When that happens, the failure is hard to see. Some users never get the new step, some get it on a build that cannot finish it, and nobody sees an error.

This post covers three version formats that a mobile flag rule has to handle with care. The first is a two-part version such as 3.10. The second is a zero-padded version such as 3.08. The third is a version with a pre-release or build suffix, such as -alpha.1 or +build.7. Before those, it helps to start with the baseline: the plain three-part version many teams use.

Start with the plain three-part version

The simplest format is three numbers separated by dots, such as 2.0.0 or 1.5.0. These are the versions in the PostHog example above. A rule that says "version is at least 2.0.0" or "version is below 1.5.0" is a comparison between versions, not between pieces of text. That distinction matters, and it is the reason the other two formats need extra attention.

When you write a rule with three-part versions, pick the boundary build on purpose. Find the exact build where the new step first becomes safe to show, and start the rule there. Then check whether that build really is the first one with the needed code. Teams often copy a version number from a planning document, and the document can be out of date. A quick check of the build history will save you a rollout you have to undo.

It also helps to write the rule in plain words before you enter it into a flag. For example: "Show the new onboarding step to users on version 2.0.0 or later, and hide it from users on any earlier version." If you cannot say the rule that way, it is probably not ready. A plain sentence also helps a product manager, an engineer, and a support person agree on what the rule should do.

Format one: two-part versions like 3.10

Some apps report only two numbers, such as 3.10. The release process may leave off the patch number, or an older build may have used a shorter form. Your rule may be written with three parts, such as 3.10.0, so the question is whether the two forms are treated as the same version.

Version formatExampleRule in plain wordsSource
Three-part floor2.0.0Enable feature for everyone on version >= 2.0.0PostHog
Three-part ceiling1.5.0Target a bug fix at versions < 1.5.0PostHog
Two-component version3.10Normalized to 3.10.0 during server-side evaluationPostHog
Text comparison risk3.10 against 3.8.0Plain text ranks 3.10 below 3.8.0General string comparison
Test casetwo-part on each sideConfirm each test build gets the expected answerThis article's guidance

PostHog's documentation says that during server-side (remote) flag evaluation, two-component versions like 3.10 are automatically normalized to 3.10.0. That is useful, because you do not have to write a separate rule for every short form your app might send. Normalization does not remove the need to test, though. The documentation describes server-side evaluation, so if your team evaluates flags somewhere else, do not assume the same result. Check the path your app actually uses.

The other risk with two-part versions is ordering. A plain text comparison can rank 3.10 below 3.8.0, even though 3.10 is the newer release. If a rule compares version strings as text, a newer build can appear older, and a user can be sent to a step their build cannot finish.

To guard against this, write a small set of test cases before you ship. Include at least one build with a two-part version and one with a three-part version on each side of your boundary. Confirm that each test build gets the answer you expect. If one does not, do not ship yet. Fix the comparison or the normalization first, then test again.

Format two: zero-padded versions like 3.08

Some build systems pad each number with a leading zero, so a release may appear as 3.08 instead of 3.8. This happens when a pipeline formats version numbers with a fixed width, or when someone types the version by hand and copies the padded form. The two strings look close, but a rule that matches one exactly may not match the other.

Version formReported stringResolves toSource
Zero-padded3.083.8.0PostHog
Two-component3.103.10.0PostHog
Plain three-part2.0.02.0.0PostHog
Boundary floor&gt;= 2.0.0enabled for that rangePostHog
Boundary ceiling&lt; 1.5.0bug fix targetedPostHog

PostHog's documentation covers this case as well. It states that zero-padded versions like 3.08 are normalized to 3.8.0 during server-side evaluation. So the padded and unpadded forms are meant to resolve to the same version. For a growth lead, the practical question is not how the normalization works inside the tool. It is whether every build that should match your rule actually produces a version that resolves the way you expect.

The best way to answer that is to look at what your app sends. Pull the version string your mobile app reports for several recent builds, and note any that include leading zeros or a short form. Compare that list with the boundary in your rule. If your team pads version numbers, the padded builds may be a larger group than you think, and they may sit right at the boundary where a mistake costs the most.

Normalization is only one step. Your own code may parse the version string before it reaches the flag. If your app strips zeros, reformats the string, or sends a build label instead of a version number, the flag sees what your app sends, not what you intended. Test from the app, not only from a dashboard.

Format three: pre-release and build suffixes

The third format is a version with a suffix attached. A pre-release build might look like 2.0.0-alpha.1, and a build with a plus-sign suffix might look like 2.0.0+build.7.

Suffix typeExampleEffect on targetingSource
Pre-release-alpha.1Preserved in the valuePostHog
Plus-sign suffix+build.7Doesn't affect matchingPostHog
Beta tester build2.0.0-alpha.1Kept in on purpose by the teamThis article's guidance
Customer release build2.0.0Sees the step at the boundaryThis article's guidance
Two builds differing only in the plus-sign part+build.7Treated the same for targetingPostHog

PostHog's documentation notes that pre-release and build suffixes, such as -alpha.1 or +build.7, are preserved in the value, though the plus-sign part doesn't affect matching. Two things follow. First, the suffix stays in the version value rather than being dropped. Second, the part after the plus sign does not change which rule a build matches. Two builds that differ only in the plus-sign part of the version are treated the same for targeting.

Pre-release suffixes need a decision, not just a test. Ask whether beta testers should see the new step before the general release. If yes, the rule has to allow pre-release builds on purpose. If no, the rule has to exclude them, and you must make sure the exclusion does not also remove release builds that should see the step. Write the answer down, because the same question will return when someone asks why a tester sees a step and a customer does not.

A simple way to handle this is to name the pre-release case in your rule notes, with one example of each choice. For instance: testers on 2.0.0-alpha.1 are allowed in on purpose, while customers on 2.0.0 see the step once the boundary is reached. That sentence tells everyone what to expect, and it gives the test team a case to check.

Write the rule before you write the flag

The version rule is one part of the flag. The flag also has to exist in the tool before any code can use it. PostHog's documentation says that before you can evaluate a feature flag in your application code, you need to create it in PostHog. That sounds obvious, but it affects planning. A rollout that depends on a flag cannot start until the flag has been created, named, and given its rule.

A good order of work is to write the rule in plain words, list the version examples from the three formats above, and then create the flag. Give it a clear name that says which step it controls. Keep a short note in the flag description that explains the version band and why it exists. A rule with a reason attached is easier to review and easier to remove when the rollout ends.

A checklist for each version rule

Before a version rule goes live, a growth lead and an engineer can go through the same short list. It does not replace testing, but it catches the most common problems early.

Checklist itemExample or detailSource
Plain-words ruleShow step on version 2.0.0 or laterPostHog
Boundary checkedBuild history, not a planning documentThis article's guidance
Two-part version tested3.10 on each side of the boundaryPostHog
Zero-padded version tested3.08 normalized to 3.8.0PostHog
Pre-release decision written down-alpha.1 included or excluded on purposeThis article's guidance
Flag created before codeCreate the flag before evaluating itPostHog
  • The rule is written in plain words, and both people agree on what it does.
  • The boundary build has been checked against the build history, not only a planning document.
  • The rule has been tested with a two-part version, such as 3.10, on each side of the boundary.
  • The rule has been tested with a zero-padded version, such as 3.08, and the team knows whether the app ever sends that form.
  • Pre-release builds are included or excluded on purpose, and the choice is written down.
  • The plus-sign part of the version has been checked, so the team knows it does not change which users match.
  • The flag exists in the tool before the app code depends on it.
  • Anyone who can change the rule is named, and the team knows how changes will be announced.

Test with real builds, not only test accounts

A test account is useful, but it is not enough for a version rule. A test account usually runs one build, often the newest, and does not show how older or unusual builds behave. To test properly, you need a set of builds that covers the formats in this post. Ideally, the set includes a build just below the boundary, a build at the boundary, a build just above it, a build with a two-part version, a build with a zero-padded version, and at least one pre-release build.

Ask the mobile team which builds are still in use. Many teams can see how many users are on each version in their analytics. Look at that list before choosing test builds, because a rule that is correct for a rarely used build may still affect many users if a more common build is handled wrongly.

When you test, check two things. First, confirm that the flag returns the answer you expect for each build. Second, check what the app does with that answer. A flag that is correct but leads to a broken screen is still a bad rollout. Walk through the new step on each test build and note where it fails, slows down, or looks different. Record which builds you tested, which answer each gave, and when you tested them. When a support ticket arrives later from a user on an older build, that record shows whether the rule was meant to include that build.

Roll out in stages and watch the edges

Once the rule passes testing, roll out in stages instead of all at once. The edges of a version band are where mistakes show up. A rule that looks right for most users can still be wrong for a small group on an unusual build. A staged rollout lets you see those problems while the group is still small.

Watch the edges in particular. Look at users just above and just below the boundary, and at any users on pre-release or padded builds. If the step works for the main group but fails for a small edge group, the rule may need a correction. You may also find the app reports a version in a form you did not expect, which means the test list needs a new entry.

Be ready to change the rule quickly. That means a bad rule can be changed in a hurry, so agree in advance on who makes the change and how it is checked. A fast change without a test is just a second mistake, so keep the same checks for every edit.

When the rollout is complete, clean up. A version band that was useful for a launch can become confusing later. Once every build that should see the step can see it, remove the old rule or replace it with a simple one, and update the flag note so the next person knows the rollout is finished.

Summary

Version targeting is one of the most useful tools a mobile growth team has for rolling out a signup or onboarding step. The rule itself is short, but it has to read the version string correctly for every build users run. The three formats covered here are the ones most likely to surprise you: two-part versions like 3.10, zero-padded versions like 3.08, and pre-release or build suffixes like -alpha.1 and +build.7.

PostHog's documentation shows two-component versions like 3.10 and zero-padded versions like 3.08 normalized during server-side flag evaluation, and it notes separately that pre-release and build suffixes are preserved in the value while the plus-sign part does not affect matching; it is a good place to start. The rest is yours: write the rule in plain words, test it with the builds your users actually run, decide how pre-release builds should behave, and roll out in stages while you watch the edges. A version rule checked against these three formats is much less likely to show the new step to the wrong users or hide it from the right ones.

Sources and check date

Related posts

More posts