promote(pcat): rotating Floxy residential transport + resilience #124

Merged
root merged 1 commits from promote-pcat-floxy into main 2026-06-10 21:58:33 +03:00
Owner

Cherry-pick of dev 25ba371 (b886a05). Swaps the rotten DataImpulse proxy for Floxy residential with per-request IP rotation (max IP / min ban); the TWS- token is not IP-bound (verified live). Plus dead-site prune, scrape-timeout 30s→10s, cold-pool fast-fail, PCAT circuit breaker, transport-failure token eviction. Validated on dev: capture+call+validate all clean through Floxy (0 transient/0 fail), real decodes OK. Instant rollback: PCAT_PROXY_PROVIDER=dataimpulse. Tripwire: auth 401/403 must stay 0.

Cherry-pick of dev 25ba371 (b886a05). Swaps the rotten DataImpulse proxy for Floxy residential with per-request IP rotation (max IP / min ban); the TWS- token is not IP-bound (verified live). Plus dead-site prune, scrape-timeout 30s→10s, cold-pool fast-fail, PCAT circuit breaker, transport-failure token eviction. Validated on dev: capture+call+validate all clean through Floxy (0 transient/0 fail), real decodes OK. Instant rollback: PCAT_PROXY_PROVIDER=dataimpulse. Tripwire: auth 401/403 must stay 0.
root added 1 commit 2026-06-10 21:58:24 +03:00
perf(pcat): rotating Floxy residential transport + resilience (decode latency)
Some checks failed
QA Gate (P0/P1) / Test affected app (pull_request) Has been cancelled
b886a05b5b
Prod decode was dominated by the DataImpulse proxy: ~50% of ports dead at any
moment, 57% of captured tokens discarded by validation, the dead-port slot
never evicted (invalidateSession only fired on 401/403, never on transport
timeout), and a cold pool blocked the user inline on a multi-second capture.
pcat sub-timing was p50 8.3s / p90 56s, blowing the 25s decode budget.

Verified on prod: the TWS- token is NOT request-time IP-bound (0 auth 401/403
across thousands of calls; a token captured on one IP replays 200 through
arbitrary fresh residential IPs). So the proxy can rotate freely.

- Transport swap to Floxy residential (PCAT_PROXY_PROVIDER=floxy|dataimpulse|none).
  Call/validate leg = a fresh exit IP per request (max IP diversity → min per-IP
  ban); capture leg = a sticky session per Playwright attempt. DataImpulse +
  direct kept as env fallbacks. Token decoupled from the slot (proxyPort removed).
- Prune 3 zero-yield JWT sites (knkauto/autodo.kz/flynestauto — 0 captures, ~80%
  of attempts); add PCAT_JWT_SITES env override.
- Lower catalog-scrape timeout 30s→10s (env-tunable) so a slow IP aborts within
  budget and the retry rotates to a fresh IP.
- Cold-pool fast-fail on the decode race: warm in background, let EMEX/PL24
  answer instead of blocking inline; treated as a transient miss (no neg-cache).
- Evict a token after N consecutive transport failures on rotating IPs (the
  dead-slot bug); reset on any 2xx.
- PCAT circuit breaker mirroring PL24 (transient-only; cold-skip neutral; skip
  marks outcome.transient so a pcat-only VIN isn't negative-cached 30m).

Typecheck + Biome + unit tests (categories/vehicles) green. Default flips pcat
to Floxy on next deploy; instant rollback via PCAT_PROXY_PROVIDER.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
root merged commit 1392a642a9 into main 2026-06-10 21:58:33 +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#124