docs/flag_guarding_guidelines.md
This document describes using base::Feature flags which
can be remotely set via a server. This applies to both A/B experiments
(internal link) (disabled by default) and to kill switches
(internal link) (enabled by default).
Google maintains its own server which you'll see referenced by its internal name Finch. Other embedders can and do run their own server for their products.
[TOC]
Web developers expect web platform APIs to behave predictably for all users on a given version of Chrome, and violating that expectation creates high risk of site breakage. And if a site is broken for only some % of its users (developer: "It works on my machine!"), it will take longer for the issue to be noticed, reported, and root-caused.
For this reason, A/B testing or gradual Finch rollouts of developer-visible platform changes are discouraged and should not be done by default.
Instead, developer-visible platform changes, such as adding / removing APIs, should usually use a "waterfall" rollout: land the change default-enabled on trunk, and let it bake in canary, dev, and beta before going to stable through the normal release process.
This process ensures that developers have an opportunity to discover and file regressions by testing their sites in dev / beta, and have confidence that their sites work correctly on new Chrome releases before they reach stable users.
The code should still be guarded by a base::Feature which can be used for a Finch kill switch if a serious post-stable regression is discovered.
There are tradeoffs here, and in some cases those tradeoffs may favor a gradual Finch rollout of a platform change, but that should be the exception and not the rule.