basquetWi + New ticket

La ficha y la API muestran la modificación como Vigencia desde

Done high cmcoder03assistant-mba-l-ca

Proxy measured AC736PL: the ficha and GET /api/vehiculos/3600 returned 2026-09-23 from the latest MDVR modification, while the first ALTA is 2025-07-08. The PDF already uses the correct first-ALTA selector. Use one canonical selector for ficha, API DTO and legacy colectivo edit-data DTO; preserve PDF behavior. Regression source controls must reject the previous ficha/API/VDC selectors. The historical XLSX is one row per period and emits each period Fecha_Alta; the current-state export has a separate current-cycle Fecha alta contract. Close only after deployed verification.

Sub-tickets

No sub-tickets.
+ Add sub-ticket

Activity

  • wi-cli-venus created · 3w ago
    parent=#3872
  • wi-cli-venus assigned · 3w ago
    coder02-mba-l-ca / coder
  • wi-cli-venus note · 3w ago
    AUDIT TRIAGE - Coder batch #4. Fix vehicle PDF Vigencia desde to use the original ALTA date, not the latest modification date. Add regression fixture with ALTA followed by MODIFICACION. Blocker: reuse canonical history semantics from MOVILBA-511. Estimate: 1-3h.
  • wi-cli-venus statusChanged · 3w ago
    coder02-mba-l-ca tracing PDF Estado Actual validity selector against canonical original ALTA semantics; regression will cover later MODIF.
  • wi-cli-venus progress · 3w ago
    Implemented on coder02-mba-l-ca/movilba-525-pdf-vigencia commit 97e280f5: PDF now derives Vigencia desde from the earliest ALTA for the selected vehiculo in canonical chassis history, not the current-cycle/modification date; history fetch is reused for the PDF timeline. Regression covers ALTA then MODIFICACION, chassis-chain scoping, unlabeled legacy fallback, and page integration. Focused test PASS; diff check PASS. Sent for audit; not deployed.
  • wi-cli-venus note · 3w ago
    Entrypoints medidos por db04-mba-l-ca en el checkout actual 2026-09-23 12:16 ART (Resueltos #71). NO son prueba de deploy: src/app/vehiculos/[dominio]/page.tsx:734-736 llama fechaVigenciaOriginalPdf y :888 la renderiza; helper src/lib/vehiculo-pdf-vigencia.ts + su test. Pendiente: medir comportamiento en el arbol actual, datar por ancestria despues.
  • coder03-mba-l-cc assigned · 3w ago
    coder03-mba-l-cc / coder
  • coder03-mba-l-cc progress · 3w ago
    coder03-mba-l-cc 2026-09-24 - Reassigned off coder02-mba-l-ca and the real state measured, because the item and the tracker disagree with the tree. coder02-mba-l-ca is NOT a member of ARO mba-l at all (aro_list of mba-l, 2026-09-24: only coder02-mba-l-cc is listed, and it is neither registered nor live), so this item had been inProgress since 2026-09-20 05:42Z on a lane that cannot pick it up. The fix is NOT unshipped: commit 97e280f5, named in the 09-20 progress event as implemented but not deployed, is an ancestor of nothing (git branch -a --contains is empty), but its content landed on dev as 7fbd8aa7, 2026-09-20 05:43:30 -03, and src/lib/vehiculo-pdf-vigencia.ts is present on BOTH dev and main. It is wired: page.tsx:38 imports fechaVigenciaOriginalPdf and :736 calls it for the PDF Estado Actual. dev01 is serving it - /api/health returns serviceId 7213, which decodes to patch 46, so v5.6.46, today's build. The stakeholder complaint therefore PREDATES the fix: her reverification is dated 2026-09-19 in this item's own description, the fix landed 2026-09-20 05:43, and the Verificado cell is byte-identical across every tracker snapshot 3 through 10, so there is no evidence anyone retested after the landing. COVERAGE, stated because it is what is missing: this is a SOURCE and DEPLOY measurement - the helper scopes by vehiculoId, sorts ascending by orden and takes the first ALTA, with the earliest ordered event as the fallback for legacy rows without a resolved tramite. NOT EXERCISED: no PDF was generated from a real vehicle with an ALTA followed by a MODIFICACION on this build, so this proves the corrected selector is deployed, NOT that the printed date is right. Stays open until that PDF is produced; nobody closes it on the strength of a landed commit.
  • coder03-mba-l-cc verified · 3w ago
    coder03-mba-l-cc 2026-09-24 - VERIFIED on a real PDF, which is the leg that was missing. Elazar exported the vehicle ficha for AC736PL from dev01 at 05:07 and left it at /data-lezama/movilba/import-reports/2026-09-24-0507-movilba-AC736PL-reporte01.pdf. Estado Actual reads 'Vigencia desde 08/07/2025'. That is the original ALTA of the vehicle, confirmed against DEV v_vehiculo_historial, where AC736PL has tramite Alta with fecha_alta 2025-07-08 followed by five Modificacion rows, the last dated 2026-09-23. The defect value would have been 23/09/2026, its most recent modification; it does not appear. So the selector added by 7fbd8aa7 - fechaVigenciaOriginalPdf, scoping by vehiculoId and taking the earliest ALTA - produces the right date on a vehicle with five later modifications, end to end and through the real generator, not at source level. Closing. COVERAGE: one vehicle, one shape - an imported ALTA followed by imported MODIFICACIONes. NOT EXERCISED: a vehicle whose ALTA was written by the app rather than imported, and a vehicle whose earliest event carries no resolved tramite, which is the legacy branch where the helper falls back to the earliest server-ordered event. If either of those is wrong it is a different defect and gets its own item; it does not reopen this one.
  • coder03-mba-l-cc completed · 3w ago
    completed
  • coder03assistant-mba-l-ca statusChanged · 3w ago
    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 AC736PL, so the fresh deployed-build result is unverified; prior archived PDF predates the code commit under review. Keeping open until a current PDF is inspected.
  • coder03assistant-mba-l-ca blocked · 3w ago
    coder03assistant-mba-l-ca | 2026-09-24 08:17 ART — Proxy reports dev01 login expired; /vehiculos/AC736PL redirects to /user/login. Current-build PDF for AC736PL has not been exported because approval is pending. Cannot verify the deployed fix until Elazar restores the whey Chrome session and approves the file download.
  • coder03-mba-l-cc assigned · 2w ago
    coder03assistant-mba-l-ca
  • coder03assistant-mba-l-ca progress · 2w ago
    coder03assistant-mba-l-ca | 2026-09-28 12:38 ART — Current PROD source/build check: main is v5.6.78 and includes fechaVigenciaOriginalPdf wired into the ficha PDF. PROD GET /api/health serviceId 11597 decodes to patch 78; GET /vehiculos/AH152NT redirects to login, and no authenticated browser session is available in this runtime. This does not exercise the current PDF; retain the existing blocker pending authenticated export/readback.
  • coder03-mba-l-cc note · 2w ago
    2026-10-01 21:34 ART, coder03-mba-l-cc. Two things change. FIRST, the blocker was false and had been for a week: it said Elazar must restore the whey Chrome session, and proxy-mba-w-cc re-authed dev01 itself today with the standing ADMIN credential - the expiry is a routine 15-minute TTL, not a lost session, and nothing here needed him. SECOND and larger: the defect is NOT confined to the PDF, which is what the title claims. Proxy reproduced it on the in-app page for AC736PL before producing any PDF: Estado Actual shows 'Vigencia desde: 23/09/2026', which is the fecha de alta of the MOST RECENT historial entry, an MDVR change, while the vehicle's first period is the ALTA tramite with fecha de alta 08/07/2025. So the resolver is picking the latest period and calling it the start of validity, and the PDF is one surface showing it rather than the place it happens. That puts this in the four-surfaces class: the same wrong value is expected on the ficha, the edit form, the export and the API, and a fix proven on the PDF alone is not a fix. Whoever takes it establishes the value on all four surfaces, not one. Unblocking: nothing is waiting on Elazar or on a credential. SIN EJERCITAR: the other three surfaces were not checked today - only the ficha page was, so the class is asserted from the resolver's shape and not yet measured per surface.
  • coder03-mba-l-cc blocked · 2w ago
    -
  • coder03-mba-l-cc unblocked · 2w ago
    cleared: -
  • coder03-mba-l-cc note · 2w ago
    2026-10-01 21:40 ART, coder03-mba-l-cc, root cause pinned in code; proxy measured two surfaces live. THE PDF IS ALREADY CORRECT AND THE TITLE IS BACKWARDS. src/app/vehiculos/[dominio]/page.tsx:882 feeds the PDF from vigenciaOriginalParaReporte, derived at :738 by fechaVigenciaOriginalPdf(historial, vehiculoId) from src/lib/vehiculo-pdf-vigencia.ts:24, and the comment at :874-876 states the rule plainly: Vigencia desde is the vehicle's FIRST ALTA in the canonical history and a later MODIFICACION cannot reset it. THREE resolvers answer that one label and two of them break the rule. (1) The ficha, same file :1465, reads cicloActual.fechaAltaActual, the CURRENT cycle's alta, which is precisely what every modification rewrites - that is the 23/09/2026 proxy saw on AC736PL against a first period of 08/07/2025. (2) The API, confirmed live by proxy on GET /api/vehiculos/3600, returns top-level fechaVigenciaDesde 2026-09-23 equal to historial[0].fechaAlta, the latest MDVR period, not id 317725 at 2025-07-08; its source is src/repositories/vehiculos.ts:467, fechaVigenciaDesde = vVehiculoHistorialActualInRutap.fechaAlta, the current-period view. (3) A third source exists at src/repositories/vehiculos.ts:1687, vehiculosDatosColectivos.fechaVigenciaDesde, the legacy VDC column MOVILBA-242 is about. The reason nobody reused the correct one is its NAME: fechaVigenciaOriginalPdf implements a business rule for every surface while announcing itself as belonging to one, so each new surface wrote its own. Rename it and the defect class closes with it. TWO FALSE ARTIFACTS to fix in the same pass: the comment at :1460-1462 asserts the ficha uses 'mismo criterio que el PDF', which is false and is exactly what stops a reader re-checking, and src/lib/vehiculo-pdf-vigencia.test.ts asserts only the PDF path - a gate that guards the surface that works and not the two that do not, so it is a green line rather than a control. Make it fail against the ficha and API first. Surfaces: ficha WRONG, API WRONG, PDF CORRECT, edit form does not display the field (proxy checked /vehiculos/AC736PL/editar/colectivo, it is a period-creation form). SIN EJERCITAR: the XLSX export was not checked by anyone today.
  • coder03assistant-mba-l-ca statusChanged · 2w ago
    coder03assistant-mba-l-ca | 2026-10-01 23:27 ART. Source diagnosis confirms AC736PL: ficha reads cicloActual.fechaAltaActual (latest cycle Alta), while API findById reads fechaAlta from the latest normalized-history view row. Both can label a later Modif period as vehicle Vigencia desde. PDF already uses fechaVigenciaOriginalPdf; edit form has no Vigencia desde field. Inspecting export contracts next; no code changed yet.
  • coder03assistant-mba-l-ca progress · 2w ago
    coder03assistant-mba-l-ca | 2026-10-01 23:30 ART. Evidence: proxy measured AC736PL ficha Vigencia desde=2026-09-23, while its first ALTA is 2025-07-08; GET /api/vehiculos/3600 returned fechaVigenciaDesde=2026-09-23 from the latest MDVR period. Existing PDF selector returns 2025-07-08. Changed src/lib/vehiculo-pdf-vigencia.ts to generic src/lib/vehiculo-vigencia.ts; the API now derives fechaVigenciaDesde from canonical chain history via the shared earliest-ALTA selector, and the ficha displays that DTO field. Scope controls: edit form has no Vigencia desde field; /api/export uses one row per trámite and Fecha_Alta per period, so Modif date remains correct period data. Regression assertions cover helper, API resolver, ficha, PDF; author did not run tests per standing handoff rule, request audit to check pre-fix red controls and current suite. No live DB/HTTP/export download exercised by this lane.
  • audit-mba-l-cc audited · 2w ago
    audit pass: page.tsx (ficha+PDF selector call), repositories/vehiculos.ts (vigencia hunk only, excl. create() removal=MOVILBA-594), vehiculo-vigencia.ts+test (rename). Full diff each.
    payload
    {"scope":"page.tsx (ficha+PDF selector call), repositories/vehiculos.ts (vigencia hunk only, excl. create() removal=MOVILBA-594), vehiculo-vigencia.ts+test (rename). Full diff each.","outcome":"pass","evidence":"lint+typecheck clean, test passes. API/ficha/PDF all derive from fechaVigenciaOriginal over the chain source. Test asserts ficha doesNotMatch cicloActual.fechaAltaActual - real regression gate, fails pre-fix. Edit form has no field. XLSX export NOT checked here - SIN EJERCITAR.","reportRef":null}
  • coder03assistant-mba-l-ca progress · 2w ago
    coder03assistant-mba-l-ca | 2026-10-01 23:33 ART. MOVILBA-525 scope updated per 21:37 order. Shared selector now drives PDF, ficha DTO, and the legacy VDC-backed colectivo DTO (edit-data API); no longer returns directly. Source controls assert API and edit DTO use canonical chain history and ficha no longer reads ; not run by author. XLSX distinction checked: emits each period's own as , so a Modif remains its period date; serializes as current-state , whose migration defines current-cycle Alta, not the ficha's original-vehicle Vigencia desde. Neither export calls VDC's field. PDF remains first-ALTA selector. No export download/live request exercised. Shared checkout also contains unrelated MOVILBA-594 hunks in ; audit scope is only the MOVILBA-525 hunks plus helper/test rename and ficha.
  • coder03assistant-mba-l-ca progress · 2w ago
    coder03assistant-mba-l-ca | 2026-10-01 23:34 ART. Scope per 21:37 order: shared fechaVigenciaOriginal selector now drives PDF, ficha DTO, and legacy VDC-backed colectivo DTO (edit-data API); getColectivoByVehiculoId no longer returns vehiculos_datos_colectivos.fecha_vigencia_desde directly. Source controls assert API and edit DTO use canonical chain history and ficha no longer reads cicloActual.fechaAltaActual; author did not run tests. XLSX contracts checked: /api/reportes/vehiculos-historico emits each period raw_fecha_alta/fecha_alta as Fecha_Alta, so Modif remains its period date; /api/export serializes v_vehiculos_export as current-state Fecha alta, whose migration defines current-cycle Alta, distinct from ficha Vigencia desde. Neither export calls VDC fechaVigenciaDesde. No export download/live request exercised. Shared checkout also contains unrelated MOVILBA-594 hunks in vehiculos.ts; audit scope is MOVILBA-525 hunks, helper/test rename, and ficha.
  • audit-mba-l-cc audited · 2w ago
    audit fail: repositories/vehiculos.ts (vigencia hunks: findById + getColectivoByVehiculoId), vehiculo-vigencia.test.ts new assertions. 594 hunks excluded, confirmed clean.
    payload
    {"scope":"repositories/vehiculos.ts (vigencia hunks: findById + getColectivoByVehiculoId), vehiculo-vigencia.test.ts new assertions. 594 hunks excluded, confirmed clean.","outcome":"fail","evidence":"pnpm exec tsx --test vehiculo-vigencia.test.ts FAILS: assert.match(repository, /fechaVigenciaDesde,\\s*lineaId:/) doesn't match - fechaVigenciaHasta line sits between them. Resolver logic (both call fechaVigenciaOriginal) is correct; only the new test regex is wrong.","reportRef":null}
  • audit-mba-l-cc audit-finding · 2w ago
    FAIL reason: vehiculo-vigencia.test.ts new regex assert.match(repository, /fechaVigenciaDesde,\s*lineaId:/) does not match - fechaVigenciaHasta: colectivo.fechaVigenciaHasta, sits between the two tokens, \s* cannot bridge non-whitespace text. Test throws, run aborts. Fix: split into two separate assert.match calls (one per field) or widen the regex to allow an intervening line. Resolver logic unaffected - findById and getColectivoByVehiculoId both correctly call fechaVigenciaOriginal.
  • coder03assistant-mba-l-ca progress · 2w ago
    coder03assistant-mba-l-ca | 2026-10-01 23:51 ART. Audit finding corrected: split the colectivo DTO source assertion because fechaVigenciaHasta lies between fechaVigenciaDesde and lineaId. Updated src/lib/vehiculo-vigencia.test.ts with separate regex assertions; no tests run by author per handoff rule. Requesting audit rerun on current 525 scope.
  • audit-mba-l-cc audited · 2w ago
    audit pass: repositories/vehiculos.ts (vigencia hunks: findById + getColectivoByVehiculoId), vehiculo-vigencia.test.ts (regex fix). 594 hunks excluded, confirmed clean.
    payload
    {"scope":"repositories/vehiculos.ts (vigencia hunks: findById + getColectivoByVehiculoId), vehiculo-vigencia.test.ts (regex fix). 594 hunks excluded, confirmed clean.","outcome":"pass","evidence":"Test fixed: assert.match now split around fechaVigenciaHasta, tsx --test passes. lint+typecheck clean. Both resolvers call fechaVigenciaOriginal over the chain; edit DTO no longer reads colectivo.fechaVigenciaDesde directly. XLSX export not re-checked here.","reportRef":null}
  • coder03assistant-mba-l-ca titleChanged · 2w ago
    La ficha y la API muestran la modificación como Vigencia desde
  • coder03assistant-mba-l-ca descriptionChanged · 2w ago
    was: Stakeholder reverified in tracker 2026-09-19: after a vehicle modification, PDF Estado Actual shows Vigencia desde as the modification date rather than the original Alta date. Reproduce with a modified vehicle, trace the PDF selector separately from screen state, and make PDF use the canonical original vehicle validity start. Add regression coverage for a later Modif.
  • coder03assistant-mba-l-ca progress · 2w ago
    coder03assistant-mba-l-ca | 2026-10-01 23:52 ART. Implemented shared original-ALTA selector in src/lib/vehiculo-vigencia.ts, used by PDF, findById API DTO and getColectivoByVehiculoId edit-data DTO; ficha reads the shared DTO. Source controls now cover the old API/VDC selectors and ficha cycle selector. Audit verdict recorded verbatim: audit pass: repositories/vehiculos.ts (vigencia hunks: findById + getColectivoByVehiculoId), vehiculo-vigencia.test.ts (regex fix). 594 hunks excluded, confirmed clean. Author did not run tests. Audit record does not state whether the negative control was observed against pre-fix selectors; asked audit to confirm that acceptance evidence. No live export download or post-deploy check by this lane; status remains inProgress pending scoped audit evidence/deploy verification.
  • audit-mba-l-cc audit-finding · 2w ago
    Negative-control via stash to pre-fix: (1) page+repo reverted -> fails at ficha/PDF selector match. (2) repo-only reverted -> fails at API getRutapHistorialByChain match. (3) pre-fix had fechaVigenciaDesde:colectivo.fechaVigenciaDesde, what VDC doesNotMatch rejects. All 3 red, tree restored.
  • audit-mba-l-cc audited · 2w ago
    audit pass: src/app/vehiculos/[dominio]/page.tsx + rename vehiculo-pdf-vigencia.ts->vehiculo-vigencia.ts, the two hunks not yet scoped
    payload
    {"scope":"src/app/vehiculos/[dominio]/page.tsx + rename vehiculo-pdf-vigencia.ts->vehiculo-vigencia.ts, the two hunks not yet scoped","outcome":"pass","evidence":"page.tsx PDF+ficha both call fechaVigenciaOriginal same as repo; rename is identifier-only, logic body untouched","reportRef":null}
  • coder03-mba-l-cc note · 2w ago
    coder03-mba-l-cc 2026-10-02 00:3x ART: SHIPPED on audit PASS (one commit, shared files). prod+dev01 serve patch 136; pod leg (135) requested from proxy. 242: SQL record + README row committed; column DROP still awaits Elazar. 525: historical XLSX unexercised; close needs deployed verification on AC736PL.
  • coder03assistant-mba-l-ca progress · 2w ago
    coder03assistant-mba-l-ca | 2026-10-02 00:24. PROD deployment check: GET /api/health returned status=ok, serviceId=19543, which decodes to patch 136 using the checked-out 137*n+911 formula. GET /api/vehiculos/3600 returned HTTP 401, so the vehicle date was not observed. The route requires NextAuth + vehiculos.read and has no API-key path. Proxy reports no authenticated session and its host-side Production Reads guard denied login; no alternate-tool retry or PROD write. MOVILBA-525 stays inProgress pending authenticated GET/readback.
  • coder03-mba-l-cc note · 2w ago
    coder03-mba-l-cc 2026-10-02 00:3x ART: pod leg done (proxy bc22060->02ee152). prod, dev01, pod all serve patch 136 (serviceId 19543), checked by me.
  • coder03assistant-mba-l-ca note · 1w ago
    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 L62: 'Reabierto según BWI MOVILBA-525.'
  • coder03assistant-mba-l-ca blocked · 1w ago
    2026-10-05: proxy-mba-w-cc reports the authenticated PROD browser session expired and is at /user/login. AC736PL API/ficha readback requires Elazar to log back in on Whey Chrome; proxy will run it once the session is live. No PROD read was made in this attempt.
  • coder04-mba-l-ca blocked · 1w ago
    Real remaining blocker: required deployed PROD readback for AC736PL has not been made. Latest recorded attempt 2026-10-05: proxy's authenticated PROD session had expired at /user/login; GET /api/vehiculos/3600 returned HTTP 401, so the corrected deployed ficha/API value could not be verified. Code is already shipped; needs an authenticated PROD session/readback, then close.
  • coder04-mba-l-ca blocked · 1w ago
    Real remaining blocker: deployed PROD readback for AC736PL has not been completed. Latest recorded attempt (2026-10-05): proxy's authenticated PROD session had expired at /user/login, and no PROD read was made. Earlier (2026-10-02), GET /api/vehiculos/3600 returned HTTP 401. Code is shipped; needs an authenticated PROD session/readback, then close.
  • coder03-mba-l-cc note · 1w ago
    PROD readback confirmed by proxy-mba-w-cc 2026-10-06 13:56 ART: GET /api/vehiculos/3600 (AC736PL) fechaVigenciaDesde=2025-07-08, matches original ALTA not the 2026-09-23 modification; historial[] earliest record is the 2025-07-08 period. Code already shipped dev+main per coder04 (1780c042, audit PASS). Closing - pod leg to verify separately per DoD.
  • coder03-mba-l-cc unblocked · 1w ago
  • coder03-mba-l-cc completed · 1w ago
    PROD readback confirmed by proxy 2026-10-06 13:56 ART (fechaVigenciaDesde=2025-07-08 on AC736PL, matches original ALTA). Code shipped dev+main (1780c042). Pod leg verification pending.
bug
3w ago by wi-cli-venus
1w ago
2026-10-06 16:56