Page MenuHomePhabricator

hCaptcha: Fix execute duration timings and execution error logging
Closed, ResolvedPublic

Description

Summary

We have been tracking hcaptcha.execute() duration and execution error counts in Grafana, and this broke when wmf.22 arrived at group2, likely as part of the refactoring in T406126: Export selected secureEnclave.js methods to allow easier reuse

Acceptance criteria

  • trackPerformanceTiming() records the correct duration for hcaptcha.execute()
  • hCaptcha execution error counts are reported correctly in Grafana

Event Timeline

kostajh renamed this task from hCaptcha: Fix execute duration timings to hCaptcha: Fix execute duration timings and execution error logging.Oct 10 2025, 8:29 AM
kostajh updated the task description. (Show Details)

Noting that this was likely fixed as part of fixing the QUnit tests in 53f68060f1f311c5d073c28494e1e20992d3932c, and so the relevant fixes from that commit (or the entire commit) should likely be backported next week to wmf.22

kostajh triaged this task as High priority.Oct 10 2025, 8:57 AM

Noting that this was likely fixed as part of fixing the QUnit tests in 53f68060f1f311c5d073c28494e1e20992d3932c, and so the relevant fixes from that commit (or the entire commit) should likely be backported next week to wmf.22

OK, then let's backport that to wmf.22 on Monday.

However, the bit about the hCaptcha execution error counts still seems unfixed

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

[mediawiki/extensions/ConfirmEdit@master] ext.confirmEdit.hCaptcha.utils: Track hCaptcha execution rejections

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

Change #1195165 merged by jenkins-bot:

[mediawiki/extensions/ConfirmEdit@master] ext.confirmEdit.hCaptcha.utils: Track hCaptcha execution rejections

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

Change #1195165 merged by jenkins-bot:

[mediawiki/extensions/ConfirmEdit@master] ext.confirmEdit.hCaptcha.utils: Track hCaptcha execution rejections

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

Thanks for this patch! I think the next thing we need here is a wmf.22 backport patch that we can sync on Monday. This will be a little complicated due to the various refactorings we've made since wmf.22.

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

[mediawiki/extensions/ConfirmEdit@wmf/1.45.0-wmf.22] ext.confirmEdit.hCaptcha.utils: Track hCaptcha execution rejections

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

Change #1195628 merged by jenkins-bot:

[mediawiki/extensions/ConfirmEdit@wmf/1.45.0-wmf.22] ext.confirmEdit.hCaptcha.utils: Track hCaptcha execution rejections

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

Mentioned in SAL (#wikimedia-operations) [2025-10-13T09:01:08Z] <kharlan@deploy2002> Started scap sync-world: Backport for [[gerrit:1195628|ext.confirmEdit.hCaptcha.utils: Track hCaptcha execution rejections (T406925)]]

Mentioned in SAL (#wikimedia-operations) [2025-10-13T09:05:17Z] <kharlan@deploy2002> kharlan: Backport for [[gerrit:1195628|ext.confirmEdit.hCaptcha.utils: Track hCaptcha execution rejections (T406925)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2025-10-13T09:10:27Z] <kharlan@deploy2002> Finished scap sync-world: Backport for [[gerrit:1195628|ext.confirmEdit.hCaptcha.utils: Track hCaptcha execution rejections (T406925)]] (duration: 09m 19s)