Page MenuHomePhabricator

Make sticky header edit button A/B test work for no sticky header control group
Closed, ResolvedPublic3 Estimated Story Points

Description

Background

After enabling the sticky header edit button A/B test for pilot wikis T311144, we realized the experiment also needs to account for the use case wherein the control group does not see a sticky header at all (vs the treatment group that sees the sticky header with edit buttons).

Currently config overrides the A/B test logic that shows the sticky header with or without the edit buttons. We need the A/B test logic to override config that shows or does not show the sticky header (with or without the edit buttons).

For example the following $wgVectorStickyHeader config sets sticky header to be visible for logged in users but the A/B test config indicates that all sampled users should NOT see the sticky header.
Expected behavior: not to see the sticky header
Observed behavior: seeing the sticky header

$wgVectorStickyHeader = [
	"logged_in" =>  true,
	"logged_out" => false,
];

$wgVectorStickyHeaderEdit = [
	"logged_in" => true,
	"logged_out" => false,
];

$wgVectorWebABTestEnrollment = [
	"name" => "vector.sticky_header_edit",
	"enabled" => true,
	"buckets" => [
		"unsampled" => [
			"samplingRate" => 0
		],
		"noStickyHeaderControl" => [
			"samplingRate" => 1
		],
		"stickyHeaderEditButtonTreatment" => [
			"samplingRate" => 0
		],
	],
];

Inversely, the following $wgVectorStickyHeader config sets sticky header to be NOT visible for logged in users but the A/B test config indicates that all sampled users should see the sticky header.
Expected behavior: to see the sticky header Because of server-side feature manager for sticky header, I would expect no sticky header. The $wgVectorStickyHeader config needs to be true for logged-in users in order to run the experiment for treatment groups to see the sticky header with edit buttons so the applicable config override by the A/B test config is noted above.
Observed behavior: not seeing the sticky header

$wgVectorStickyHeader = [
	"logged_in" =>  false,
	"logged_out" => false,
];

$wgVectorStickyHeaderEdit = [
	"logged_in" => true,
	"logged_out" => false,
];

$wgVectorWebABTestEnrollment = [
	"name" => "vector.sticky_header_edit",
	"enabled" => true,
	"buckets" => [
		"unsampled" => [
			"samplingRate" => 0
		],
		"noStickyHeaderControl" => [
			"samplingRate" => 0
		],
		"stickyHeaderEditButtonTreatment" => [
			"samplingRate" => 1
		]
	],
];

Description

Adjust the sticky header A/B test logic to override config so that sampling rates of the control and treatment groups take precedence.

Acceptance criteria

  • Update vector.sticky_header_edit to have a 3rd treatment group
  • When running the sticky header edit button A/B test (currently applicable to idwiki + viwiki), ensure that the control group does not see sticky header and the treatment 1 group sees sticky header with edit buttons and treatment 2 group sees sticky header without edit buttons << treatment buckets are switched in latest config so that treatment 1 is sticky header without edit buttons and treatment 2 is sticky header with edit buttons
  • Indicate what the default config should be for $wgVectorStickyHeader and $wgVectorStickyHeaderEdit for the relevant wikis that will run this experiment.

default config:

$wgVectorWebABTestEnrollment = [
	"name" => "vector.sticky_header_edit",
	"enabled" => true,
	"buckets" => [
		"unsampled" => [
			"samplingRate" => 0
		],
		"noStickyHeaderControl" => [
			"samplingRate" => 0.34
		],
		"stickyHeaderNoEditButtonTreatment1" => [
			"samplingRate" => 0.33
		],
		"stickyHeaderEditButtonTreatment2" => [
			"samplingRate" => 0.33
		]
	],
];

QA steps

  • You may need to create a few accounts on beta cluster to see each of the following configurations:
    • control: no sticky header
    • treatment 1: sticky header without edit buttons
    • treatment 2: sticky header with edit buttons
  • log into a page on beta cluster i.e. https://en.wikipedia.beta.wmflabs.org/wiki/Albert_Einstein and scroll down to trigger sticky header
    • It might take a few tries, but you should (using different accounts) be able to reproduce the experience of no sticky header at all, sticky header without edit buttons, and sticky header with edit buttons.

