basquetWi + New ticket

Una Baja de app se guarda como Modificacion de largo cero: badge 'alta y baja el mismo dia', expediente de alta vacio y catalogo sin BAJA

Done high cmcoder04-mba-l-ca

An app Baja is stored as a zero-length app period: tramite MODIF (318), estado BAJA (117), fecha_alta = fecha_baja = baja date, expte_alta blank, expte_baja = the baja expediente (DEV rows 177666, 193864, 220061). The period is required because import rows are immutable (vehiculos.ts closes only rutap_snapshot_id IS NULL rows). The book's Tramite column holds only Alta (2499) and Modif (3010), measured by db02 2026-09-17, so a BAJA tramite would be vocabulary the SSOT does not have. Per the standing rule, bajas are audited by fecha_baja/expte_baja, never by tramite_id. DECIDED: no catalog row and no retag. STEP 1 DONE (09a1a534, v5.5.195): clasificarTramiteEdicion returns MODIF for a baja. Since 28873909 (v5.5.191) every app Baja on DEV threw at the catalog lookup. STEP 2 (open): renderers detect a baja EVENT as origen app + estado BAJA + expte_alta null + fecha_alta = fecha_baja, never by tramite name. HistoryPeriodContent shows 'Baja registrada el X' plus the expediente de baja, with no alta date and no same-day badge. The PDF branch at page.tsx:1018 (tramite == 'baja') never fires today, so Eugenia row 2 is NOT fixed. Estado Actual takes its expediente from the latest period that is not a baja event (row 13, AC363OK). A closed import period keeps normal rendering.

Sub-tickets

No sub-tickets.
+ Add sub-ticket

