fix(kyc): verification poll never hard-stops — no user strand (post-merge /code-review)#2341
Conversation
…ce, never hard-stops The 15-min KYC_POLL_CAP_MS stopped the fallback poll entirely, so a websocket event missed during a long manual review (laptop sleep, mobile background, network switch) left the user on 'Almost there' forever with onKycSuccess never firing. The poll now settles at the 60s floor and keeps going for the whole modal-open lifetime; the backend self-recovery cooldown bounds the per-call cost, so it's nothing like the fixed-5s battering ram the schedule replaced. Regression tests: keeps polling past 15 min (bounded ~10 calls in the following 10 min, not zero, not a flood) and a late APPROVED still fires onKycSuccess.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 26 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
Comment |
Code-analysis diffPainscore total: 5857.65 → 5857.73 (+0.08) 🆕 New findings (9)
✅ Resolved (9)
|
🧪 UI test report — ✅ all greenSuites
📊 Coverage (unit)
⏱ 10 slowest test cases
|
Summary
/code-review highof the KYC poll-backoff change (already in dev, headed to prod via release #2340) found a confirmed user-strand:KYC_POLL_CAP_MSstopped the fallback poll entirely after 15 min. If the websocket connection dies during a long manual review (laptop sleep, mobile background, network switch) and the backend approves after the cap, the user is stuck on "Almost there" forever —onKycSuccessnever fires. The old fixed-5s interval always recovered.Fix: the poll settles at its 60s floor and keeps going for the whole modal-open lifetime instead of hard-stopping. Cost stays bounded — the backend self-recovery cooldown (hardened in api#1118) short-circuits repeat submissions server-side, so a 60s steady poll is nothing like the 5s battering ram the schedule replaced.
Risks
initiateSumsubKyc; the durable fix is a read-only KYC-status endpoint that both this poll and the mount-timefetchCurrentStatusconsume. Out of scope for this hotfix.QA
Replaced the "stops after cap" test with two regressions: (1) keeps polling past 15 min but stays bounded (~10 calls in the next 10 min, not zero, not a flood); (2) a status that goes APPROVED after a 20-min wait still fires
onKycSuccess. Full jest suite 1666 green, typecheck clean.Merges to dev → release #2340 picks it up automatically.