Repository navigation
chore: remove fully rolled-out and dead feature flags - #14780
Open
dylanjeffers wants to merge 1 commit into
Open
dylanjeffers wants to merge 1 commit into
dylanjeffers wants to merge 1 commit into
Conversation
Removes 9 feature flags that are at 100% for everyone in the production
Optimizely datafile or are never read, inlining their enabled branches:
verify_handle_with_{twitter,instagram,tiktok}, network_cut_enabled,
fast_referral, launchpad_verification, fan_club_text_post_posting,
react_query_sync and collapsed_explore_header.
Also drops three remote-config string keys with no readers:
TRENDING_REWARD_IDS, REWARDS_TWEET_ID_TRACKS and
REWARDS_TWEET_ID_UNDERGROUND.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removes 9 feature flags and 3 remote-config keys that are either fully rolled out or no longer read anywhere. Behavior is unchanged for production users, with the exceptions listed under Behavior notes.
How each flag was judged
Rollout state comes from the live production Optimizely datafile (revision 3221, fetched from the public CDN with the prod SDK key in
env.prod.ts), not from the code defaults. Age comes from git history. I searched every local Audius repo (api, identity, protocol, etc.) for each key; none of the removed keys are read outside this repo.react_query_synccollapsed_explore_headerverify_handle_with_twitterverify_handle_with_instagramverify_handle_with_tiktoknetwork_cut_enabledfast_referrallaunchpad_verificationfan_club_text_post_postingEach removal inlines the enabled branch and deletes the flag's definition, prod default and any dev override.
Remote-config keys removed (no readers since the Feb rewards UI update, missed by #14671):
TRENDING_REWARD_IDS,REWARDS_TWEET_ID_TRACKS,REWARDS_TWEET_ID_UNDERGROUND.Behavior notes
getFeatureEnabledreturns the code default, which wasfalsefor most of these flags. Inlining them means they're also on during the first moments after launch, matching steady-state production.network_cut_enabledis on the payment path. All 8includeNetworkCutcall sites inpurchase-content/sagas.tsnow passtrue. Production already sendstruefor everyone; the one change is that a purchase started before Optimizely finished loading would previously have left out the network cut. I kept theincludeNetworkCutparameter rather than changing transaction helper signatures. Please review this file closely.AudiusBackend.instagramHandle/tiktokHandle) are stubs that always resolvenull, so only the Twitter check can reserve a handle. Removing the flags exposed this to the type checker; I replaced the impossible casts with?? nulland left a comment. Not changed here.signon/sagas.tsthe three lookups now useall({...})(object form) instead ofall([...]), so each result keeps its own type. Same runtime behavior.Kept on purpose (worth a follow-up)
usdc_purchasesfeature_flag_accessbuy_with_coinflow,coinflow_offramp_enabledqueue_new_feature_badgeweekly_rotation,now_playing_comments,now_playing_waveform, and everything added Oct–Nov 2026getFeatureEnabledevaluates(isFeatureEnabled(flag) || (fallbackFlag && …)) ?? defaultVal. Without a fallback flag, an Optimizelyfalsebecomesundefined, which falls through to the code default. So Optimizely can never turn off a flag whose code default istrue:usdc_purchases: the "IOS App Review: 0% on" rule has no effect.weekly_rotation,now_playing_comments,now_playing_waveform: commented as "the remote flag is the kill switch", but they can't be killed remotely.Fixing this changes live behavior (the iOS review gate would start working), so it should be its own reviewed change. It's filed as a separate task.
Not in this PR
The flags still exist in Optimizely. Once this ships and older app versions have aged out, they can be archived there.
Verification
tsc --noEmitforcommon,web,mobile: no new errors. The only error is an existing one onmaininuseScheduledReleaseLabels.test.ts, which this PR doesn't touch.eslinton every changed file: clean.git grepconfirms no remaining references to any removed flag or key.🤖 Generated with Claude Code