fix(decode): recognize VXK WMI as Opel (PSA/Stellantis-platform Corsa F, Mokka B)
Customer entered VXKUPHNKSP4032040 (2023 Corsa F) and got a bare 'Marka desteklenmiyor' — VXK was missing from all three WMI maps, so identifyBasic could not even name the brand. PL24's opel_parts catalog ends at CORSA-E (2015-2019, verified via the model-picker page), so the catalog itself stays a gap, but the user now gets the honest 'Opel 2023 olarak tanındı, katalog henüz mevcut değil' message and the miss is logged for the coverage backlog. - WMI_BRAND_MAP + PL24_WMI_SERVICE_MAP + EMEX CATALOG_MAP: VXK -> Opel - DECODE_CHAIN_VERSION 2 -> 3 (brand-mapping change; invalidates the stale negative cache for the customer's VIN) - vin-cache-keys.spec: lock-key assertion checked the bare version char, which now appears inside the test VIN — assert the ✌️ segment instead Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -348,6 +348,7 @@ export const CATALOG_MAP: Record<string, CatalogEntry> = {
|
||||
// Opel
|
||||
W0L: { code: "GM_OP201809", brand: "Opel" },
|
||||
W0V: { code: "GM_OP201809", brand: "Opel" }, // newer Stellantis-era WMI
|
||||
VXK: { code: "GM_OP201809", brand: "Opel" }, // PSA/Stellantis-platform Opel (Corsa F, Mokka B)
|
||||
// Chevrolet
|
||||
KL1: { code: "GM_C201809", brand: "Chevrolet" },
|
||||
// SsangYong
|
||||
|
||||
@@ -565,6 +565,7 @@ export const PL24_WMI_SERVICE_MAP: Record<string, string> = {
|
||||
// Opel / Vauxhall
|
||||
W0L: "opel_parts", // Opel AG (Germany)
|
||||
W0V: "opel_parts", // Opel (newer Stellantis-era WMI)
|
||||
VXK: "opel_parts", // PSA/Stellantis-platform Opel (Corsa F, Mokka B — France/Spain plants)
|
||||
|
||||
// Citroën (PSA)
|
||||
VF7: "citroen_parts", // Citroën SA (France)
|
||||
|
||||
@@ -16,7 +16,8 @@ describe("vinResolveCacheKeys (Q4)", () => {
|
||||
it("keeps the in-flight lock key version-independent (cross-deploy dedupe)", () => {
|
||||
const { lockKey } = vinResolveCacheKeys(VIN);
|
||||
expect(lockKey).toBe(`vin:lock:${VIN}`);
|
||||
expect(lockKey).not.toContain(DECODE_CHAIN_VERSION);
|
||||
// The VIN itself may contain the version digit — check the segment, not the char.
|
||||
expect(lockKey).not.toContain(`:${DECODE_CHAIN_VERSION}:`);
|
||||
});
|
||||
|
||||
it("bumping the version changes the namespace (old entries become unreachable)", () => {
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* Both the decode path (VehiclesService) and the admin cache-buster
|
||||
* (InternalVehiclesService) MUST build keys through here so they stay in sync.
|
||||
*/
|
||||
export const DECODE_CHAIN_VERSION = "2";
|
||||
export const DECODE_CHAIN_VERSION = "3";
|
||||
|
||||
export function vinResolveCacheKeys(vin: string): {
|
||||
cacheKey: string;
|
||||
|
||||
Reference in New Issue
Block a user