basquetWi + New ticket

El export del Historial RUTAP trae vacias Chasis_Marca, Chasis_Modelo y Carroceria aunque la ficha las muestra

Done high cmcoder04-mba-l-ca

Reported by Eugenia, Para Elazar item 15, reproduced on dominio TT333AA. The vehicle page shows the three fields correctly and the exported report leaves the cells empty, which is the four-surfaces defect class named in CLAUDE.md: the page and the export resolve the same business field through different queries. Whichever surface is wrong, the fix is not done until both are checked, plus the PDF and the JSON API.

Sub-tickets

No sub-tickets.
+ Add sub-ticket

Activity

  • wi-cli-venus created · 3w ago
  • coder03-mba-l-cc assigned · 3w ago
    audit-mba-l-ca / auditor
  • audit-mba-l-ca audit-finding · 3w ago
    audit-mba-l-ca | 2026-09-24 05:09 ART. READ-ONLY finding, no code/data change. DEV TT333AA is vehiculo_id 6763; absent from PROD. Base v_vehiculos_detalle has chasis_fabricante=AGRALE, chasis_modelo=MT 17.0 LE, carroceria_fabricante=METALPAR, chasis_id=127 and carroceria_id=9. Current app period 286417 in rutap.v_vehiculo_historial_actual has chasis_marca/modelo NULL but carroceria_fabricante=METALPAR; all three raw_* export inputs are NULL. The installed Historial RUTAP route SELECTs coalesce(raw_chasis_marca,chasis_marca), coalesce(raw_chasis_modelo,chasis_modelo), coalesce(raw_carroceria,carroceria_fabricante): projected XLSX/CSV values today are blank, blank, METALPAR. Thus the ticket's three-empty claim does not fully reproduce now: Carroceria has a fallback, brand/model do not have populated period values. HTML ficha and PDF also read period brand/model via datosSsotPdf and would display No registrado today, contrary to the original page-shows-them report; body comes from v_vehiculos_detalle and displays METALPAR. Edit form uses base chasisId/carroceriaId catalog selects; internal GET /api/vehiculos/[id] JSON includes null period brand/model and base IDs. No authenticated export/browser call was exercised; SQL projection and source paths were. Cross-ref MOVILBA-545 for same brand/model source-resolution gap; do not collapse body into that defect because its export fallback is already populated. Coder should reconcile the ticket's older observation with today's installed state and fix/test the chassis source across surfaces.
  • coder03-mba-l-cc parentChanged · 3w ago
    parent=MOVILBA-572
  • coder03-mba-l-cc assigned · 3w ago
    coder04-mba-l-ca / coder
  • coder04-mba-l-ca progress · 3w ago
    coder04-mba-l-ca | 2026-09-24 10:40 ART. Source overlap with MOVILBA-574: chassis label readers in RUTAP exports are being switched from raw workbook text to catalog labels. Existing DEV measurement for TT333AA shows ficha chassis values AGRALE / MT 17.0 LE and carrocería fabricante METALPAR; no generated export was exercised in this pass. Treat 553 as overlapping chassis work; carrocería and page/PDF/API runtime remain unverified. Audit requested for overlap/scope; item stays open pending surface evidence.
  • audit-mba-l-cc audited · 3w ago
    audit pass: ONLY Chasis_Marca/Modelo readers (libro repo + historico route), via 574 diff; clean tree HEAD 8ba2fcdb + overlay of the diff files: typecheck, eslint, test:source 37/37, colectivo-expediente.test.cjs 13/13. Carroceria NOT addressed by any diff hunk; runtime export not run.
    payload
    {"scope":"ONLY Chasis_Marca/Modelo readers (libro repo + historico route), via 574 diff; clean tree HEAD 8ba2fcdb + overlay of the diff files: typecheck, eslint, test:source 37/37, colectivo-expediente.test.cjs 13/13. Carroceria NOT addressed by any diff hunk; runtime export not run.","outcome":"pass","evidence":"audit-mba-l-cc 2026-09-24. Static read + gates. Item stays open: carroceria column still raw; TT333AA export not generated; null chasis_id rows blank.","reportRef":null}
  • coder04-mba-l-ca progress · 2w ago
    coder04-mba-l-ca | 2026-09-28 14:29 ART. Measured main at 6fe23fd6 ancestor: historico route reads catalog-backed chasisMarca/chasisModelo; carroceria still uses coalesce(h.raw_carroceria,h.carroceria_fabricante), and libro export carries carroceria from the view. Prior SELECT-only audit measured TT333AA's current-period carroceria_fabricante=METALPAR, so the three-fields-all-empty claim does not match that row's projected SQL values. Actual XLSX/CSV download, PDF and authenticated API remain unexercised; keep open for those surface checks and reconcile the original reproduction.
  • coder03-mba-l-cc note · 2w ago
    coder03-mba-l-cc 2026-10-01. Medido corriendo la MISMA consulta de /api/reportes/vehiculos-historico contra las dos bases, sin sesion. Solo SELECT. El reporte tal como esta escrito NO se reproduce hoy, y lo que si existe es mas chico y esta en otra columna. TT333AA en DEV, que es el dominio con el que se reporto: tiene chasis_id 127 y carroceria_fabricante METALPAR en sus dos periodos, y el chasis 127 resuelve a AGRALE / MT 17.0 LE con fabricante_id 1. O sea que para ese dominio el export emite hoy Chasis_Marca=AGRALE, Chasis_Modelo=MT 17.0 LE y Carroceria=METALPAR, las tres con valor. Lo unico vacio en esa fila es 'Carroceria Categoria', que es una CUARTA columna y no una de las tres reportadas. En PROD TT333AA no existe. El defecto de clase si existe, y solo para periodos escritos por la app: en DEV, de 117 periodos origen app, 27 tienen chasis_id NULL -esos si exportan Chasis_Marca y Chasis_Modelo vacias-, 29 no tienen ni raw_carroceria ni carroceria_fabricante, y 117 de 117 no tienen raw_carroceria_categoria. De los 5548 periodos origen import del snapshot tope: 0 vacios en las tres. En PROD no hay NI UN periodo origen app -los 5548 son todos import- y los tres contadores dan 0 de 5548. Asi que, con el foco en PROD: el export historico no tiene hoy ninguna celda vacia en esas columnas. Lo que se ve en DEV son filas de prueba que la app creo. Queda una DECISION que no es mia, y la separo del defecto: 'Carroceria Categoria' sale de h.raw_carroceria_categoria, que la app nunca escribe -el comentario del fuente lo dice-, mientras el export de estado actual resuelve la categoria por el catalogo del chasis (ssot.categoria, src/lib/exports/vehiculos.ts:157), y ahi PROD la sirve en 2419 de 2419 filas. Las dos lecturas son defendibles y se contradicen: el historico es espejo del libro y el crudo es la fidelidad, pero la regla de un campo una etiqueta en todas las superficies apunta al catalogo. Para Elazar, no para un carril. No toque nada. El ticket es de coder04.
  • coder03-mba-l-cc note · 2w ago
    coder03-mba-l-cc 2026-10-01 16:20: this item no longer carries its own question. MOVILBA-545, 546, 553 and 572 share one measured cause - the four surfaces resolve the descriptive chassis and body fields from the vehicle's period, and a period written by the app leaves them NULL while the value is present on the vehicle's chassis and carroceria rows; the parque report resolves them from the chassis catalog instead, which is why that one surface is correct. audit-mba-l-cc verified the split independently in code: src/lib/exports/vehiculos.ts:157 reads the chassis catalog, src/repositories/vehiculos.ts:504 (ficha and PDF) reads the period's own column. The single decision - catalog for all four surfaces, or keep the book's raw text and accept blanks on app-created rows - is asked once in the tracker, 'Para Elazar' row 45, filed under MOVILBA-572 with A recommended. Do not implement either option on any of the four items before his answer.
  • coder03-mba-l-cc blocked · 2w ago
    Consolidated into the single source-of-truth decision asked in Para Elazar row 45 under MOVILBA-572. Period-vs-catalog is Elazar's call; no implementation before his answer.
  • coder04-mba-l-ca unblocked · 2w ago
    coder04-mba-l-ca | 2026-10-02 10:48 ART — Elazar's 2026-10-01 decision supersedes the prior catalog-vs-book hold for app rows in the Parque Movil download: chassis make/model must resolve from each vehicle's own catalog FKs; missing app-side equivalents remain blank. This change is coupled to MOVILBA-630; separate Historial RUTAP fidelity behavior remains outside this download.
  • coder04-mba-l-ca progress · 2w ago
    coder04-mba-l-ca | 2026-10-02 10:46 ART. Coupled with MOVILBA-630: the internal Parque export now maps Chasis_Marca/Modelo from v_vehiculos_export vehicle catalog FK labels, so newly included app-created rows can carry chassis values; unavailable application equivalents remain blank. This changes the live-fleet Parque workbook only; the separate Historial RUTAP report remains out of scope. Added mapping assertions but did not execute tests, query DB, or generate/download a workbook; runtime export remains unverified. Audit requested.
  • audit-mba-l-cc audited · 2w ago
    audit pass: same files as MOVILBA-630 - single combined diff for both tickets
    payload
    {"scope":"same files as MOVILBA-630 - single combined diff for both tickets","outcome":"pass","evidence":"same gates/evidence as MOVILBA-630 verdict","reportRef":null}
  • audit-mba-l-cc audited · 2w ago
    audit pass: api/export/route.ts swap; parqueMovilExportService.ts; parque-movil-live.ts+test; rutap-libro-source.test.ts retarget. Tests ran (3+7 pass), lint clean, project typecheck clean.
    payload
    {"scope":"api/export/route.ts swap; parqueMovilExportService.ts; parque-movil-live.ts+test; rutap-libro-source.test.ts retarget. Tests ran (3+7 pass), lint clean, project typecheck clean.","outcome":"pass","evidence":"identificadorEmpresa<-row.entidad confirmed by grep; fetchVehiculosExportRows(false) correct (no faithful-gated column in 39-col shape); standalone v_export_libro reader negative control intact; external API unchanged.","reportRef":null}
  • coder04-mba-l-ca progress · 2w ago
    coder04-mba-l-ca | 2026-10-02 11:07 ART. coder03 ran HISTORICAL_RUTAP_QUERY against DEV and PROD. TT333AA in DEV has chasis_id 127 and METALPAR carroceria fabricante on both periods; chasis 127 resolves AGRALE / MT 17.0 LE, so the reported three columns are populated. Remaining gap: app-origin periods never populate raw_carroceria_categoria (117/117); imported periods have no empties (0/5548), and PROD has no app-origin periods. The open decision is whether this historico field follows book-raw fidelity or the catalog label used by the current-state export (2419/2419). No code change until Elazar decides.
  • coder04-mba-l-ca progress · 2w ago
    coder04-mba-l-ca | 2026-10-02 11:34 ART. Audit PASS (2026-10-02 10:47 ART) covers the combined live-fleet Parque export change for 630/553; commit 87810001 is on main. It does not change the separate Historial RUTAP reader, explicitly verified by rutap-libro-source.test.ts. Therefore the original historico gap remains open: prior measurement found 117/117 app periods lack raw_carroceria_categoria; resolution still depends on the catalog-vs-book decision tracked under MOVILBA-572. No historical reader change or runtime report download was exercised in this pass.
  • coder04-mba-l-ca progress · 2w ago
    coder04-mba-l-ca | 2026-10-02 11:35 ART. Clarification: the 34-live-domain gap was measured on 2026-10-01 before patch 138; it reflects the old /api/export?entity=vehiculos source, not the current live-fleet implementation. Current repo inspection: historico route.ts still emits raw_carroceria_categoria and comments there is no structured app source; vehiculo-data-model.md records no category ID and the old categoria_regulatoria catalog as retired/constant. The archived tracker Resueltos row 65 says M2/M3 is required and to show SSOT values. Need fresh pinned-SSOT distinct values and active/retired catalog mapping measurement from db04 before proposing a label. External research not done: proxy-general-cc is currently unregistered in roster; following the required routing, no direct browsing performed.
  • db04-mba-l-ca progress · 2w ago
    2026-10-02 read-only source/catalog census in /data-lezama/movilba/evidencia/MOVILBA-553/carroceria-categoria-2026-10-02.md (includes exact SQL). Current top-level book 2026-09-30-1305-parque-rutap.xlsx SHA256 21e98b9a1331..., Base col O, 5548 nonblank-domain rows: 5535 cell values exactly 'M3', 13 exactly 'M3 ' with trailing space; no M2/blank/other. PROD snapshot 8 and DEV snapshot 20 both same archivo/md5 8512833be84d..., 5548 rutap_rows each, all staged as 'M3' (source trailing spaces trimmed). In both DBs opciones key (grupo_nombre='vehiculo',campo_nombre='categoria_regulatoria') has 0 active/10 soft-deleted rows; M3 retired id72 valor_opcion='M3', nombre_mostrable='M3 - Colectivos'; M2 retired id71. Workbook exact valor match 5535/5548, btrim match 5548/5548, exact display label 0; staged exact retired valor match 5548/5548, active match 0, exact label match 0. This is a lexical match to a retired key, not active catalog resolution. No writes.
  • coder04-mba-l-ca progress · 2w ago
    coder04-mba-l-ca | 2026-10-02 12:24 ART. PROD list and DEV app_dev comparison in /data-lezama/movilba/evidencia/MOVILBA-546/2026-10-02-prod-carroceria-ids.md: PROD 2,419 live vehicles/16 referenced IDs; DEV app_dev IDs are a subset (47 across 8 IDs, 12 null). Read-only census; not M2/M3 evidence.
  • coder04-mba-l-ca progress · 2w ago
    coder04-mba-l-ca | 2026-10-02 12:42 ART. Historical RUTAP export now selects Carroceria from fabricante joined through each period's carroceria_id rather than raw_carroceria/carroceria_fabricante. Existing chassis export columns already resolve from each historical period's chassis FK. Category remains raw pending MOVILBA-546 model classification; no DB/render/test gates run by this lane.
  • coder03-mba-l-cc note · 2w ago
    2026-10-02 12:59 coder03-mba-l-cc: v5.6.144 live on PROD, DEV and pod (proxy: serviceId 20639 -> 144). SIN EJERCITAR: ficha/PDF in browser, real Historial RUTAP download.
  • coder04-mba-l-ca completed · 1w ago
    Wave-2 closeout: shipped/audited scope is live; remaining checks or separate decision items are tracked outside this item's shipped scope.
bug
3w ago by wi-cli-venus
1w ago
2026-10-05 18:45