A mobile game team deleted a remote flag that had been on for a year, and players on two-year-old builds lost the daily challenge; what went wrong, and what rule prevents it?
answer
- every build carries its own defaults
- the document is a contract
- missing key means compiled default
- stop reading first, stop serving last
- new flags never reach old builds
basics
~20 sOld builds read the deleted key, found nothing and fell back to their compiled default, which was off. A key must stay served at its final value until builds that read it are no longer in meaningful use.
solid answer
~40 sEach installed build carries its own compiled defaults and its own list of keys, so the configuration document is a contract with every build still in use, not only the newest. Deleting a key, renaming it or changing its type sends old builds back to their compiled default, here `off`, chosen when the daily challenge was new and risky. The rule is to retire a flag in two steps: new builds stop reading it, and the key stays served at its final value until the builds that read it fall below an agreed share of players or a minimum-version gate retires them. The contract runs the other way too: a flag added later never reaches old builds, so their paths can only be steered by switches they already read.
go deeper
Remember that every installed build keeps the defaults it was compiled with, and a key it cannot find makes it use that default.
Explain which document edits old builds survive, a value change within type and range, and which send them back to defaults: deletion, renaming, type changes.
Show the retirement order, stop reading in code first and stop serving last, and explain why old builds can only be steered by switches they already contain.
Decide the threshold of remaining readers that allows a key's removal, and whether a minimum-version gate is worth the players it forces to update.
## What the old build actually did When the daily challenge shipped two years ago, its code read a flag and the build compiled in a default for it. A new, untested feature gets the safe default, `off`, so a player whose first launch is offline does not see half-finished content. The flag was turned on remotely, the feature succeeded, and a year later someone tidied the configuration and deleted the key because the newest builds no longer read it. The two-year-old build kept doing what it always did: fetch the document, look up the key, find nothing, and return the compiled default. A flag read that always yields a value, falling back to the default when lookup fails, is exactly the safe behaviour a client should have. The failure was not in the old build; it was in treating the configuration as belonging to the newest build only. ## The configuration is a contract with every build A mobile release cannot be recalled, and players update at their own pace, so builds of many ages read the same document at once. For any key, every change has to be judged against the oldest build that reads it: | Change to a key | What a build that reads it does | |---|---| | Value changed within its type and range | applies the new value at its next activation | | Key deleted | falls back to its own compiled default | | Key renamed | the old name is missing, so compiled default | | Type changed, such as boolean to string | the value cannot be read, so compiled default | | Range widened beyond what the build validates | rejected or clamped, depending on that build's code | | New key added | ignored, because the build has no code that reads it | Only the first row changes what an old build does in the way the editor intended. The last row changes nothing for it, and the rows between silently hand control back to a default chosen years ago. ## Retiring a flag safely 1. **Stop reading it in code.** The next release removes the check and hard-codes the winning behaviour. 2. **Keep serving it.** The key stays in the document at its final value, typed as before. 3. **Watch who still reads it.** Builds that contain the check are known from the release history; the share of active players on those builds comes from per-version usage data. 4. **Remove it when the readers are gone.** Either those builds fall below an agreed share of active players, a threshold that is the team's own choice, or a minimum-version gate stops them running at all. The order matters: code stops reading first, the document stops serving last. Reversing it is what broke the daily challenge. ## Flags the old build never knew The same contract has a second edge. A kill switch added in this month's release protects this month's build and every later one. A two-year-old build has no code that reads it, so no change to the document can reach that path. For old builds the levers are different: - a switch the old build **already** reads, if a broader one happens to cover the path; - a server-side change, such as no longer offering the content the broken path needs; - a minimum-version gate that sends those players to the store, which is the upgrade question's subject. This is why a switch is designed in before a feature ships rather than after it breaks. ## Tracking who reads what Teams that run many flags keep a small record per key: its owner, its type, its compiled default in each build, the first and last build versions that read it, and its final value once retired. That record answers the dangerous question, "who breaks if this key changes?", before anyone edits the document. It also makes the cleanup safe to automate: a key whose last reader has fallen out of use can be deleted with evidence rather than optimism. ## Where this sits Why flag debt accumulates in general, and how operators keep a flag inventory healthy, belong to the flag-pattern and reliability questions. What is specific to an installed client is that old binaries keep their compiled defaults and their key lists for as long as they are installed, so retiring a flag is gated by the slowest-updating players, not by the newest release.
- Could the team have chosen a different compiled default two years ago to avoid this?Defaulting the challenge to on would have survived the deletion, but it would also have shown unfinished content to every offline first launch while the feature was risky. The default is chosen for the day the build ships; the protection against later deletion is the retirement rule, not a braver default.
- How do you change a flag's type, say from a boolean to a percentage?Do not change it in place. Add a new key with the new type, ship builds that read the new key, keep the old key served at its old type for older builds, and retire the old key by the usual rule once its readers are gone.
- Deleting a flag is safe once the newest build no longer reads it.
- An old build always keeps the last value it saw when a key disappears.
- A kill switch added in the new release can also steer old builds.
- Changing a flag's type is a harmless edit on the server.
- Compiled defaults in installed builds can be updated through configuration.