Page MenuHomePhabricator

hCaptcha: Log challenge close and expiry events to VisualEditorFeatureUse
Closed, ResolvedPublic

Description

Summary

We need to track challenge close, expiry, and error events in the editing funnel. @DLynch suggested that we log these in VisualEditorFeatureUse. (The schema name isn't entirely accurate, as it is also used for understanding wikitext editor events.)

Acceptance criteria

  • Challenge close, expiry, and error events are logged into VisualEditorFeatureUse, with the editing session ID so they can be joined with other events

Event Timeline

These events should also express if the challenge was shown via AbuseFilter’s showcaptcha consequence.

Then it looks like we can do something like:

mw.track( 'visualEditorFeatureUse', {
	feature: 'hcaptcha', // or 'hcaptcha_always_challenge', if the always-challenge SiteKey is in use
	action: 'open' // or 'expired', 'error', etc
} );
Dreamy_Jazz subscribed.

Also going to take this one on as it will edit conflict with T409701: hCaptcha: Log challenge event as "saveFailure" in EditAttemptStep if done separately.

Change #1204076 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/WikimediaEvents@master] hCaptcha instrumentation: Handle hcaptcha.render events during edits

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

Change #1204078 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/ConfirmEdit@master] ext.confirmEdit.hCaptcha: Consider action=submit an edit interface

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

Change #1204078 merged by jenkins-bot:

[mediawiki/extensions/ConfirmEdit@master] ext.confirmEdit.hCaptcha: Consider action=submit an edit interface

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

Change #1204088 had a related patch set uploaded (by Kosta Harlan; author: Dreamy Jazz):

[mediawiki/extensions/ConfirmEdit@wmf/1.46.0-wmf.2] ext.confirmEdit.hCaptcha: Consider action=submit an edit interface

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

Change #1204076 merged by jenkins-bot:

[mediawiki/extensions/WikimediaEvents@master] hCaptcha instrumentation: Handle hcaptcha.render events during edits

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

Change #1204238 had a related patch set uploaded (by Kosta Harlan; author: Dreamy Jazz):

[mediawiki/extensions/WikimediaEvents@wmf/1.46.0-wmf.2] hCaptcha instrumentation: Handle hcaptcha.render events during edits

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

Change #1204238 merged by jenkins-bot:

[mediawiki/extensions/WikimediaEvents@wmf/1.46.0-wmf.2] hCaptcha instrumentation: Handle hcaptcha.render events during edits

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

Mentioned in SAL (#wikimedia-operations) [2025-11-12T08:49:09Z] <kharlan@deploy2002> Started scap sync-world: Backport for [[gerrit:1204238|hCaptcha instrumentation: Handle hcaptcha.render events during edits (T409701 T409703 T409415)]]

Mentioned in SAL (#wikimedia-operations) [2025-11-12T08:51:23Z] <kharlan@deploy2002> kharlan: Backport for [[gerrit:1204238|hCaptcha instrumentation: Handle hcaptcha.render events during edits (T409701 T409703 T409415)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2025-11-12T08:58:27Z] <kharlan@deploy2002> Finished scap sync-world: Backport for [[gerrit:1204238|hCaptcha instrumentation: Handle hcaptcha.render events during edits (T409701 T409703 T409415)]] (duration: 09m 17s)

Change #1204088 merged by jenkins-bot:

[mediawiki/extensions/ConfirmEdit@wmf/1.46.0-wmf.2] ext.confirmEdit.hCaptcha: Consider action=submit an edit interface

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

Mentioned in SAL (#wikimedia-operations) [2025-11-12T09:13:28Z] <kharlan@deploy2002> Started scap sync-world: Backport for [[gerrit:1204088|ext.confirmEdit.hCaptcha: Consider action=submit an edit interface (T409701 T409703 T409415)]], [[gerrit:1204163|Refactor CaptchaScoreHooks to use EventSubmitter (T405597)]]

Mentioned in SAL (#wikimedia-operations) [2025-11-12T09:15:49Z] <kharlan@deploy2002> kharlan: Backport for [[gerrit:1204088|ext.confirmEdit.hCaptcha: Consider action=submit an edit interface (T409701 T409703 T409415)]], [[gerrit:1204163|Refactor CaptchaScoreHooks to use EventSubmitter (T405597)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2025-11-12T09:22:49Z] <kharlan@deploy2002> Finished scap sync-world: Backport for [[gerrit:1204088|ext.confirmEdit.hCaptcha: Consider action=submit an edit interface (T409701 T409703 T409415)]], [[gerrit:1204163|Refactor CaptchaScoreHooks to use EventSubmitter (T405597)]] (duration: 09m 21s)