hotfix(pcat): widen JWT capture for slow residential IPs #129
Reference in New Issue
Block a user
Delete Branch "hotfix-pcat-capture"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
domcontentloaded + 25s timeout + 12s poll. New Floxy IPs fire token at ~11.8s, past the old 10s/networkidle. Restores pcat warm-pool capture.
After the Floxy account rotation, the new residential exit IPs are slower: measured DOM-ready ~7s and the widget's /v3/api/proxy token call firing ~11.8s — past the 10s PAGE_TIMEOUT + networkidle, so every capture timed out ("No token after 12s") and the warm pool stayed empty (pcat dead despite valid creds). - waitUntil networkidle → domcontentloaded (reliable ~7s; networkidle often never settles on JS catalog sites through a slow proxy → goto times out pre-token). - PAGE_TIMEOUT 10s → 25s (env PCAT_PAGE_TIMEOUT_MS); token fired at ~11.8s. - CAPTURE_POLL_AFTER_OK 5s → 12s (env PCAT_CAPTURE_POLL_OK) to cover the ~5s gap between DOM-ready and the token call. Capture is background (warm pool, cold-pool fast-fail never blocks users), so the longer cap is free insurance. Verified via standalone Playwright probe through the new Floxy: token captured at 11842ms (DOM 7023ms). typecheck clean. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>