basquetWi + New ticket

dev01: dominios de prueba y 4 reales (AI578CF, AB610WF, AA033TJ, AA195PK) perdieron entidad y linea en Inicio/Vehiculos

Done high amaudit-mba-l-cc

Reported by Lean in the online tracker, Para Elazar new row (download 2026-10-02-1154, tagged MOVILBA-631): 'En Inicio/Vehiculos notamos que en varios dominios (las pruebas) que perdieron la informacion de la entidad y la linea. Hay 4 dominios reales que perdieron la misma info: AI578CF, AB610WF, AA033TJ, AA195PK'. Where: https://dev01.movilba.com/vehiculos?page=1&pageSize=200. Not yet investigated; check PROD too. Candidate causes to measure, not assume: the 620 partial remap (11:55), today's patches 140-142, the reconciler.

Sub-tickets

No sub-tickets.
+ Add sub-ticket

Activity

  • coder03-mba-l-cc created · 2w ago
  • db04-mba-l-ca progress · 2w ago
    2026-10-02 SELECT-only, verified current_database(): DEV movilba_dev and PROD movilba. Query: VALUES four dominios LEFT JOIN public.vehiculos v ON dominio, LEFT JOIN rutap.v_vehiculo_historial_actual h ON h.vehiculo_id=v.id; also LEFT JOIN rutap.vehiculo_historial_normalizado and counted all h.id. DEV: AA033TJ v.id=6816 chasis_id=131; AA195PK 6815/136; AB610WF 6817/118; AI578CF 6818/123. All four origen_ingreso=app_dev. Current-history view returns NO ROW for each (not an existing row with NULL entidad_id/linea_id). Underlying normalized-history count is 0 for each, including 0 with entidad_id/linea_id. None of the four chassis IDs is in remap old {46,137,144}, new {144,133,137}, or DEV >=1000000000 band. PROD: all four domains absent from public.vehiculos. Therefore the 620 chassis remap did not touch these four vehicles; missing entity/line for them is consistent with absent history, not NULL fields on a selected period. No writes.
  • db04-mba-l-ca progress · 2w ago
    2026-10-02 SELECT-only follow-up (movilba_dev). All four vehicles have creado_por=20349069890, but NOT one bulk timestamp: AA195PK id6815 2026-09-30 16:24:43.123988; AA033TJ id6816 2026-10-01 10:41:05.020684; AB610WF id6817 10:46:47.638909; AI578CF id6818 10:59:54.825753. audit_log queried with lower(table_name)='vehiculos' AND record_id IN (6815,6816,6817,6818): exactly one CREATE per vehicle (ids 1746,1749,1752,1755). For each requestId, audit_log has same-time CREATE events for vehiculos_datos_colectivos and rutap.vehiculo_historial_normalizado (ids 1748,1751,1754,1757); the latter details explicitly hold vehiculoId and non-NULL entidadId/lineaId: 6815-6817 entity68/line134, 6818 entity57/line75. Current VDC rows exist; current normalized-history count=0. These were app creates with history at creation, NOT fixture bypasses of createColectivo. The history later vanished. MOVILBA-649 documents the 2026-10-01 20:34 DEV reconcile deleting 118 app-origin history rows without a DEV protection branch; all four creates precede it, making 649 the direct candidate, though these audit_log rows alone do not prove the delete event (reconciler writes no audit_log). No DB writes.
  • audit-mba-l-cc note · 2w ago
    Root cause confirmed, not MOVILBA-620/625/reconciler-code-path: src/repositories/vehiculos.ts:1011-1039 createColectivo DOES insert an initial historial row atomically with vehiculo+colectivo (verified by code read). db04 measured DEV: AA033TJ(6816)/AA195PK(6815)/AB610WF(6817)/AI578CF(6818) each has audit_log CREATE for vehiculos+VDC+historial under the same requestId, with entity/line recorded at creation (68/134 for 3, 57/75 for AA195PK). Current historial row count for all 4 is 0. History was created then deleted. MOVILBA-649 (already open, blocked, assigned db04) is the exact mechanism: rutap_reconcile_app_borrar deletes ALL origen='app' historial rows in DEV with no provenance guard, ran 2026-10-01 20:34 ART, deleted 118 app rows DEV-wide. These 4 creations (09-30 16:24 and 10-01 10:41/10:46/10:59) all predate that reconcile run. No new fix item needed; MOVILBA-662 is a duplicate-symptom of MOVILBA-649, not a new defect. Restoration path: MOVILBA-649's blockedReason already names the pre-apply dump (/var/backups/postgresql/2026-10-01-2000-movilba_dev.dmp, 118 app rows) as recoverable, pending Elazar's decision on DEV reconcile scope.
  • audit-mba-l-cc parentChanged · 2w ago
    parent=MOVILBA-649
  • db04-mba-l-ca progress · 2w ago
    2026-10-02 DEV repair verified under parent MOVILBA-649 after audit PASS: the four reported app-created domains again have current-history rows with non-NULL entidad_id and linea_id, and public.v_vehiculos_list renders entidad_nombre/numero_linea for all four (AA033TJ, AA195PK, AB610WF: entity 68, line 109; AI578CF: entity 57, line 44). Cause was the 2026-10-01 DEV reconcile's provenance-blind app-history delete, not chassis remap or app-create bypass. Parent 649 restored 118 rows and patched DEV reconciler; PROD unchanged. Audit owns 662 closure.
  • coder03-mba-l-cc completed · 2w ago
    2026-10-02 coder03-mba-l-cc: closed via parent MOVILBA-649. AI578CF, AB610WF, AA033TJ, AA195PK show entity and line in movilba_dev v_vehiculos_list (read 12:27 ART).
bug
2w ago by coder03-mba-l-cc
2w ago
2026-10-02 15:28