fix(vinpin): claim warm ONLY on a full 3-window session (Fiat+Rpartstore+Dialogys)
Some checks failed
QA Gate (P0/P1) / Test affected app (pull_request) Has been cancelled

A partial warm session (e.g. Rpartstore DOWN → only Fiat+Dialogys) is proven
unstable: re-warm cycles + the missing catalog's launch-error keep knocking the
Fiat window off its VIN panel, so warm Fiat decodes thrash to the 180s budget →
not_found. Require all three windows before this.warm=true; otherwise stay on the
reliable cold path (which decodes Fiat/Renault + cross-brand cleanly). The daemon
backs off + retries, so warm auto-resumes once Rpartstore recovers.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-15 13:25:39 +03:00
parent 46f0210ba6
commit aa798ec03d

View File

@@ -521,10 +521,19 @@ export class VinpinDriverService implements OnModuleDestroy {
// and re-binds by probing, so this is only a fast-path hint).
await this.bindTaskbarCoords(page);
if (!fiatUp && !okR && !okD) {
// Nothing opened → don't claim warm; leave the cold path in effect. Clean
// the seat (log out) first so the next warm-up isn't sabotaged by a dirty
// resumed desktop from this failed attempt.
if (!(fiatUp && okR && okD)) {
// Require the FULL warm session (all three catalog windows). A PARTIAL
// session — e.g. Rpartstore DOWN so only Fiat + Dialogys open — is proven
// UNSTABLE: the missing window's launch-error modal + the re-warm cycles
// keep knocking the Fiat window off its VIN panel, so warm Fiat decodes
// thrash to the budget. When we can't fully warm, DON'T claim warm — the
// reliable cold per-decode path serves every brand (Fiat ePER + Renault
// Rpartstore/Dialogys, all proven). The daemon backs off and retries, so
// warm resumes automatically once Rpartstore recovers. Clean the seat (log
// out) first so the next attempt isn't sabotaged by this one's dirty desktop.
this.logger.warn(
`warm-up incomplete (fiat=${fiatUp}, rpartstore=${okR}, dialogys=${okD}) — not claiming warm; cold path stays in effect until all three open`,
);
await this.cleanTeardown();
await this.close();
return false;