Page MenuHomePhabricator

Remove the override cookie
Closed, ResolvedPublic2 Estimated Story Points

Description

Background

The mpo override cookie is not guaranteed to work for everyone experiments. If the request wasn't served by the app server, then the mpo cookie wasn't read and the server-side component of an experiment wouldn't know about the override. However, the JS SDKs read the mpo cookie directly and so the client-side component of an experiment would know about the override.

The mpo override query parameter, however, works with all experiments.

Also, FY26-27 ST6 is exploring (and delivering?) serving requests from logged-in users via from the caches, which will exacerbate the mpo cookie behavior.

See also T428694: Overridden enrollments not always added to wgTestKitchenUserExperiments when done via JS SDK.

AC

  • The mpo cookie behavior is removed from the PHP and JS SDKs
  • The documentation is updated

Notes

  1. This is fairly simple to do. There are a total of 9 mentions of 'mpo' in the TestKitchen codebase (including unit/integration tests) that would need to be removed: https://codesearch.wmcloud.org/search/?q=%27mpo%27&files=&excludeFiles=&repos=Extension%3ATestKitchen

Event Timeline

JVanderhoop-WMF moved this task from Incoming to READY TO GROOM on the Test Kitchen board.
KReid-WMF set the point value for this task to 2.Jul 2 2026, 3:50 PM
KReid-WMF moved this task from READY TO GROOM to Backlog on the Test Kitchen board.

Thank you for tagging this task with good first task for Wikimedia newcomers!

Newcomers often may not be aware of things that may seem obvious to seasoned contributors, so please take a moment to reflect on how this task might look to somebody who has never contributed to Wikimedia projects.

A good first task is a self-contained, non-controversial task with a clear approach. It should be well-described with pointers to help a completely new contributor, for example it should clearly point to the codebase URL and provide clear steps to help a contributor get set up for success. We've included some guidelines at https://phabricator.wikimedia.org/tag/good_first_task/ !

Thank you for helping us drive new contributions to our projects <3

Shyam_2808 subscribed.

Hi, I'd like to claim this task as my first contribution

Change #1313844 had a related patch set uploaded (by Shyam2808; author: Shyam2808):

[mediawiki/extensions/TestKitchen@master] Remove mpo override cookie behavior from SDKs

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

Hi @Shyam_2808 !

Thank you for your patch! As you can see it's already deployed and running on production.
I have moved the task to "In Progress" again because there is still a pending AC (The documentation is updated).

There are a couple of section in our documentation where this feature is still mentioned. That related documentation should be remove too:

Would you like to work on that update?

Also, I have found that there are still some remains of the feature we are removing. It's just a couple of doc blocks and a comment that suggest how to test the code by using that feature. Take a look at here

Hi @Sfaci,

Thanks for the update! Glad to hear the patch is already live on production.

And yes I’d love to work on updating the documentation and cleaning up the remaining docblocks/comments.

I'll review the two Wikitech pages and check the linked code references to submit the doc edits and follow-up patch.

Thanks!

Removing this functionality makes a number of things harder because while the cookied-based approach might not work reliably everywhere, it does work reliably in setups where query-parameters like the ?mpo are not easily preserved. An example is browser testing. It would have been great if this had been more widely discussed before implementation.

Change #1335781 had a related patch set uploaded (by Phuedx; author: Phuedx):

[mediawiki/extensions/TestKitchen@master] Revert "Remove mpo override cookie behavior from SDKs"

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

And yes I’d love to work on updating the documentation and cleaning up the remaining docblocks/comments.

I'll review the two Wikitech pages and check the linked code references to submit the doc edits and follow-up patch.

@Shyam_2808: Experiment Platform discussed @Michael's and other's feedback and decided to revert your change for now while we work on a complete solution for QAing / debugging experiments in all environments. The mpo cookie isn't perfect but it's enough to enable some QAing / debugging for now.

I have started a conversation with Release Engineering / Developer Experience about adding experiment override functionality to WikimediaDebug. We will continue the conversation over in T435664: Feature request: Allow me to override experiment group in production without the mpo query string parameter. If you're interested in helping out on that, we would welcome your input and patches once we have a plan.

Thank you again for your original patch.

Change #1335781 merged by jenkins-bot:

[mediawiki/extensions/TestKitchen@master] Revert "Remove mpo override cookie behavior from SDKs"

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

Hey @phuedx , Unassigning myself from this task for now following the revert and moving over to subscribe to T435664. Thanks you!

Chuiimuii_ofc subscribed.

RoadToWiki board hygiene: moved this task to Completed so the board matches Phabricator status (resolved/closed). No change to task status or assignee.