fix(pcat-auth): two-armed post-goto poll — fail-fast on dead sites #75

Merged
root merged 1 commits from dev into main 2026-06-01 22:18:06 +03:00
Owner

The post-goto token poll ran a blind 20s wait regardless of whether
page.goto succeeded or threw. On a healthy goto the widget API call
fires within ~1-2s; on a failed goto the request either already went
through (rare) or never will (common). The 20s cap was the dominant
cost on failed-site attempts — verified tonight as a 28s "No token
after ..." log on auto-komplekt after page.goto ERR_TIMED_OUT.

  • CAPTURE_POLL_AFTER_OK = 10 (5s) — token usually arrives in <2s
  • CAPTURE_POLL_AFTER_FAIL = 4 (2s) — brief grace then bail

Per-attempt worst case on a dead site: 10s goto + 2s grace = 12s
(was 10s + 20s = 30s). On a healthy site, well-known capture times
(3-5s) stay comfortably inside the 5s post-goto cap.

The post-goto token poll ran a blind 20s wait regardless of whether page.goto succeeded or threw. On a healthy goto the widget API call fires within ~1-2s; on a failed goto the request either already went through (rare) or never will (common). The 20s cap was the dominant cost on failed-site attempts — verified tonight as a 28s "No token after ..." log on auto-komplekt after page.goto ERR_TIMED_OUT. * CAPTURE_POLL_AFTER_OK = 10 (5s) — token usually arrives in <2s * CAPTURE_POLL_AFTER_FAIL = 4 (2s) — brief grace then bail Per-attempt worst case on a dead site: 10s goto + 2s grace = 12s (was 10s + 20s = 30s). On a healthy site, well-known capture times (3-5s) stay comfortably inside the 5s post-goto cap.
root added 1 commit 2026-06-01 22:18:02 +03:00
fix(pcat-auth): two-armed post-goto poll — fail-fast on dead sites
Some checks failed
QA Gate (P0/P1) / Test affected app (pull_request) Has been cancelled
286307155e
The post-goto token poll ran a blind 20s wait regardless of whether
page.goto succeeded or threw. On a healthy goto the widget API call
fires within ~1-2s; on a failed goto the request either already went
through (rare) or never will (common). The 20s cap was the dominant
cost on failed-site attempts — verified tonight as a 28s "No token
after ..." log on auto-komplekt after page.goto ERR_TIMED_OUT.

* CAPTURE_POLL_AFTER_OK   = 10 (5s)  — token usually arrives in <2s
* CAPTURE_POLL_AFTER_FAIL = 4  (2s)  — brief grace then bail

Per-attempt worst case on a dead site: 10s goto + 2s grace = 12s
(was 10s + 20s = 30s). On a healthy site, well-known capture times
(3-5s) stay comfortably inside the 5s post-goto cap.
root merged commit ca0c18924d into main 2026-06-01 22:18:06 +03:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: root/sase.tr#75