basquetWi + New ticket
movilba MOVILBA-279

El catalogo de carrocerias tiene 13 textos con hasta 9 filas cada uno: comparar por id ve distintos dos vehiculos con la misma carroceria

Done high dmdb03-mba-l-cc

MEDIDO por db02-mba-l-cc el 2026-09-05 08:27 en DEV, todo SELECT, al escribir la hoja de fusion de MOVILBA-270. Es la MISMA enfermedad que MOVILBA-200 pero en la tabla 'carrocerias'. TRECE textos de carroceria tienen entre 2 y 9 filas cada uno: AUTOBUS 8 filas (ids 1, 19-23, 73, 74), TODO BUS / TODOBUS 9 (13, 51-58), HEPRICAR 7, ITALBUS 6, METALPAR 6, LA FAVORITA 6, NUOVOBUS 5, MARCOPOLO 4, UGARTE 4, BAM BAM 3, CORWIN 3, KING LONG 2, METALBUS 2. COMO SE ENCONTRO, y es la leccion del hallazgo: db02 habia reportado que AE100DB y AE100DF tenian dos carrocerias DISTINTAS y pobladas (33 retirada contra 5 viva), o sea una pregunta para Eugenia. Al resolver los ids A TEXTO resulta que 33 y 5 son LA MISMA: ITALBUS / ITALBUS, y la 33 es una fila duplicada ya retirada, con cero vehiculos vivos. No habia diferencia de dato ni pregunta que hacer. COMPARAR IDS CRUDOS NO ES COMPARAR - es la regla del catalogo escrita en 'opciones' y vale igual aca. POR QUE IMPORTA: mientras el catalogo tenga varias filas para el mismo texto, dos vehiculos con la misma carroceria pueden apuntar a ids distintos, y cualquier comparacion por id los ve diferentes. Ademas el selector solo ofrece las vivas, asi que un vehiculo colgado de una retirada se ve VACIO en el formulario - exactamente lo de MOVILBA-200, que ya tiene su parche de UI (se agrega el valor guardado al final de la lista, rotulado). QUE HACE FALTA, en el orden de 200: (1) cuantos vehiculos vivos cuelgan de una fila de carroceria retirada - la CLASE; (2) el mapeo muerta->viva POR EVIDENCIA, no por parecido de texto, y con su rama 'no resuelve'; (3) contra el libro: cual de las grafias es la que el libro dice, porque en 200 la dedup borro las filas FIELES al libro y dejo las editorializadas - hay que medir si aca paso lo mismo antes de decidir cual sobrevive. NO EJERCITADO: no se conto cuantos vehiculos cuelgan de cada duplicada; no se comparo contra el libro; PROD no medido; no se toco nada.

Activity

  • wi-cli-venus created · 5w ago
  • wi-cli-venus assigned · 4w ago
    db03-mba-l-cc
  • wi-cli-venus note · 4w ago
    db03 2026-09-18 ~12:50 ART. RE-MEASURED today, SELECT only, DEV + PROD (PROD as svc_nextjs). The stored 09-05 shape (13 texts x up to 9 rows, vehicles hanging from retired rows) has moved: 491 repointed the 45 vehicles in PROD today, and DEV was cleaned on 09-08 by 377/377b/377c (Elazar GO, DEV ONLY). DEFECT AS TITLED (comparing by id sees two equal carrocerias as different) - ZERO in both envs: - PROD carrocerias: 74 rows = 18 live + 56 marked. Live vehiculos on a marked row: 0; vehiculos of ANY state on a marked row: 0 (was 45). Groups by (fabricante_id, normalized modelo) with more than one LIVE row: 0; groups by normalized modelo alone with more than one live row: 0 (WITH and WITHOUT the live predicate the 14 multi-row groups are 14 live + 54 marked, 0 groups without a live survivor). Referrers enumerated from pg_constraint: vehiculos.carroceria_id and rutap.vehiculo_historial_normalizado.carroceria_id (the latter is NULL in 5514/5514 rows - that is MOVILBA-492/366, not this item). - DEV: 17 rows, 17 live, 0 marked, 0 duplicated groups, 0 vehicles on a retired row. - Ask (3), which spelling the book says: 16 raw book spellings, PROD, over 5514 rows; each maps by normalized text to exactly 1 live row; 15 match the live text exactly. The 2 that do not: book 'TODOBUS' (1 row) vs live 12 'TODO BUS' (the book itself carries 'TODO BUS' 2055 rows and 'TODOBUS' 1 - a book typo candidate for Eugenia, not ours to decide) and live id 71 'YUTONG ' with a trailing space vs book 'YUTONG' (377b fixed exactly this in DEV). WHAT IS LEFT, all PROD-only, all a PROD data write and therefore gated (the 09-08 GO was DEV-scoped; nothing in pending-prod-changes.md covers it either): PROD has never received 377/377b/377c. a) 56 marked carrocerias rows physically present (DEV deleted them), 0 references from any FK. b) id 71 modelo 'YUTONG ' -> 'YUTONG'. c) id 72 IGUAZU live, 0 refs, not in the book (377c deleted it in DEV under its own GO). Also PROD has no UNIQUE/CHECK on carrocerias that DEV has: that is the root cause and it is MOVILBA-501 (db02). Not duplicated here. 489's carrocerias leg (blocked on the 45) is now unblocked by 491 - same population as (a). Closing this item on the measured defect. The PROD port is filed as its own child, blocked on GO. NOT EXERCISED: no FK-less column that stores a carroceria id was swept (only pg_constraint referrers) - whoever deletes the 56 must run the value-membership sweep over all integer columns (memory: reference_una_columna_que_guarda_un_id_ajeno_puede_llamarse_id) first; no ficha/selector opened; carroceria_aire_acondicionado_id / piso_id (MOVILBA-483/495) not touched.
  • wi-cli-venus completed · 4w ago
    db03 2026-09-18: closed on today's re-measurement, see the last event on this item.
  • wi-cli-venus note · 4w ago
    db03 2026-09-18 addendum: the defect count is 0 in PROD only because MOVILBA-491 repointed the 45 vehiculos off marked carrocerias rows today; nothing prevents it recurring. Root cause is the missing UNIQUE/CHECK on PROD carrocerias (DEV has it) = MOVILBA-501 (db02). Do not read this close as 'the catalogue was always fine'.
  • wi-cli-venus note · 4w ago
    db03 correction to my earlier '0 references' figure: instrument = pg_constraint FKs only (vehiculos.carroceria_id, rutap.vehiculo_historial_normalizado.carroceria_id): 0 references to the 56 marked rows, correct as FK count. Value-membership sweep (db02, PROD, 12:26): public.vehiculos_archive 137 rows -> 15 of the 56; public.parque_rutap_temp 1398 rows -> 50 of the 56; no FK on either, so a DELETE of the 56 would leave 1535 dangling ids. Both numbers stand; my NOT-EXERCISED line named this sweep as undone. Prune decision is Elazar's (db02, MOVILBA-504).
bug
5w ago by wi-cli-venus
4w ago
2026-09-18 15:22