fix(vinpin): cap Rpartstore acquire at ~1 open via 14s sub-budget
Some checks failed
QA Gate (P0/P1) / Test affected app (pull_request) Has been cancelled
Some checks failed
QA Gate (P0/P1) / Test affected app (pull_request) Has been cancelled
Rpartstore's launch-error modal OCR-detection is unreliable across renderings, so a DOWN Rpartstore was grinding all 3 reopens (~54s) + dirtying the seat → Dialogys fallback couldn't finish inside the decode budget → not_found. Lower acquireBudgetMs 90s→14s so the loop bails after the first open+poll (~22s) straight to Dialogys on a still-clean seat. Healthy Rpartstore loads on the first open and is used as before; maxOpens kept so tests still exercise the reopen path. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -399,8 +399,20 @@ export const VINPIN_DECODE_BUDGET_MS = 180_000;
|
||||
* to Dialogys rather than burning the entire decode budget on reopens.
|
||||
*/
|
||||
export const VINPIN_RPARTSTORE = {
|
||||
// Rpartstore has two failure modes: a genuine born-stuck spinner (reopen can
|
||||
// recover it) and a hard server-side launch error "Ошибка запуска каталога"
|
||||
// (reopen NEVER helps — Rpartstore is DOWN). Detecting the tiny centered error
|
||||
// modal by OCR proved unreliable across renderings, and burning reopens on a
|
||||
// DOWN Rpartstore (a) wastes ~54s and (b) dirties the RDS desktop so the
|
||||
// Dialogys fallback then can't finish inside the budget.
|
||||
// `maxOpens` still bounds reopen attempts (a real transient spinner can recover
|
||||
// on a reopen), but `acquireBudgetMs` is the hard lever: one open+load-poll is
|
||||
// ~22s, so a 14s wall-clock sub-cap makes the loop bail after the FIRST open if
|
||||
// it hasn't loaded — straight to Dialogys on a still-clean seat (~25–52s decode)
|
||||
// — instead of grinding 3 reopens. A healthy Rpartstore loads within the first
|
||||
// open's poll and is used as before; the cap only prevents wasted reopens.
|
||||
maxOpens: 3,
|
||||
acquireBudgetMs: 90_000,
|
||||
acquireBudgetMs: 14_000,
|
||||
} as const;
|
||||
|
||||
/** Per-key delay (ms) when typing a VIN into a focused canvas field. A focused
|
||||
|
||||
Reference in New Issue
Block a user