El PDF del historial arma los cambios desde el diff crudo y no pasa por deriveHistoryChanges: sigue mostrando (vacío) y campos iguales
The PDF history path (src/app/vehiculos/[dominio]/page.tsx) bypasses the screen derivation: raw cambios renders 'A (vacio)' or omits the new value (including modified ID MDVR), because app-written periods carry no raw book columns and the diff reads only raw. Route PDF output through the same normalized history derivation as HistoryPeriodContent and add regression coverage. Close only after a generated PDF is visually verified. SCOPE CORRECTION 2026-09-24, from audit-mba-l-ca's finding at 05:19 ART. The previous description also asked that 'Vigencia desde use the modification date instead of the old Alta date'. DO NOT IMPLEMENT THAT CLAUSE - it is inverted. MOVILBA-525 settled the opposite rule, that Vigencia desde is the ORIGINAL Alta, it carries a passing regression, and it was verified in a real AC736PL PDF on dev01 at 05:07 ART (Alta 2025-07-08, five later Modif, PDF printed 08/07/2025). Vigencia desde belongs to 525 and is closed. The duplicate Entidad / Indicador de la linea text is MOVILBA-414, also its own item. What remains in 456 is the raw-versus-typed cambios diff and nothing else.
Activity
-
parent=#3883
-
Tracker download 2026-09-19 explicitly reopens PDF item #8: modified ID MDVR still renders original followed by 'A (vacío)' and does not show the new value; unchanged fields must not be emitted.
-
was: The PDF history (src/app/vehiculos/[dominio]/page.tsx:1039) builds its 'cambios' text from the raw server h.cambios via cambioATexto and never calls deriveHistoryChanges. The screen suppresses equal and unknown pairs (MOVILBA-343, MOVILBA-450), but the PDF still prints 'De: (vacío) A: X' and unchanged fields. Rows 5 and 8 are marked Corregido but are not fixed on the PDF. Fix: route the PDF through the same derivation as HistoryPeriodContent.
-
coder03-mba-l-ca / coder
-
Entrypoints medidos por db04-mba-l-ca en el checkout actual 2026-09-23 12:16 ART (Resueltos #72). NO son prueba de deploy: src/app/vehiculos/[dominio]/page.tsx mapa :1013-1084, renderer src/components/pdf/GenericReport.tsx; comparar contra src/lib/rutap-history-presentation.ts deriveHistoryChanges, usado por HistoryPeriodContent.tsx:131. Pendiente: medir comportamiento en el arbol actual, datar por ancestria despues.
-
coder04-mba-l-ca | 2026-09-24 04:01 ART. Measured dev src/app/vehiculos/[dominio]/page.tsx:1042-1043: PDF history maps raw cambios through cambioATexto, while screen uses deriveHistoryChanges at src/components/HistoryPeriodContent.tsx:131. PDF phantom-change path remains open; rendered PDF not re-exercised.
-
coder04-mba-l-ca / coder
-
coder03-mba-l-cc 2026-09-24 05:10 -03 - REABIERTO por la stakeholder en la bajada 2026-09-24-0434 (sha256 a666949b...0d0d93), hoja Para Elazar fila 7, columna G. El titulo de este item ya nombraba la causa; lo que agrego es la MEDICION de la cadena entera, y el hallazgo de que la planilla lleva una respuesta FALSA. LA RESPUESTA REGISTRADA EN LA PLANILLA ES FALSA: E7 dice 'El historial del PDF informa unicamente los campos que realmente cambiaron'. Este item estaba ABIERTO en backlog cuando eso se escribio, y su propio titulo dice lo contrario. Una respuesta de 'arreglado' sobre un item abierto es peor que no contestar: la stakeholder la prueba, ve que sigue roto, y lo que se gasta es su confianza en todo el resto de la columna. CADENA COMPLETA, medida y no inferida. (1) src/lib/rutap-history-diff.ts:175 - diffRows lee UNICAMENTE las columnas crudas del libro, current = normalizeRaw(actual.raw[col]). (2) Las filas escritas por el app NO TIENEN columnas crudas: en DEV, rutap.vehiculo_historial_normalizado para EG111AA son 3 filas origen=app y raw_nro_interno, raw_id_mdvr, raw_nro_dominio y raw_linea son NULL en las tres. O sea que para un periodo del app todo campo vale '' y el diff contra una fila importada anterior emite previous=X, current=''. (3) src/lib/historial-vehiculo.ts:39 imprime eso como 'De: X A: (vacio)'. Eso es exactamente lo que reporta la stakeholder sobre ID MDVR, y su nota de que podria pasar con cualquier otro campo es CORRECTA - no es especifico de MDVR, es todo campo de un periodo escrito por el app. POR QUE LA PANTALLA NO LO MUESTRA Y EL PDF SI, que es la asimetria que hace que esto sobreviva a la prueba de un desarrollador: src/lib/rutap-history-presentation.ts:39-42 siembra los campos desde los valores TIPADOS cuando el origen es app, y :56-63 suprime el par cuando el blanco no es evidencia. El PDF no llama a deriveHistoryChanges - src/app/vehiculos/[dominio]/page.tsx:1042 mapea h.cambios crudo por cambioATexto. Y esto NO es un descuido: el comentario de rutap-history-presentation.ts:9-12 lo declara, dice que PDF y API retienen el diff crudo y que sus conteos pueden diferir de la UI honesta. O sea que la divergencia esta documentada como decision y la planilla la contesto como arreglo. QUE NO MEDI: no genere un PDF. Lo demostrado es que la cadena de datos produce current='' para un periodo del app y que la superficie del PDF imprime ese par sin el filtro de la pantalla; el render real no lo ejercite. Subo la prioridad: la reabrio la stakeholder y hay una respuesta falsa publicada.
-
0
-
coder04-mba-l-ca | 2026-09-24 06:25 ART. Implemented PDF history through shared typed derivation; prior-code static control seen failing. Focused tests and typecheck now pass. Awaiting independent audit; generated-PDF visual check remains open.
-
audit-mba-l-ca | 2026-09-24 05:19 ART. Ticket description is internally stale on Vigencia desde: it asks to use the modification date, but MOVILBA-525 requires original ALTA, has a passing regression and was verified in a real AC736PL PDF on dev01 at 05:07 ART (Alta 2025-07-08, five later Modif, PDF printed 08/07/2025). Do not implement that clause of 456. Clarify its description to defer Vigencia desde to 525; this wording conflict does not block the independent raw-versus-typed cambios fix. Generated PDF for the new cambios path still unexercised, so do not close 456 on this code review.
-
audit pass: Uncommitted typed-change derivation for vehicle history PDF in vehiculo-pdf-history.ts/.test.ts and page.tsx history block; not a generated-PDF or ticket-closure verdict. Unrelated MOVILBA-174 page hunks excluded.
payload
{"scope":"Uncommitted typed-change derivation for vehicle history PDF in vehiculo-pdf-history.ts/.test.ts and page.tsx history block; not a generated-PDF or ticket-closure verdict. Unrelated MOVILBA-174 page hunks excluded.","outcome":"pass","evidence":"audit-mba-l-ca | 2026-09-24 05:19 ART. Page history block finds predecessor by anteriorId in fetched canonical chain and calls derivePdfHistoryChanges; helper uses shared deriveHistoryChanges with typed current/previous values and excludes metadata fields already printed. Test models app row with raw blank current but typed Interno 43->44 and ID MDVR OLD->NEW; output contains those two lines, not (vacio) or unchanged Empresa/Linea. Independently ran pnpm exec tsx --test src/lib/vehiculo-pdf-history.test.ts src/lib/rutap-history-presentation.test.ts src/lib/vehiculo-pdf-vigencia.test.ts: 4/4 pass; pnpm run typecheck: exit 0; git diff --check on tracked scope: exit 0. Coder reports static pre-fix control red, not independently replayed. No real generated PDF visually inspected; item must remain open. Vigencia desde clause conflicts with completed/real-PDF-verified MOVILBA-525 original-ALTA rule; audit-finding recorded to correct description, not a blocker to this cambios diff.","reportRef":null} -
was: The PDF history path (src/app/vehiculos/[dominio]/page.tsx) bypasses the screen derivation and still has three stakeholder-visible regressions in tracker 2026-09-19 Para Elazar #6-8: duplicate Entidad/Indicador de linea text, Vigencia desde uses the old Alta date instead of the modification date, and raw cambios renders A (vacio) or omits the new value (including modified ID MDVR). Route PDF output through the same normalized history derivation as HistoryPeriodContent and add regression coverage for all three cases. Close only after a generated PDF is visually verified.
-
coder04-mba-l-ca | 2026-09-24 05:20 ART. PDF history now derives displayed changes from typed predecessor/current values via the shared derivation; old-code regression control was seen failing, then focused tests passed 4/4 and typecheck passed. audit-mba-l-ca recorded scoped PASS for the code fix; no generated PDF was visually checked, so ticket remains inProgress. The stale Vigencia desde clause was corrected: preserve original Alta per MOVILBA-525; do not change that rule. Unrelated MOVILBA-174 page hunks excluded.
-
coder03assistant-mba-l-ca | 2026-09-24 08:10 ART — Re-verification on dev01: UI footer reports v5.6.56; /api/health returned status=ok, database=connected, environment=dev, serviceId=8583, with no version field. Proxy has not generated a current PDF for EG111AA/LP680FF, so PDF history behavior on this build remains unverified. Keeping open pending generated-PDF inspection.
-
coder03assistant-mba-l-ca | 2026-09-24 08:17 ART — Proxy reports dev01 login expired; current PDF-history checks for EG111AA/LP680FF were not run. PDF export also awaits Elazar's in-chat approval. Re-test after login and approval.
-
coder03-mba-l-cc 2026-09-28 14:5x ART. Instrument check, measured not inferred: dev01 does NOT need a browser session. The headless NextAuth path is intact - GET https://dev01.movilba.com/api/auth/csrf returns a csrfToken, and POST /api/auth/callback/credentials with email+password+csrfToken+redirect=false, carrying a cookie jar, is answered normally (302 with the outcome in the Location, never a 401); a success leaves a session readable at GET /api/auth/session. dev01 itself answers 200 at /. Ran it once with the account in memory: 302 -> /user/login?error=CredentialsSignin&code=INVALID_CREDENTIALS, requestId 876c3f48-2ef7-4b7b-b52c-b50407abc510, and /api/auth/session returns null. So the single missing thing is a VALID dev01 password, not a browser, not the proxy, not an OIDC redirect. Recording a blocker as 'needs an authenticated browser session' overstates it and sends the next lane looking for the wrong instrument. Note also that elazar.pimentel@gmail.com on dev01 is group VIEWER (read-only), so even a working password for it would not satisfy a blocker that has to SUBMIT a form. I am not requesting a credential reset: standing order is that nobody rotates or requests a reset without Elazar's explicit ask. Escalated to him on the CLI.
-
coder03-mba-l-cc 2026-10-01. El blockedReason del 09-24 esta vencido en su primera mitad y hay que corregir lo que dice del codigo: el arreglo YA ESTA, y esta en produccion. El camino del PDF si pasa por la derivacion compartida. src/app/vehiculos/[dominio]/page.tsx:1039 llama derivePdfHistoryChanges, y esa funcion -src/lib/vehiculo-pdf-history.ts:50- llama deriveHistoryChanges, la misma que usa HistoryPeriodContent, pasandole los periodos tipados y no el diff crudo, con PDF_RENDERED_HISTORY_FIELDS para no repetir en la lista de cambios los campos que el PDF ya imprime en sus propias lineas. O sea que el defecto descrito -armar los cambios desde el crudo, que es lo que producia 'A (vacio)' y los campos iguales en periodos escritos por la app- no esta mas en el codigo. Hay cobertura en src/lib/vehiculo-pdf-history.test.ts, y uno de sus asserts -linea 18- exige que la page siga llamando a derivePdfHistoryChanges, asi que un futuro bypass rompe el test en lugar de pasar en silencio. Nota de metodo: mi primer grep de deriveHistoryChanges parecia decir que solo HistoryPeriodContent la usaba, y era el 'head -10' del propio grep cortando el resultado, no una ausencia. Lo que falta para cerrar es SOLO la verificacion que pide la descripcion: un PDF generado y mirado. Eso necesita una sesion de navegador en dev01, que esta detras de AD, y ningun agente tipea las credenciales de Elazar en un formulario. Asi que el blocker real no es el login vencido ni ninguna aprobacion pendiente: es un pedido de un renglon a Elazar. La segunda mitad del blockedReason, 'PDF export also awaits Elazar in-chat approval', no tiene nada que la respalde en el ticket ni en el historial y no se puede verificar, asi que no la trato como un gate. Si alguien tiene la referencia, que la pegue.
-
Falta solo mirar un PDF generado en dev01, que pide una sesion de navegador detras de AD - pedido a Elazar
-
coder03-mba-l-cc 2026-10-01, correccion de mi propia nota de hace dos minutos. Escribi que la verificacion pide 'una sesion de navegador en dev01 detras de AD'. Es falso y mi propia medicion del 2026-09-28, en este mismo ticket, dice lo contrario: dev01 NO necesita navegador. El camino headless de NextAuth esta sano -GET /api/auth/csrf devuelve csrfToken y POST /api/auth/callback/credentials con jar de cookies contesta 302 con el resultado en el Location-, asi que lo unico que falta es una CLAVE valida de dev01, no un navegador, no el proxy, no AD. Dejar escrito 'necesita navegador' manda al proximo carril a buscar el instrumento equivocado, que es justo lo que esa nota del 28 vino a corregir, y lo repeti. Pedido real a Elazar, y es solo eso: la clave de dev01 que este vigente. La que tengo en memoria -dev_viewer_elazar- esta caducada desde el 08-31. No pido ni propongo resetear nada. Y hay un paso que avanza sin ninguna credencial, que es el que tomo: pasar los periodos REALES de EG111AA y LP680FF por derivePdfHistoryChanges en un harness de node e imprimir las lineas de cambio exactas que el PDF emitiria. Eso mide el CONTENIDO, que es el defecto que el ticket describe, y deja afuera solo la maquetacion. Le pedi a db04 las filas tal como las devuelve la consulta del PDF.
-
Falta la verificacion de contenido del PDF. Instrumento: no es un navegador - es una clave vigente de dev01 (la de memoria caduco el 08-31), o el harness de node con filas reales, que no pide credencial. Pedido a Elazar en CLI y filas pedidas a db04.
-
coder03-mba-l-cc 2026-10-01, medicion de CONTENIDO sin credencial, sin navegador y sin proxy. Corri el mismo camino que handleExportPDF contra movilba_dev -confirmado con current_database()- en un harness de node: getRutapHistorialByChain(id) -> toRutapHistorialItems -> derivePdfHistoryChanges por periodo, imprimiendo las lineas de cambio exactas que el PDF emitiria. Solo SELECT. EG111AA, vehiculo_id 6776, cuatro periodos. LP680FF, vehiculo_id 6777, nueve. El defecto que describe el ticket no aparece en ninguna linea: cero '(vacio)', cero campos con valor nuevo ausente, y el ID MDVR -el campo nombrado en la descripcion- sale con sus dos valores, 'ID MDVR: De: 88000006422 -> A: 717796' en el periodo 286428. El control esta en la comparacion con el comportamiento viejo, y es la parte que vale: los periodos escritos por la app traen cambios CRUDOS = 0, que es exactamente lo que el PDF viejo leia, y la derivacion compartida saca 4, 3 y 1 lineas en esos mismos periodos -286428, 286430, 286431-. O sea que el camino viejo imprimia nada o '(vacio)' ahi donde el nuevo imprime el cambio real, y eso se vio en los datos, no se infirio del diff. Falso defecto que descarte en el camino, anotado para que no lo vuelva a filar nadie: la linea 'Tipo de vehiculo: De: 4 -> A: 3' NO es un id crudo colandose a una superficie. Medi v_ui_vehiculo_subtipo_colectivo en DEV y la etiqueta del catalogo ES el digito -id 3 -> codigo '4', id 17 -> codigo '3', id 18 -> '2', id 6 -> '1'-, y la columna de etiqueta es 'codigo'. El valor mostrado es la etiqueta del catalogo, que da la casualidad de ser un numero. SIN EJERCITAR, y es lo unico que queda: la MAQUETACION del PDF generado. Esta medicion cubre el contenido de la lista de cambios y no abre un PDF, asi que no toca tipografia, cortes de pagina ni orden visual. Tampoco ejercita periodos de origen 'import' en esta cadena: los nueve de LP680FF y los cuatro de EG111AA son todos origen 'app'. Los periodos 286426, 286429 y 286438 derivan cero cambios y no investigue si eso es correcto para ellos.
-
Contenido VERIFICADO contra DEV el 2026-10-01 (ver evento verified): cero '(vacio)', ID MDVR con sus dos valores, y los periodos de app con cambios crudos=0 derivan 4/3/1 lineas, que es el control contra el comportamiento viejo. Queda SOLO la maquetacion de un PDF generado, que es lo que la descripcion exige para cerrar. Instrumento: abrir el PDF - no requiere clave de base, requiere una sesion de app. Correccion a mi blocker anterior: las filas NO se le pidieron a db04, las medi yo con DEV_DATABASE_URL de .env.local.
-
coder03-mba-l-cc 2026-10-01 17:35: the remaining leg of this item is not measurable with any instrument that exists today, and that is now its own item, MOVILBA-643. The ficha PDF is assembled inside handleExportPDF in src/app/vehiculos/[dominio]/page.tsx:725, inline between :745 and :1092, from a dozen variables derived from client component state, so nothing outside the component can produce the same ReportSection[]. Re-implementing the assembly to measure it would measure my copy, not the shipped surface, so it is not evidence. The renderer itself is not the obstacle - @react-pdf/renderer renders to a buffer in node and the only DOM in downloadReport is the blob download - so extracting the assembly into a pure function is what unblocks all three items at once. Until 643 lands, the only valid instrument is a real browser session on dev01, which needs Elazar at the login form. Do not report this as 'needs an authenticated session' without naming 643: the obstacle is the missing seam, not the session.
-
coder04-mba-l-ca | 2026-10-02 11:10 ART. Correction to earlier blocker: the remaining PDF layout check is not an authenticated-session blocker. MOVILBA-643 identifies the missing measurement seam: handleExportPDF builds ReportSection[] inline from component state, so an external harness cannot verify the shipped layout. Awaiting Elazar's decision on the extraction; no further 456 code change until that seam exists or a valid live-browser measurement is provided.
-
coder04-mba-l-ca | 2026-10-05 12:22 ART. Actual generated PROD PDF layout now inspected by proxy-mba-w-cc: app.movilba.com, AI578HM, build v5.6.150. Artifact /data-lezama/movilba/evidencia/MOVILBA-664/2026-10-05-1211-movilba-AI578HM-reporte01.pdf, SHA256 2c0d55e0...f808b0afcc. The PDF's default-visible Cambios lines render, but the UI's collapsed 'Ver más datos (2)' expands to Modelo de carrocería: TODO BUS and Estado: Alta, neither included in the PDF. The generated-PDF check is exercised; remaining question is whether PDF should include these disclosure-only fields. No code change.
-
coder04-mba-l-ca | 2026-10-05 12:26 ART. Fix for the PROD PDF finding from AI578HM: derivePdfHistoryChanges now reuses historyDisclosure() and appends the same disclosure-only values omitted from the ficha Cambios list, using HISTORY_FIELDS labels; already-rendered metadata/change fields and hidden validadora fields remain excluded by shared presentation rules. Added a regression fixture for the two measured values: Modelo de carrocería: TODO BUS and Estado: Alta. Files: src/lib/vehiculo-pdf-history.ts and its test. I did not run tests/lint/typecheck per workflow. Sent to audit for scoped verification.
-
coder04-mba-l-ca | 2026-10-05 12:37 ART. Restored candidate verified in the shared checkout /home/rob/Documents/work/gcaba/movilba-web: derivePdfHistoryChanges appends disclosure-only values with HISTORY_FIELDS labels while filtering already-rendered and hidden validadora fields. Regression asserts AI578HM's measured 'Modelo de carrocería: TODO BUS' and 'Estado: Alta'. Diff is limited to src/lib/vehiculo-pdf-history.ts and its test; unrelated existing changes are docs/reference/rutap-tracker-protocol.md and tools/todo-rutap-tracker.py. No gates run per workflow; generated PDF layout still requires post-ship visual verification.
-
audit pass: src/lib/vehiculo-pdf-history.ts hunk adding historyDisclosure import+call, src/lib/vehiculo-pdf-history.test.ts AI578HM regression test
payload
{"scope":"src/lib/vehiculo-pdf-history.ts hunk adding historyDisclosure import+call, src/lib/vehiculo-pdf-history.test.ts AI578HM regression test","outcome":"pass","evidence":"verified bodyModel/state exist in HISTORY_FIELDS with claimed Spanish labels (rutap-history-fields.ts:115,121); historyDisclosure signature confirmed excludes HIDDEN_PRESENTATION_FIELDS and already-rendered/changed keys (rutap-history-presentation.ts:107-129); gates not run, none claimed by coder04","reportRef":null} -
audit fail: test:source on src/lib/vehiculo-pdf-history.test.ts, re-run after the 15:35 PASS
payload
{"scope":"test:source on src/lib/vehiculo-pdf-history.test.ts, re-run after the 15:35 PASS","outcome":"fail","evidence":"existing test 'PDF reconstructs app-written values and suppresses unchanged duplicates' now emits 2 extra disclosure lines (Empresa, Línea) not in its expected array; 15:35 PASS reviewed the new test+code by inspection only, did not run test:source, missed this regression","reportRef":null} -
coder04-mba-l-ca | 2026-10-05 12:47 ART. Corrected the deploy-reported over-inclusion: when historyDisclosure returns a value also present unchanged on the previous period, PDF Cambios now suppresses it using the same trim/NBSP normalization as history diffs. This preserves AI578HM's two newly disclosed values while avoiding unchanged Empresa/Línea lines; the existing regression covers both behaviors. Files remain src/lib/vehiculo-pdf-history.ts and its test. I did not run gates per workflow; audit needs to rerun test:source after this fix. PDF visual recheck remains open after ship.
-
audit pass: test:source src/lib/vehiculo-pdf-history.test.ts (5/5), tsc --noEmit, eslint on both changed files
payload
{"scope":"test:source src/lib/vehiculo-pdf-history.test.ts (5/5), tsc --noEmit, eslint on both changed files","outcome":"pass","evidence":"over-inclusion fixed via normalizeRaw comparison against previous.valores; companyIdentifier/lineNumber now suppressed when unchanged, AI578HM case still renders; all gates green, re-run independently not just by inspection","reportRef":null} -
coder04-mba-l-ca | 2026-10-05 12:51 ART. MOVILBA-456 shipped in v5.6.156 (main 1de1c83e); coder03 reports PROD+DEV health 156. Proxy is checking the generated PROD PDF for AI578HM. Keep this item open until that visual result confirms the corrected Cambios output.
-
coder03assistant-mba-l-ca | 2026-10-05 13:43 ART Internal tracker instruction removed from stakeholder-facing Comentario para Claudia cell in archived live workbook SHA cb74a882. Original Pendientes L63: 'Reabierto según BWI MOVILBA-456.'
-
coder03-mba-l-cc | 2026-10-05 14:53 ART. Live PASS on PROD app.movilba.com v5.6.161 for AI578HM, checked by proxy-mba-w-cc after Elazar's login. The on-screen Cambios list, with 'Ver mas datos' expanded, and the downloaded ficha PDF carry the same 35 fields in the same order with the same values. That includes Modelo de carrocería TODO BUS and Estado Alta, which the PDF was missing before. There are no extra or missing fields and no unchanged field shown as a change. Evidence: /data-lezama/movilba/evidencia/MOVILBA-456/2026-10-05-1453-movilba-AI578HM-reporte01.pdf (sha256 4966a684). The pod and DEV are on 161 as well. NOT EXERCISED: any vehicle other than AI578HM.
-
cleared: Contenido VERIFICADO contra DEV el 2026-10-01 (ver evento verified): cero '(vacio)', ID MDVR con sus dos valores, y los periodos de app con cambios crudos=0 derivan 4/3/1 lineas, que es el control contra el comportamiento viejo. Queda SOLO la maquetacion de un PDF generado, que es lo que la descripcion exige para cerrar. Instrumento: abrir el PDF - no requiere clave de base, requiere una sesion de app. Correccion a mi blocker anterior: las filas NO se le pidieron a db04, las medi yo con DEV_DATABASE_URL de .env.local.
-
coder04-mba-l-ca | 2026-10-05 14:53 ART. Closed per coder03: proxy confirmed the generated Historial PDF on PROD v5.6.161 for AI578HM, with PDF evidence recorded on the item. This verifies the shipped PDF change renderer includes the same disclosure changes as the ficha.