Activity

  • wi-cli-venus created · 4w ago
    parent=#3883
  • wi-cli-venus descriptionChanged · 4w ago
    was: An app Baja is stored as a new period with tramite MODIF (318), estado BAJA (117), fecha_alta = fecha_baja = baja date, expte_alta blank (DEV rows 177666, 193864, 220061). Renderers key on tramite == 'baja', which never exists: no BAJA row in opciones vehiculo_historial/tramite. The ficha therefore shows 'Tramite: Modificacion', 'Expediente de alta: Sin expediente' and the 'Alta y baja el mismo dia' badge. Estado Actual reads expte_alta from that baja row and shows 'Expediente: No registrado' (AC363OK). clasificarTramiteEdicion (28873909, v5.5.191) already writes BAJA, so every app Baja on DEV fails closed until the catalog row exists. Fix: (1) db lane adds the BAJA catalog row, DEV then PROD. (2) Retag the existing app baja rows. (3) HistoryPeriodContent renders a baja event as 'Baja registrada el X' plus its expediente de baja, with no alta date and no zero-length badge. (4) Estado Actual takes the alta expediente from the latest non-baja period.
  • wi-cli-venus commit · 4w ago
    09a1a534 (v5.5.195) clasificarTramiteEdicion: baja -> MODIF. Deployed to dev, freshness OK.
  • wi-cli-venus audit-finding · 3w ago
    Tracker download 2026-09-19 reopens this with AH007QZ: changing Alta to Baja renders Tramite=Modificacion and category Administrativo. Stakeholder item #28 moved to active Para Elazar; keep BWI open.
  • wi-cli-venus assigned · 3w ago
    coder03-mba-l-ca / coder
  • wi-cli-venus verified · 3w ago
    db03, PROD, 2026-09-23 14:10 ART. AH007QZ = vehiculo_id 5595. PROD persists exactly 3 rows, all origin=import, snapshot 5, tramite_id=317 (ALTA) on all three, estado_id NULL, motivo_id NULL, no app row, none deleted: fila 1594 alta 2026-03-09 / baja 2026-04-09 (EX-2026-11883897 / EX-2026-16817235, entidad 56, interno 51); fila 5053 alta 2026-04-09 / baja 2026-05-19 (entidad 71, interno 112); fila 5054 alta 2026-08-14 / baja 2026-09-17 (entidad 71, interno 112). Nothing persisted says modificacion or administrativo for this dominio. The labels are computed in code, not stored: rutap-modification-subtype.ts groups state, reason, dates, expedientes, cuit, linea and procedure under ADMINISTRATIVO, and vehiculo-tramite.ts:17 writes tramite MODIF for a baja made through the app by design. The display is reproducible only through an app write, which PROD does not have for this dominio. Verdict: rows correct and matching the book; mislabel-by-design on the app edit path, not a wrong row.
  • coder04-mba-l-ca progress · 3w ago
    coder04-mba-l-ca | 2026-09-24 04:01 ART. Measured dev src/components/HistoryPeriodContent.tsx:182: same-day period label exists, but no Baja-specific split; ticket's two-part APP Baja/MODIF issue is not shown resolved. Runtime DB writer path not exercised. Code work remains open.
  • coder04-mba-l-ca assigned · 3w ago
    coder04-mba-l-ca / coder
  • coder04-mba-l-ca statusChanged · 3w ago
    coder04-mba-l-ca | 2026-09-24 05:28 ART. PDF now classifies app Baja from stored event shape (origen=app, estado=BAJA, empty expte_alta, equal dates), prints baja date/expte_baja, and suppresses Alta metadata; imported zero-length periods retain normal rendering. Added focused source tests; test:source 37/37 and typecheck pass. No generated PDF visually checked; awaiting audit and coder03-owned commit/deploy.
  • audit-mba-l-ca audited · 3w ago
    audit fail: audit-mba-l-ca | 2026-09-24 05:31 ART. Uncommitted PDF Baja presentation only: src/lib/vehiculo-pdf-history.ts(.test.ts) and page.tsx history mapping around 1028-1090; excludes MOVILBA-174 and MOVILBA-456 hunks. No generated PDF visually exercised.
    payload
    {"scope":"audit-mba-l-ca | 2026-09-24 05:31 ART. Uncommitted PDF Baja presentation only: src/lib/vehiculo-pdf-history.ts(.test.ts) and page.tsx history mapping around 1028-1090; excludes MOVILBA-174 and MOVILBA-456 hunks. No generated PDF visually exercised.","outcome":"fail","evidence":"Focused tests independently pass 5/5 (pnpm exec tsx --test vehiculo-pdf-history, rutap-history-presentation, vehiculo-pdf-vigencia). But pdfHistoryBajaPresentation calls esEventoDeBaja, which checks origin app + blank expteAlta + nonblank expteBaja + equal dates and NEVER checks estadoId (src/lib/historial-vehiculo.ts:124-135). The API item and PDF helper do not carry estadoId (src/lib/rutap-historial-api.ts:5-34; vehiculo-pdf-history.ts:8-20). src/repositories/vehiculos.ts:1553-1579 writes a line-transfer closure with that exact shape but estadoId=beforeColectivo?.estadoId ?? estadoEfectivo, which can be ALTA; its successor is an ALTA on the new line. The PDF would label that closure Baja registrada el and put its expte_baja in the heading despite no vehicle BAJA. Ticket description specifically requires estado BAJA for app Baja classification. Add a discriminating ALTA line-transfer closure control and carry/check state (or resolve the semantic distinction explicitly) before PASS. Source-only review; no PDF render.","reportRef":null}
  • audit-mba-l-ca audited · 3w ago
    audit fail: audit-mba-l-ca | 2026-09-24 05:50 ART. Re-review of PDF Baja rendering and claimed AF894KE visual artifact; only MOVILBA-451 helper/page behavior, not unrelated page hunks. Authenticated Exportar PDF route unexercised.
    payload
    {"scope":"audit-mba-l-ca | 2026-09-24 05:50 ART. Re-review of PDF Baja rendering and claimed AF894KE visual artifact; only MOVILBA-451 helper/page behavior, not unrelated page hunks. Authenticated Exportar PDF route unexercised.","outcome":"fail","evidence":"New AF894KE PDF was generated by coder04 through history helpers and GenericReport and visually inspected by that lane, but its /tmp artifact was not independently available under this repo's read boundary; independent visual verification remains UNEXERCISED pending an in-repo copy. More importantly, prior FAIL persists in current shared tree: src/lib/vehiculo-pdf-history.ts PdfHistoryBajaFields omits estadoId and delegates to esEventoDeBaja; src/lib/historial-vehiculo.ts:124-135 classifies app + blank expteAlta + expteBaja + equal dates without checking BAJA state. src/repositories/vehiculos.ts:1553-1579 creates a line-transfer closure with that same shape and estadoId inherited from beforeColectivo, potentially ALTA. The PDF can still label that assignment closure 'Baja registrada el'. The AF894KE BAJA positive sample does not discriminate this ALTA case. Add a negative line-transfer closure control and distinguish vehicle BAJA from assignment closure; then re-render both. A GenericReport render, even when reviewed, does not exercise the authenticated browser export route.","reportRef":null}
  • audit-mba-l-ca audited · 3w ago
    audit fail: audit-mba-l-ca | 2026-09-24 06:08 ART. Shared-tree follow-up for state-qualified app Baja classification: rutap-historial repository/API/OpenAPI, historial classifier, PDF and screen tests; excludes unrelated page changes. Source review only, no DB/HTTP/PDF-route exercise.
    payload
    {"scope":"audit-mba-l-ca | 2026-09-24 06:08 ART. Shared-tree follow-up for state-qualified app Baja classification: rutap-historial repository/API/OpenAPI, historial classifier, PDF and screen tests; excludes unrelated page changes. Source review only, no DB/HTTP/PDF-route exercise.","outcome":"fail","evidence":"The intended implementation is coherent: rutap-historial.ts LEFT JOIN v_opciones by estado_id plus vehiculo/estado and projects valor_opcion; toRow and toRutapHistorialItems carry estadoValor; OpenAPI adds a required nullable field; esEventoDeBaja now requires BAJA. Independently ran focused tsx tests (5/5 files/tests, including PDF 3/3, line-transfer 35 assertions, HistoryPeriodContent 30 assertions) and pnpm run typecheck (exit 0). But src/repositories/vehiculos.line-transfer.test.ts:78-85 now supplies estadoValor='BAJA' and asserts the old-line closure IS vehicle Baja, while actual writer src/repositories/vehiculos.ts:1553-1579 preserves beforeColectivo?.estadoId (potentially ALTA) for that line-transfer closure. This stale synthetic control contradicts the new discriminator and would endorse the exact misclassification under review. Change that control to representative ALTA and assert false (retain a separate true vehicle-BAJA control); pin repository/API state propagation if practical, then re-run. No live catalog row, HTTP response, or authenticated PDF export exercised; prior /tmp visual artifact not independently reviewed under repo read boundary. This FAIL is for the conflicting regression, not an assertion that the new join/classifier is wrong.","reportRef":null}
  • audit-mba-l-ca audited · 3w ago
    audit pass: Canonical-state Baja classifier and repository→API→screen/PDF propagation in shared tree; focused tests, source suite, typecheck, targeted ESLint, diff check. No DB/HTTP/authenticated PDF or visual render exercised; item remains open.
    payload
    {"scope":"Canonical-state Baja classifier and repository→API→screen/PDF propagation in shared tree; focused tests, source suite, typecheck, targeted ESLint, diff check. No DB/HTTP/authenticated PDF or visual render exercised; item remains open.","outcome":"pass","evidence":"audit-mba-l-ca | 2026-09-24 06:19 ART. Prior 06:08 FAIL addressed: rutap-historial.ts joins v_opciones by h.estado_id plus vehiculo/estado, selects valor_opcion; toRow/toRutapHistorialItems carry estadoValor; OpenAPI requires nullable estadoId/estadoValor; esEventoDeBaja requires exact canonical BAJA. Screen HistoryPeriodContent and PDF helper share classifier. ALTA transfer closure with same app/expediente/equal-date shape is false; BAJA fixture true; import zero-length fixture false. Independently ran focused PDF/screen tests 6/6, line-transfer 36 assertions, pnpm run test:source 37/37, pnpm run typecheck exit 0, targeted ESLint exit 0, git diff --check scoped files exit 0. Minor stale assertion message at vehiculos.line-transfer.test.ts:85 calls the BAJA-positive synthetic fixture an old-line closure; rename for clarity, but negative control correctly guards actual ALTA transfer. Unrelated page.tsx changes excluded. No installed catalog row, HTTP response, authenticated PDF export, or independent visual render exercised; keep MOVILBA-451 open pending those checks.","reportRef":null}
  • audit-mba-l-ca audited · 3w ago
    audit pass: Focused two-file correction: vehiculos.ts closure comment/state and line-transfer test. Ran focused test, test:source, typecheck, targeted ESLint, diff check. No DB write, HTTP, authenticated PDF export or visual render.
    payload
    {"scope":"Focused two-file correction: vehiculos.ts closure comment/state and line-transfer test. Ran focused test, test:source, typecheck, targeted ESLint, diff check. No DB write, HTTP, authenticated PDF export or visual render.","outcome":"pass","evidence":"Current diff keeps estadoId: beforeColectivo?.estadoId ?? estadoEfectivo and documents that a transfer closure is not vehicle BAJA. Test now has BAJA-state positive and BAJA-shaped ALTA-transfer negative controls. Focused 36 assertions PASS; test:source 37/37 PASS; typecheck, targeted ESLint and diff check exit 0. Prior state-gate mutation red was reported by coder04, not rerun in this round. Ticket remains open for runtime/PDF validation.","reportRef":null}
  • coder03-mba-l-cc note · 2w ago
    coder03-mba-l-cc 2026-10-01 16:25: the two checks audit left UNEXERCISED on 2026-09-24 are now exercised against the installed databases, and both come out in favour of the shipped classifier. 1. The installed catalog row exists and the exact-match is correct. public.opciones holds vehiculo/estado 116 ALTA and 117 BAJA with valor_opcion literally 'BAJA' in DEV and in PROD, borrado_en NULL in both, so esEventoDeBaja's estadoValor === 'BAJA' comparison resolves against a live label and is not dead code. The item title's premise that the catalog has no BAJA is false as installed. PROD also carries 118 TRANSFERENCIA, which DEV does not have at all, but that row is SOFT-DELETED in PROD since 2025-10-13 and is the known case documented at src/repositories/vehiculos.ts:85 and in docs/migrations/2026-08-14-movilba-41-vistas-estado-vehiculo.sql:11 - not a defect, and not to be recreated in DEV. It belongs in the MOVILBA-585 census as a row-level difference with the PROD side named correct. 2. The positive path has 22 live instances in DEV, not zero. All 22 app-origin periods whose estado resolves to BAJA satisfy every one of the five conditions: 22 of 22 with an empty expte_alta, 22 of 22 with an expte_baja, 22 of 22 with fecha_alta equal to fecha_baja and non-null. PROD has 0 app-origin history rows at all, so the badge path cannot be exercised there yet and that is not evidence about it. Instrument warning for whoever measures this next: my own first pass asked the question against raw_expte_alta, raw_fecha_alta and raw_fecha_baja and got 0 of 22, which reads exactly like 'the shape never occurs'. Those raw_* columns are the book's text and are NULL on every app-origin row by construction. The columns the classifier's query actually feeds from are expte_alta, expte_baja, fecha_alta and fecha_baja without the prefix. A zero from the raw_* columns on app rows is an artifact of the column choice, never a finding. Still UNEXERCISED and the only thing left on this item: an authenticated browser render of the ficha PDF for one of those 22 dominios, to see the badge text itself. Nothing in the database can answer that.
  • coder03-mba-l-cc note · 2w ago
    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 progress · 2w ago
    coder04-mba-l-ca | 2026-10-02 11:10 ART. Per coder03's 2026-10-01 measurement, catalog BAJA state and 22 positive DEV periods are verified; only a generated-PDF layout check remains. The measurement seam is MOVILBA-643 (inline handleExportPDF section construction); this is not a generic authenticated-session blocker.
  • audit-mba-l-cc audited · 2w ago
    audit pass: TES730 and AG232XB evidence (reporte.pdf + historial-screenshot.jpg, 4 files) checked against coder03's claims: ficha/history baja text, same-day-badge suppression, vigencia desde value
    payload
    {"scope":"TES730 and AG232XB evidence (reporte.pdf + historial-screenshot.jpg, 4 files) checked against coder03's claims: ficha/history baja text, same-day-badge suppression, vigencia desde value","outcome":"pass","evidence":"sha256 of all 4 files matches proxy's truncated prefixes. TES730: PDF+screenshot show Baja registrada 02/10/2026, history row Modificacion/Estado Baja, no mismo-dia badge (esBajaEvento suppresses it correctly). AG232XB: Vigencia desde 08/07/2025 confirmed in both files.","reportRef":null}
  • coder03-mba-l-cc completed · 2w ago
    2026-10-02 coder03-mba-l-cc: closed on audit PASS 11:45. TES730 dev01 test baja (EX-2026-00000001-GCABA-DGGSM) and AG232XB Vigencia desde 08/07/2025 captured at patch 141; evidence in /data-lezama/movilba/evidencia/MOVILBA-451/. TES730 stays in baja in DEV as a test row.
bug
4w ago by wi-cli-venus
2w ago
2026-10-02 14:45