Tipo_Motor del libro no se publica en ninguna superficie desde el catalogo: v_vehiculos_detalle no lo proyecta y la fila cruda de la ficha PDF salio en MOVILBA-414
El libro trae Tipo_Motor (por ejemplo Electrico) y ninguna superficie lo publica hoy desde el catalogo. v_vehiculos_detalle no proyecta ningun campo tipo_motor, y MOVILBA-414 acaba de sacar de la ficha PDF la unica fila que lo mostraba, que emitia el TEXTO CRUDO del libro bajo una etiqueta de catalogo - correcto sacarla, pero el concepto quedo ausente en vez de correcto. Regla 2 del 2026-09-24: ninguna superficie muestra texto crudo de un campo que tiene catalogo detras, y el campo se publica con UNA etiqueta de catalogo en TODAS las superficies. Alcance: (1) censar las cuatro superficies - ficha de vehiculo, formulario de edicion, export XLSX/PDF y API JSON - y decir para cada una si emite el campo, desde donde y con que texto, porque cada una resuelve por su propia consulta; (2) ubicar el catalogo de opciones que corresponde al concepto y el mapeo desde el valor del libro, sin inventar uno nuevo si ya existe; (3) proyectarlo donde falte, resolviendo por el catalogo, nunca por el crudo. Ojo con la trampa de este proyecto: arreglar una superficie no alcanza a las otras tres. Limpieza pendiente de 414: src/types/vehiculos.ts:147 todavia declara datosSsotPdf.tipoMotor, ya sin uso.
Activity
-
coder04-mba-l-ca | 2026-09-28 14:29 ART. Current main source census: the vehicle ficha/PDF publishes estandarEmisionesNombre as 'Estándar de Emisiones' (catalog-backed), while the separate raw tipoMotor row was removed under MOVILBA-414. The historico export has Tipo_Motor, but route.ts selects coalesce(h.raw_tipo_motor, op_tipo_motor.valor_opcion), and op_tipo_motor is explicitly joined to motor.estandar_emisiones, not motor.tipo_motor. This does not establish that Tipo_Motor and emissions are the same business concept; the request needs contract clarification and catalog mapping before implementation. No code change made pending that distinction.
-
coder04-mba-l-ca | 2026-09-28 13:xx ART — Removed the stale optional datosSsotPdf.tipoMotor declaration from src/types/vehiculos.ts:147; repository construction and page-local DTO no longer provide or consume it. Verified by rg that no datosSsotPdf.tipoMotor references remain. No gates run per lane rule; requesting audit of this type-only cleanup. The catalog/business mapping question in the item remains open.
-
coder04-mba-l-ca | 2026-09-28 14:35 ART. Started scoped cleanup after confirming by source search that datosSsotPdf.tipoMotor had no remaining consumers; removed only its stale optional declaration from src/types/vehiculos.ts. The prior progress event had a placeholder timestamp (13:xx) in its body; this event corrects the time. No tests/typecheck/lint run per lane rule; catalog mapping and wider surface coverage remain open.
-
audit pass: reviewed 1-line diff src/types/vehiculos.ts:147 (tipoMotor removed from VehiculoDto.datosSsotPdf); grepped repo for consumers of datosSsotPdf.tipoMotor (none); confirmed the only runtime constructor (repositories/vehiculos.ts:504-508) never set it; typecheck clean with diff applied
payload
{"scope":"reviewed 1-line diff src/types/vehiculos.ts:147 (tipoMotor removed from VehiculoDto.datosSsotPdf); grepped repo for consumers of datosSsotPdf.tipoMotor (none); confirmed the only runtime constructor (repositories/vehiculos.ts:504-508) never set it; typecheck clean with diff applied","outcome":"pass","evidence":"datosSsotPdf object literal only sets cuit/identificadorEmpresa/carroceriaCategoria - tipoMotor was a dead type field since construction, never populated at runtime; unrelated tipoMotor usages elsewhere (repositories/rutap-libro.ts, exports) are a different property, untouched","reportRef":null} -
coder04-mba-l-ca | 2026-09-28 14:42 ART. Audit PASS recorded at 14:37. Commit 5c18e135 removes the unpopulated datosSsotPdf.tipoMotor declaration; git status is clean and 5c18e135 is an ancestor of main (main HEAD 4e810f1f), so the audited change is already promoted. Closing the scoped type cleanup; the broader catalog-mapping question was not part of this change.
-
coder04-mba-l-ca | 2026-09-28 14:43 ART. Correction: the prior done status over-scoped the evidence. Commit 5c18e135 and its audit PASS close only the dead DTO-field cleanup, already an ancestor of main; MOVILBA-608 itself remains open because the four-surface catalog mapping and publication work in its description is unresolved.
-
coder04-mba-l-ca | 2026-10-02 13:32 ART. Source census: ficha/PDF and edit form expose Estándar de Emisiones from catalog options (page.tsx:862/1423; edit dropdown uses estandarEmisiones/v_estandar_emisiones). Current-fleet XLSX/CSV uses v_vehiculos_export.tipo_motor = op_estandar_vdc.nombre_mostrable; docs confirm this is emissions standard, not propulsion. Historical XLSX/CSV route route.ts:63 still uses coalesce(h.raw_tipo_motor, qualified estandar_emisiones.valor_opcion), so it can emit raw book text. Public JSON /api/v1/parque/vehiculos returns v_vehiculos_api_public, which exposes no emissions/Tipo_Motor field; is currently motor_fabricante. Completing the four-surface request therefore needs an external API contract addition and a DB view projection/rebuild; this is DB + published-contract scope, not a TS-only display fix. No files changed.
-
2026-10-02 SELECT-only installed-view measurement, verified current_database() separately: PROD movilba, DEV movilba_dev. pg_get_viewdef('public.v_vehiculos_api_public'::regclass,true), same excerpt in both (lines 14-15): 'vd.motor_fabricante AS motor_marca, vd.motor_fabricante AS motor_modelo,'. Clarification: published key is motor_modelo, but its expression is the SAME motor_fabricante source as motor_marca; the view has no published motor_fabricante column. Samples in both bases: AA326DQ motor_marca/motor_modelo=CUMMINS/CUMMINS; AG708VN=EQUIPMAKE/EQUIPMAKE; AI032JK=DANA/DANA. Control: motor_marca IS DISTINCT FROM motor_modelo is 0/2419 PROD and 0/2455 DEV. This confirms motor_modelo is a duplicate manufacturer label, not a distinct model; no view or API change made. Changing meaning of published key remains Elazar's decision.
-
coder04-mba-l-ca | 2026-10-02 13:38 ART. In src/app/api/reportes/vehiculos-historico/route.ts, Tipo_Motor now selects only the qualified motor/estandar_emisiones catalog value_opcion; removed raw_tipo_motor fallback. Rewrote the adjacent MOVILBA-535 note to retain the catalog spelling evidence and state the raw source remains history-only. Added source assertions in src/lib/rutap-history-values.test.ts for catalog-only projection and rejection of the old coalesce. No tests, lint, or typecheck run per lane rule; no other files changed for this item.
-
audit pass: route.ts op_tipo_motor.valor_opcion catalog-only, raw_tipo_motor fallback removed; MOVILBA-535 comment updated; test asserts both.
payload
{"scope":"route.ts op_tipo_motor.valor_opcion catalog-only, raw_tipo_motor fallback removed; MOVILBA-535 comment updated; test asserts both.","outcome":"pass","evidence":"Reran rutap-history-values.test.ts: 35/35 pass. Checked no other surface regressed: ficha/PDF engineType resolves via separate option-catalog path, no raw coalesce.","reportRef":null} -
2026-10-02 13:52 coder03-mba-l-cc: v5.6.146 (Tipo_Motor catalog-only in Historial RUTAP) on PROD, DEV and pod (proxy serviceId 20913). Open on this item: census and fix of the remaining raw_* fallbacks (coder04), and two API decisions for Elazar: add Tipo_Motor to the API; motor_modelo returns the manufacturer (db04 measurement).
-
coder04-mba-l-ca | 2026-10-02 13:59 ART. Census of catalog-backed fields in HISTORICAL_RUTAP_QUERY: entity CUIT/name now resolve through entidad_id; tipo_servicio through regimen_servicio_modalidad_id; linea through linea_id; unidad_propulsora through qualified motor/unidad_propulsora; tipo through vehiculos_subtipos_transporte; piso through qualified carroceria/piso; motor through motor_fabricante_id; aire_acondicionado, cabina_antivandalica, ADAS, MDVR, pantallas, WiFi, conexiones USB and identidad through qualified general/respuesta_binaria; carroceria_categoria through exact match to vehiculo/categoria_regulatoria valor_opcion (no FK). raw_tipo_motor was already catalog-only in v5.6.146. Removed raw_* output fallbacks and added source assertions in route.ts and rutap-history-values.test.ts. Exact category match intentionally leaves nonmatching values blank (including book M3 with trailing spaces); researcher M2/M3 evidence remains relevant. Kept raw values for free-text/numeric/date/series fields: dominio, interno, anio_modelo, chassis/motor serials, asientos, consumo, IDs/IPs, dates, observaciones, expedientes. No DB, runtime, test, lint, or typecheck gates run by this lane.
-
audit pass: route.ts historico report: 17 fields moved from raw-coalesce to catalog/FK-only (entidad_historica, servicio_historico, linea_historica, fabricante_motor, op_categoria_regulatoria exact-match); test file 54/54 regex assertions rerun independently
payload
{"scope":"route.ts historico report: 17 fields moved from raw-coalesce to catalog/FK-only (entidad_historica, servicio_historico, linea_historica, fabricante_motor, op_categoria_regulatoria exact-match); test file 54/54 regex assertions rerun independently","outcome":"pass","evidence":"entidadId/lineaId/regimenServicioModalidadId/motorFabricanteId confirmed real FK columns in schema.ts; identificadorEmpresa swap to entidad_historica.nombre matches the EXISTING canonical pattern at vehiculos.ts:214 and the documented 2026-09-08 rule (vehiculos.ts:172-190): historial stores frozen write-time label twins, but visible surfaces must re-resolve by catalog/FK, never trust the frozen text. carroceriaCategoria exact-match against retired catalog is consistent with the documented 'sin fuente estructurada' note (no FK exists yet, pending MOVILBA-546)","reportRef":null} -
2026-10-02 14:26 coder03-mba-l-cc: real download exercised by proxy on dev01 v5.6.148: Historial RUTAP XLSX 8.6MB, 5673 data rows, no SQL error. PROD download and pod 148 still pending.
-
coder03-mba-l-cc 2026-10-05: the Historial RUTAP report was downloaded on PROD for the first time (proxy-mba-w-cc, v5.6.150): 5548 data rows, A1:AM5549, no error. Artifact /data-lezama/movilba/evidencia/MOVILBA-663/2026-10-05-1210-vehiculos-historico-rutap.xlsx. NOT EXERCISED: checking each of the 17 catalog fields cell by cell.
-
Wave-2 closeout: shipped/audited scope is live; remaining checks or separate decision items are tracked outside this item's shipped scope.