Page MenuHomePhabricator

Web feature management system does not let us target logged out only
Open, MediumPublic3 Estimated Story Points

Description

Background

We are unable to reliably ship features in the mobile site to only logged out users. We should fix that!

From T388036 - we were surprised to see that setting a configuration of

'wgMinervaDonateBanner' => [
	'default' => [
		'base' => true,
		'loggedin' => false,
		'amc' => false,
	],
],

did not correctly disable the feature for logged in users as we had expected. There is further discussion in that ticket (in particular https://phabricator.wikimedia.org/T388036#10608151), but the summary is that base is itself a conditional which is true for all non-beta users, which means this configuration is targeting all non-beta users (functionally all users now), and the loggedin => false section is ignored

Additional note: It does work when $wgEnableBeta is set to true o_o

User story

As a member of the web team, I want to be able to target anonymous users specifically using our feature management system

NOTE: for the purposes of this ticket I am using logged out and anonymous to mean the same thing, but we should give some thought to how we want to handle temp accounts with this change

Requirements

  • there is a mechanism by which we can target logged out users using our feature management system

Acceptance criteria

  1. we are satisfied that future releases can be deployed to logged out users only via the feature management system
  2. For the purpose of this task, provide an explict logged_out and logged_in key that replace base and loggedin. Logic for beta can be left alone for the purpose of this task. loggedin and base remain as aliases for logged_in and logged_out.
  3. Confirm feature flag configuration supports explicitly logged out users.
  4. Confirm logged-in users do not receive features targeted only to logged users.
  5. Verify logged-out users receive features targeted to them, regardless of $wgEnableBeta state.
  6. Tests are in place to verify correct behavior and prevent regressions for logged out users
  7. Documentation includes examples and notes on targeting logged out users.

Rollback plan

Depends on implementation, which hasn't yet been nailed down - presumably if we are changing the inner workings of the system rather than adding a logged out user mode we will have a revert plan incase it has unintended effects on the existing features

Event Timeline

@Jdlrobson-WMF do you mind giving this a look when you get the chance and make sure it captures what we were hoping with this? In particular I wasn't the most sure what the requirements and acceptance criteria should be here

Will create the other ticket tomorrow morning

Jdlrobson-WMF changed the task status from Open to In Progress.Mar 10 2025, 9:41 PM

@Jdlrobson-WMF you wanna assign yourself to get this estimated or should I?

Jdlrobson-WMF changed the task status from Stalled to In Progress.Mar 26 2025, 5:31 PM
Jdlrobson-WMF moved this task from Q3 to Q4 on the Web-Team board.
Jdlrobson-WMF set the point value for this task to 3.
Jdlrobson-WMF moved this task from Q4 to Sprint Backlog on the Web-Team board.
Jdlrobson-WMF changed the task status from In Progress to Open.Mar 31 2025, 5:16 PM

untagging myself as this has been estimated

Assuming we may need a reliable and consistent feature management system depending on our roll out strategy.

Jdlrobson-WMF lowered the priority of this task from High to Medium.May 12 2025, 5:26 PM