Page MenuHomePhabricator

hCaptcha: Adjust tolerance of intermittent network errors
Open, Needs TriagePublic

Description

Summary

In T404204: Investigate options for automatic fallback to FancyCAPTCHA, we implemented a failover mode to load FancyCaptcha in the event that hCaptcha is unreachable. For reasons that are still being investigated, there are intermittent connection errors to load secure-api.js for outbound network calls (see https://logstash.wikimedia.org/goto/3638725468dcb59bc3e917335776afa1 for other examples). We currently set "failover mode" if secure-api.js is unreachable. We should instead tolerate a certain number of errors per period of time.

Acceptance criteria

  • the health checker implementation is reworked to accept a threshold of errors per window of time

Event Timeline

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

[mediawiki/extensions/ConfirmEdit@master] ConfirmEdit: Add error count threshold for apiUrl health checks

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

Change #1237732 merged by jenkins-bot:

[mediawiki/extensions/ConfirmEdit@master] ConfirmEdit: Add error count threshold for apiUrl health checks

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

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

[mediawiki/extensions/ConfirmEdit@wmf/1.46.0-wmf.14] ConfirmEdit: Add error count threshold for apiUrl health checks

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

Change #1238436 merged by jenkins-bot:

[mediawiki/extensions/ConfirmEdit@wmf/1.46.0-wmf.14] ConfirmEdit: Add error count threshold for apiUrl health checks

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

Mentioned in SAL (#wikimedia-operations) [2026-02-10T22:28:06Z] <kharlan@deploy2002> Started scap sync-world: Backport for [[gerrit:1238436|ConfirmEdit: Add error count threshold for apiUrl health checks (T416817)]]

Mentioned in SAL (#wikimedia-operations) [2026-02-10T22:32:20Z] <kharlan@deploy2002> kharlan: Backport for [[gerrit:1238436|ConfirmEdit: Add error count threshold for apiUrl health checks (T416817)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2026-02-10T22:40:40Z] <kharlan@deploy2002> Finished scap sync-world: Backport for [[gerrit:1238436|ConfirmEdit: Add error count threshold for apiUrl health checks (T416817)]] (duration: 12m 34s)