Screen Shot 2022-08-10 at 10.44.29 PM.png (2×2 px, 1 MB)

Event Timeline

Change 812061 had a related patch set uploaded (by Jdrewniak; author: Jdrewniak):

[mediawiki/skins/Vector@master] Sticky header AB test bucketing for edit button vs. no sticky header

https://gerrit.wikimedia.org/r/812061

Jdlrobson subscribed.

In a Slack conversation I asked Olga if we want to do a control vs treatment test or test the 2 different treatments on the same wiki. The latter seems most ideal as it would give us a definitive answer to how adding the edit button to the sticky header impacts usage.

I also expressed concern at modifying A/B test code while an A/B test is active, if we can avoid it.

The original experiment was intended to be control vs treatment only, with two different controls. That said, I would not be against setting the experiment control as no sticky header and having two treatment groups

I think at this point either are likely the same effort. Should we check with the analysts? I'm guessing if you had 3 buckets on the same wiki, that would provide very clear results for how the edit icon impacts sticky header usage.

ovasileva triaged this task as High priority.EditedJul 11 2022, 8:44 AM

I think at this point either are likely the same effort. Should we check with the analysts? I'm guessing if you had 3 buckets on the same wiki, that would provide very clear results for how the edit icon impacts sticky header usage.

+1 that 3 buckets would be preferable if possible. I'd suggest that we continue with the A/B test as it is currently, and continue with 3 buckets once the current test is complete, only for the pilot wikis on which the test is currently not running. The benefit here would also be that we are not removing the sticky header from users that have already gotten used to it.

@ovasileva sounds good! We should aim to begin work on this a week before the A/B test finishes. We shouldn't make change to code in an active A/B test.

ovasileva subscribed.

Change 812061 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Sticky header AB test bucketing for 2 treatment buckets

https://gerrit.wikimedia.org/r/812061

How do we want to test this one?

How do we want to test this one?

would it work to add config to the beta cluster?

Change 821319 had a related patch set uploaded (by Clare Ming; author: Clare Ming):

[operations/mediawiki-config@master] Enable sticky header edit test on beta cluster

https://gerrit.wikimedia.org/r/821319

Change 821319 merged by jenkins-bot:

[operations/mediawiki-config@master] Enable sticky header edit test on beta cluster

https://gerrit.wikimedia.org/r/821319

cjming updated the task description. (Show Details)

I verified on beta cluster where the sticky header edit A/B test is enabled that I was able to see all 3 experiences:

  • control: no sticky header
  • treatment 1: sticky header without edit buttons
  • treatment 2: sticky header with edit buttons

Screen Shot 2022-08-10 at 10.44.29 PM.png (2×2 px, 1 MB)

Not sure if this can go straight to sign off or if it should be QA'd proper by @Edtadros (I added testing instructions in ticket description).

Change 823226 had a related patch set uploaded (by Clare Ming; author: Jdrewniak):

[mediawiki/skins/Vector@wmf/1.36.0-wmf.23] Sticky header AB test bucketing for 2 treatment buckets

https://gerrit.wikimedia.org/r/823226

Change 823226 abandoned by Clare Ming:

[mediawiki/skins/Vector@wmf/1.36.0-wmf.23] Sticky header AB test bucketing for 2 treatment buckets

Reason:

wrong branch

https://gerrit.wikimedia.org/r/823226

Change 823228 had a related patch set uploaded (by Clare Ming; author: Jdrewniak):

[mediawiki/skins/Vector@wmf/1.39.0-wmf.23] Sticky header AB test bucketing for 2 treatment buckets

https://gerrit.wikimedia.org/r/823228

Change 823228 merged by jenkins-bot:

[mediawiki/skins/Vector@wmf/1.39.0-wmf.23] Sticky header AB test bucketing for 2 treatment buckets

https://gerrit.wikimedia.org/r/823228

Mentioned in SAL (#wikimedia-operations) [2022-08-15T21:42:09Z] <cjming@deploy1002> Synchronized php-1.39.0-wmf.23/skins/Vector/resources/skins.vector.es6: Backport: [[gerrit:823228|Sticky header AB test bucketing for 2 treatment buckets (T312573)]] (duration: 03m 05s)