Reporte 5: liquidación mensual del Parque Móvil
Elazar CLI 2026-09-05: este es el PRIMER reporte de la seccion Reportes. Es el informe de liquidacion mensual que Eugenia arma a mano desde el libro: columnas Linea, CUIT, Dominio, Interno, Año_Modelo, Motorizacion, Fecha alta, Fecha baja (ejemplo /data-lezama/docs/validadoras/Info_Liquid_2026-07-vf-ByEugenia.xlsx, 1611 dominios, 30 lineas, 23 CUIT, julio 2026; un CSV 'ByScript' de origen desconocido da 1606, 5 menos). Regla de derivacion documentada por Eugenia en la hoja 'Procesamiento': corte por fecha de baja < fin de mes y alta > mes siguiente, dedupe por Linea_Dominio_Interno quedandose con la fecha de alta menor, fecha alta = primera inscripcion del vehiculo sin importar la empresa, fecha baja = la mayor. Parametro: mes. Salida: pantalla + xlsx. Gate: contra el xlsx de Eugenia del mismo mes, diferencias enumeradas por dominio (nunca 'coincide'). Asignado a coder03 porque el CLI exige asignatario en p1; Elazar no lo asigno, reasignable.
Sub-tickets — 1/1 done
Activity
-
parent=#3166
-
coder03 arranca por orden del PM 2026-09-05 07:19 (prioridad sobre 266)
-
Gate tools/liquidacion-vs-eugenia.ts vs Eugenia Info_Liquid 2026-07 on DEV: 1400/1606 dominios identical; 183 differ (alta 127, cuit 53, interno 3, linea 1); 23 only-Eugenia (2 of them null fecha_alta in v_vehiculos_export); 15 only-app (AI032JK..JV with linea 0, AI105RH, AG986KG, ZZ001ZZ/ZZ002ZZ test plates). Root of alta diffs: Eugenia uses first-ever registration date over all history, v_vehiculos_export uses latest-period alta. Root of cuit diffs: Eugenia's CUIT = entidad assigned to the linea (linea_entidad_asignaciones), view = last-period entidad. Both are v_vehiculos_export rule decisions for Elazar/db lane; the report reads the view as-is. UI not opened in a browser: /reportes stays gated until RBAC resource reportes exists (MOVILBA-160).
-
Shipped to dev branch as v5.4.222 (ef3a0ef6; commits a6cc90f2 seed audit r1, 7fb4d9d2 report). NOT built on dev01: post-receive hook (MOVILBA-261 rewrite, 06:52) fails at sudo -n for pnpm install; dev01 serves the 06:43 build, /api/reportes/liquidacion 404. Diff sent to audit. UI unexercised until the hook is fixed and a rebuild runs.
-
v5.4.224 (790990f5) BUILT on dev01 (BUILD_ID 08:03): fix 0b266abb - client page imported the db module (pg in browser bundle broke 4 deploys); pure helpers split to liquidacion-formato.ts; CSV removed; cortes named corteBajas/corteAltas; audit r1 applied on 267/268. RBAC reportes:read live in DEV (db03). Still not opened in a browser.
-
Audit r1 (0b266abb) items 6-7: v5.4.222 never built (use client page pulled pg into browser bundle); split into liquidacion-formato.ts is the fix. reportes:read exists in DEV since 07:37 -> feature status is UNOPENED (in a browser), no longer unreachable. Rule change 97248c8a: fecha_alta per VEHICLE (latest 'Alta' tramite to the cut, else first period), not chassis chain; measured vs Eugenia July: alta diffs 127->5, 1599/1606 alta equal. PM hypotheses (first-ever alta / line's cuit) measured and refuted: 139 worse, cuit identical to view in all 53. Residual data questions: cuit linea 26 (54 buses, Eugenia=17 DE AGOSTO vs ours NUEVOS RUMBOS) and linea 25 (2); 7 alta rows; 18 only-Eugenia / 20 only-app.
-
Alta rule 57256cb7 shipped in v5.4.230 (same deploy). Report keeps view cuit; linea 26/25 entidad question goes to Eugenia's tracker via PM.
-
View-rule finding split out as MOVILBA-280 (chassis-chain alta + 131 vehicles with no Alta row).
-
Audit r1 applied 6a527e02 (v5.4.231): tramite compared via tramite_id/v_opciones (165 DEV rows have ALTA id with NULL text); view-exception and UI-rows caveat stated in SQL. Gate unchanged: alta 5, 1523/1588 identical, July only.
-
Audit r2 applied 0c0212ea (v5.4.232): report asserts exactly one live ALTA option for vehiculo_historial.tramite in v_opciones before querying (fails loudly instead of silent fallback).
-
Audit closed 08:42 on 0c0212ea. Catalog assertion (v_opciones vehiculo_historial/tramite/ALTA = 1) has run once end-to-end via tools/liquidacion-vs-eugenia.ts on DEV (passed, then report produced). 1599/1606 is July-only; never a GO figure.
-
v5.4.235 (9224406f, bump f6b900ad): SQL comment updated for MOVILBA-281 (UI rows now carry tramite_id MODIF since d4155333; pre-281 UI rows stay NULL; neither is ALTA, both in min() fallback). Comment-only, report behavior unchanged. BUILD_ID 09:07, serviceId decode 235.
-
min() fallback exposure, measured DEV 2026-09-05 09:15 (corteAltas 2026-08-01, denominator v_vehiculos_export 2412, all 2412 have historial): 154 vehicles take the min() branch. Of those: 121 have only MODIF periods (imported, no Alta row = MOVILBA-280 shape), 23 have an ALTA only after the corte, 5 have all periods tramite_id NULL (UI pre-281), 1 mixes MODIF+NULL. 0 vehicles without historial. The 121 and 5 are where the report's fecha_alta rests on the earliest period, not on a tramite. Audit follow-ups for next touch of liquidacion.ts (no deploy on their own): restore 'La regla describe filas IMPORTADAS'; name the third writer class assignToEntidad/assignToLinea (motivo_id, never tramite_id, before and after 281).
-
v5.4.238 (32abfd36, bump 5d9c6e96): per-run fallback count. Query emits alta_por_tramite per vehicle; result.altaSinTramite; Procesamiento sheet line; route log field; gate tool prints it. Report columns unchanged. Exercised via tools/liquidacion-vs-eugenia.ts on DEV July 2026: 126 of 1608 report rows via min() (154 of 2412 in export; 28 filtered out), gate unchanged 1523/65. Comment: IMPORTADAS scope restored, assignToEntidad/assignToLinea named. BUILD_ID 09:25, serviceId decode 238. Sent to audit. Not exercised: browser download.
-
Audit GO on 32abfd36 (v5.4.238), nothing to fix; decode verified independently. Note for next touch: Row is Record<string, unknown>, so a renamed SQL alias makes altaSinTramite == filas.length (loud, not silent). Audit did not exercise the running app; browser download and page.tsx still unexercised by anyone.
-
Reporte 5: liquidación mensual del Parque Móvil
-
coder03assistant-mba-l-ca | 2026-09-24 04:00:26 ART dev 7d299b6a; main 721b9eb8: /reportes/liquidacion and its export code exist; prior July comparison recorded 1523 matches/65 diffs against Eugenia. The requested difference-by-dominio reconciliation and generated screen/XLSX were not re-exercised; leave open.
-
coder04-mba-l-ca
-
coder04-mba-l-ca | 2026-10-02 11:12 ART. Re-ran tools/liquidacion-vs-eugenia.ts against movilba_dev (current_database verified) using /data-lezama/movilba/docs/validadoras/Info_Liquid_2026-07-vf-ByEugenia.xlsx and the app's liquidacionMensual(2026-07). Eugenia: 1609 rows/1606 dominios; app: 1603 rows/domains, 34 without alta date excluded. 19 workbook-only, 16 app-only; 75 shared-domain differences: linea 6, CUIT 55, interno 14, año 1, motor 1, alta 5, baja 0; 1512 shared domains match. Script suppresses CUIT values. This is DEV-only; no code change or browser/UI/XLSX download verification. These are measurements to classify before changing report logic.
-
coder04-mba-l-ca | 2026-10-02 12:xx ART. Classified the DEV July-2026 comparison against the workbook Info_Liquid_2026-07-vf-ByEugenia.xlsx and current month-end history (snapshot 20; periods active 2026-07-31), not PROD or an archived July DB. The 75 shared-domain mismatches (linea 6, CUIT 55, interno 14, año 1, motor 1, alta 5, baja 0) all match the workbook's linea/interno/CUIT/año/motor values when compared with the period active on 2026-07-31: 75/75 for each field. This classifies the non-date differences as current-state vs July-period selection, not independent label/FK mismatches. The 55 CUIT differences are all line 26; workbook CUIT matches the line assignment active on 2026-07-31, not the current owner/current report value. Five alta mismatches remain a separate unresolved rule/data issue; previous printed date detail was not reliable, so no classification claimed. Membership remains 19 workbook-only/16 app-only; 33 app rows excluded for missing alta. Evidence counts are DEV-only and do not establish PROD behavior. No code change, UI, or XLSX download exercised. Evidence: /data-lezama/movilba/evidencia/MOVILBA-268/2026-10-02-dev-julio-detail.txt
-
coder04-mba-l-ca | 2026-10-02 12:15 ART. Timestamp correction for preceding MOVILBA-268 progress event: its body used placeholder 12:xx; this event's timestamp is the accurate signature time. The preceding measurement and evidence are unchanged.
-
coder04-mba-l-ca | 2026-10-02 12:16 ART. Classification, DEV only: compared Info_Liquid_2026-07-vf-ByEugenia.xlsx to the report and month-end history at 2026-07-31 (snapshot 20). Of 75 shared-domain mismatches (linea 6, CUIT 55, interno 14, año 1, motor 1, alta 5, baja 0), each domain's period active on 2026-07-31 matches the workbook for linea/interno/CUIT/año/motor: 75/75 each. The differences in those fields are current-state vs July-period selection, not independently established data defects. All 55 CUIT mismatches are line 26; workbook values match the assignment active on 2026-07-31, not current owner. Five alta mismatches remain unresolved (no reliable classification); 19 workbook-only, 16 app-only; 33 app rows excluded for missing alta. This is current DEV history, not PROD or archived July DB. No code/UI/XLSX download exercised. Evidence: /data-lezama/movilba/evidencia/MOVILBA-268/2026-10-02-dev-julio-detail.txt
-
coder04-mba-l-ca | 2026-10-02 12:15 ART. Use this concise classification; it supersedes my two prior progress bodies (one had a placeholder timestamp and both were truncated). DEV only: July workbook vs app report had 75 shared-domain differences (linea 6, CUIT 55, interno 14, año 1, motor 1, alta 5, baja 0). Compared with each dominio's period active 2026-07-31 in current history snapshot 20, workbook matched 75/75 for linea, interno, CUIT, año and motor. Thus these non-date differences are current-state vs July-period selection, not established independent data defects. All 55 CUIT differences are line 26 and match its July-31 assignment, not current owner. Five alta diffs remain unresolved. Counts are not PROD evidence; no UI/XLSX download run. Evidence path: /data-lezama/movilba/evidencia/MOVILBA-268/2026-10-02-dev-julio-detail.txt
-
coder04-mba-l-ca | 2026-10-02 12:16 ART. Final classification (supersedes prior truncated notes), DEV only: among 75 July-2026 workbook/report domain differences, periods active 2026-07-31 in current history snapshot 20 match workbook values 75/75 for linea, interno, CUIT, año and motor. These reflect current-state vs July-period selection; not established independent defects. All 55 CUIT diffs are line 26 and match the July-31 assignment, not current owner. Five alta diffs unresolved. No PROD inference or UI/XLSX download. Evidence: /data-lezama/movilba/evidencia/MOVILBA-268/2026-10-02-dev-julio-detail.txt
-
coder04-mba-l-ca | 2026-10-02 12:16 ART. Final classification; supersedes prior notes. DEV only: 75 July workbook/report domain diffs. Current history snapshot 20 periods active 2026-07-31 match workbook 75/75 on linea, interno, CUIT, year and motor: current-state vs July-period selection, not established independent defects. All 55 CUIT diffs are line 26 and match the July-31 assignment. Five alta diffs unresolved. No PROD inference or UI/XLSX download. Evidence: /data-lezama/movilba/evidencia/MOVILBA-268/2026-10-02-dev-julio-detail.txt
-
coder04-mba-l-ca | 2026-10-02 12:16 ART. Final classification; supersedes prior notes. DEV only: 75 July workbook/report domain diffs. Current history snapshot 20, period active 2026-07-31, matches workbook 75/75 on linea, interno, CUIT, year, motor. This is current-state vs July-period selection, not proven data defects. All 55 CUIT diffs are line 26; July assignment matches workbook. Five alta diffs unresolved. No PROD inference or UI/XLSX download. Evidence: /data-lezama/movilba/evidencia/MOVILBA-268/2026-10-02-dev-julio-detail.txt
-
coder04-mba-l-ca | 2026-10-02 12:16 ART. Final; supersedes prior notes. DEV only: current snapshot-20 periods active 2026-07-31 match Eugenia's July workbook 75/75 for linea, interno, CUIT, year and motor. The 75 diffs therefore reflect current-state vs July-period selection, not proven data defects; all 55 CUIT diffs are line 26. Five alta diffs unresolved. No PROD, UI or XLSX-download verification. Evidence: /data-lezama/movilba/evidencia/MOVILBA-268/2026-10-02-dev-julio-detail.txt
-
coder04-mba-l-ca | 2026-10-02 12:16 ART. Final; supersedes prior notes. DEV only: snapshot-20 periods active 2026-07-31 match the July workbook 75/75 on linea, interno, CUIT, year, motor. Differences are current-state vs July-period selection, not proven defects. All 55 CUIT diffs are line 26. Five alta diffs unresolved. No PROD/UI/XLSX verification. Evidence: /data-lezama/movilba/evidencia/MOVILBA-268/2026-10-02-dev-julio-detail.txt
-
coder04-mba-l-ca | 2026-10-02 12:17 ART. Supersedes prior notes. DEV only: snapshot-20 periods active 2026-07-31 match July workbook 75/75 on linea, interno, CUIT, year and motor; these diffs reflect current-state vs July-period selection, not proven defects. All 55 CUIT diffs are line 26. Five alta diffs unresolved. No PROD/UI/XLSX verification. Evidence: /data-lezama/movilba/evidencia/MOVILBA-268/2026-10-02-dev-julio-detail.txt
-
coder04-mba-l-ca | 2026-10-02 12:17 ART. Supersedes prior notes. DEV only: snapshot-20 July-31 periods match July workbook 75/75 for linea, interno, CUIT, year, motor. These diffs reflect current-vs-July-period selection, not proven defects. 55 CUIT mismatches all line 26. Five alta unresolved. No PROD/UI/XLSX check.
-
coder04-mba-l-ca | 2026-10-02 12:17 ART. Alta mismatch classification in /data-lezama/movilba/evidencia/MOVILBA-268/2026-10-02-alta-five.txt (workbook cells vs current DEV snapshot-20 history): AE870RA, AA114VT reflect first-period dates while report follows latest-ALTA rule; PPF407's workbook date matches neither current history date; AI380TC/TE differ by one day. Last three source discrepancies unresolved. No code/UI/XLSX download.
-
coder04-mba-l-ca | 2026-10-02 12:21 ART. Five alta cases classified in /data-lezama/movilba/evidencia/MOVILBA-268/2026-10-02-alta-five.txt (workbook vs current DEV snapshot 20): AE870RA and AA114VT match first-period date; app follows latest-ALTA rule. PPF407 matches neither history date; AI380TC/TE differ by one day. Those three source mismatches unresolved. No UI/XLSX download.
-
coder04-mba-l-ca | 2026-10-02 12:21 ART. Alta findings: /data-lezama/movilba/evidencia/MOVILBA-268/2026-10-02-alta-five.txt. Current DEV snapshot 20: AE870RA/AA114VT workbook matches first period; app uses latest ALTA rule. PPF407 matches neither history date; AI380TC/TE differ by one day. Those 3 source discrepancies unresolved. No UI/XLSX download.
-
coder04-mba-l-ca | 2026-10-02 12:21 ART. Details: /data-lezama/movilba/evidencia/MOVILBA-268/2026-10-02-alta-five.txt. Current DEV snapshot 20: AE870RA/AA114VT workbook matches first period; app uses latest ALTA. PPF407 matches neither date; AI380TC/TE differ by one day. Three source mismatches unresolved; no UI/XLSX check.
-
coder04-mba-l-ca | 2026-10-02 12:21 ART. Full alta classification: /data-lezama/movilba/evidencia/MOVILBA-268/2026-10-02-alta-five.txt. DEV: AE870RA/AA114VT match first period, app follows latest ALTA; PPF407 matches neither date; AI380TC/TE differ by one day. Three source discrepancies unresolved; no UI/XLSX check.
-
coder04-mba-l-ca | 2026-10-02 12:22 ART. Follow-up to MOVILBA-268: for the five cases, current DEV raw_fecha_alta equals fecha_alta and raw_tramite agrees with the qualified catalog. AI380TC/TE workbook dates differ by one day; PPF407's workbook date is absent from its current timeline. Current snapshot cannot establish July-era source; these three remain unresolved. Evidence file updated.
-
coder04-mba-l-ca | 2026-10-02 12:23 ART. MOVILBA-268: current DEV raw_fecha_alta equals fecha_alta and raw_tramite matches catalog for all five cases. AI380TC/TE workbook dates differ by one day; PPF407 workbook date is absent from current timeline. July-era source remains unverified. Evidence file updated.
-
coder04-mba-l-ca | 2026-10-02 13:20 ART PROD measurement: base movilba, current imported snapshot 8. Compared the July workbook Informe/Fecha alta (SHA256 44682ebb9966d53e5378a7b1c429de195822b6e34ab8350f605f25832b7c298b) with the exact selection CTE/cutoffs in src/lib/reportes/liquidacion.ts (month 2026-07, alta cutoff 2026-08-01, baja cutoff 2026-07-31); ran read-only SQL, not browser/XLSX export. Workbook -> SQL report date; current nondeleted history (date/trámite): AI380TC 2026-07-02 -> 2026-07-01; 2026-07-01 ALTA. AI380TE 2026-07-02 -> 2026-07-01; 2026-07-01 ALTA. PPF407 2025-07-17 -> 2026-04-01; 2025-07-08 ALTA, 2026-04-01 ALTA, 2026-07-17 MODIF. AE870RA 2026-01-12 -> 2026-03-27; 2026-01-12 ALTA, 2026-03-27 ALTA. AA114VT 2026-06-16 -> 2026-06-25; 2026-06-16 MODIF, 2026-06-25 ALTA, 2026-09-09 MODIF. All 10 rows are snapshot-8 imports; raw_fecha_alta equals fecha_alta and raw_tramite resolves to the qualified catalog value. AI380TC/TE are one-day book/current-source differences; AE870RA differs by first-vs-latest ALTA selection; AA114VT workbook date is its first MODIF period; PPF407 workbook date matches no Alta and equals a current MODIF date. Current PROD cannot reconstruct the historical July source, so source-vs-rule cause remains unresolved for these five. No code change.
-
audit pass: Measurement methodology review only (status unchanged): cutoffs/selection rule in progress event checked against liquidacion.ts/liquidacion-formato.ts.
payload
{"scope":"Measurement methodology review only (status unchanged): cutoffs/selection rule in progress event checked against liquidacion.ts/liquidacion-formato.ts.","outcome":"pass","evidence":"corteAltas=2026-08-01/corteBajas=2026-07-31 confirmed from cortesDelMes. AE870RA 'first-vs-latest ALTA' matches code's documented max(fecha_alta) FILTER up-to-cutoff rule, not a bug. DB EXECUTION NOT PERFORMED BY AUDIT - no creds, could not rerun the SQL myself.","reportRef":null} -
parent=MOVILBA-99
-
2026-10-05: remeasured July report on PROD+DEV. The three dates (AI380TC, AI380TE, PPF407) reproduce identically; current RUTAP raw+normalized rows agree and report follows latest-ALTA cutoff rule. Historic July source snapshot unavailable; evidence /data-lezama/movilba/evidencia/MOVILBA-268/2026-10-05-prod-dev-three-alta-differences.md. No code/data change; status unchanged pending Elazar's disposition of unreconstructable historical source.
-
2026-10-05 ART: Closed per Elazar/coder03 direction. PROD and DEV were remeasured against the current book; current import rows are faithful. The July snapshot source is unavailable, so no historical July comparison is actionable; do not continue archaeology.