Page MenuHomePhabricator

Run a logged-in synthetic A/A test using the JS SDK
Closed, ResolvedPublic1 Estimated Story Points

Description

Background

The Experiment Platform team have verified that the Experimentation Platform is capable of running a test on all visitors using the JS SDK (see T392313: [Epic] SDS 2.4.11 Run a Synthetic A/A Experiment and most recent update to Hypothesis SDS2.4.11 Synthetic A/A experiment / e2e testing of edge uniques for data collection in Asana). We would like to verify that it is capable of running a synthetic A/A test on logged-in visitors only using the JS SDK.

To do this we will duplicate and tweak the experiment configuration for T395342: Configure synthetic A/A experiment in xLab:

DetailConfiguration
Traffic allocationEnglish Wikipedia, 1%
Identifier typemw-user
Duration14 days
Experiment name (machine-readable name)"Logged-in Synthetic A/A Test (JS SDK)" (synth-aa-test-mw-js)
Treatment group name (machine-readable name)"Control 2" (control-2) "No changes for subjects in this group."
InstrumentationPageVisit, producing action: "page-visited" events client-side
Metrics"Page visits", "Page visits per hour"

Open Questions

Question 1: Do we want to reuse the PageVisit instrument or create a new one so that this task and T397138: Run a second synthetic A/A test aren't mutually exclusive?

Answer 1: Let's rewrite ext.wikimediaEvents/xLab/pageVisit.js to be:

mw.loader.using( 'ext.xLab' ).then( () => {
    mw.xLab.getExperiment( 'sds2-4-11-synth-aa-test-2' ).send( 'page-visited', { instrument_name: 'PageVisit' } );
    mw.xLab.getExperiment( 'synth-aa-test-mw-js' ).send( 'page-visited', { instrument_name: 'PageVisit' } );
} );

AC

Event Timeline

Do we want to reuse the PageVisit instrument or create a new one

If ext.wikimediaEvents/xLab/pageVisit.js is rewritten to be:

mw.loader.using( 'ext.xLab' ).then( () => {
    mw.xLab.getExperiment( 'sds2-4-11-synth-aa-test-2' ).send( 'page-visited', { instrument_name: 'PageVisit' } );
    mw.xLab.getExperiment( 'synth-aa-test-mw-js' ).send( 'page-visited', { instrument_name: 'PageVisit' } );
} );

Does that count as reusing or new?

If ext.wikimediaEvents/xLab/pageVisit.js is rewritten to be:

mw.loader.using( 'ext.xLab' ).then( () => {
    mw.xLab.getExperiment( 'sds2-4-11-synth-aa-test-2' ).send( 'page-visited', { instrument_name: 'PageVisit' } );
    mw.xLab.getExperiment( 'synth-aa-test-mw-js' ).send( 'page-visited', { instrument_name: 'PageVisit' } );
} );

Does that count as reusing or new?

Both but it'll work!

Milimetric moved this task from Incoming to Backlog on the Test Kitchen board.
Milimetric moved this task from Backlog to READY TO GROOM on the Test Kitchen board.
Milimetric set the point value for this task to 1.
Milimetric moved this task from READY TO GROOM to Backlog on the Test Kitchen board.

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

[mediawiki/extensions/WikimediaEvents@master] Update PageVisit instruments for a logged-in synth experiment

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

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

[mediawiki/extensions/WikimediaEvents@wmf/1.45.0-wmf.13] Update PageVisit instruments for a logged-in synth experiment

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

Change #1176527 merged by jenkins-bot:

[mediawiki/extensions/WikimediaEvents@master] Update PageVisit instruments for a logged-in synth experiment

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

Change #1176532 merged by jenkins-bot:

[mediawiki/extensions/WikimediaEvents@wmf/1.45.0-wmf.13] Update PageVisit instruments for a logged-in synth experiment

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

Mentioned in SAL (#wikimedia-operations) [2025-08-07T20:23:00Z] <cjming@deploy1003> Started scap sync-world: Backport for [[gerrit:1176532|Update PageVisit instruments for a logged-in synth experiment (T397140)]]

Mentioned in SAL (#wikimedia-operations) [2025-08-07T20:24:45Z] <cjming@deploy1003> cjming: Backport for [[gerrit:1176532|Update PageVisit instruments for a logged-in synth experiment (T397140)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2025-08-07T20:30:34Z] <cjming@deploy1003> Finished scap sync-world: Backport for [[gerrit:1176532|Update PageVisit instruments for a logged-in synth experiment (T397140)]] (duration: 07m 34s)

We launched synth-aa-test-mw-js today and verified seeing events coming in using kafkacat after deploying/backporting the related changes:

Screenshot 2025-08-07 at 2.42.45 PM.png (698×2 px, 346 KB)

The initial sample rate was quite low (0.1%) so we bumped it to 25% and verified that config change:

https://grafana.wikimedia.org/goto/yu50en_NR?orgId=1

Data will continue to be collected until 8/14.