Export de vehiculos: falta ejercitar el boton de la UI (sesion NextAuth) y queda pendiente el criterio de collation
Estado al 2026-08-20. LO QUE SI ESTA CERRADO EN PROD: el export sale con 1736 filas (1602 altas + 134 bajas) ordenado entidad -> numero_linea -> numero_interno -> vigencia (fecha_baja IS NOT NULL ASC) -> dominio, y el ORDER BY vive DENTRO de v_vehiculos_export (migracion 2026-08-19-export-order-by-en-la-vista.sql), no en codigo. db-mba-l-cc lo verifico bajando el ARCHIVO REAL de prod con la api-key unificada: GET /api/v1/exports/vehiculos?format=csv -> HTTP 200, 576.639 bytes, primera fila "17 DE AGOSTO S.A. / 26 / 201 / PIK914", ultima "VUELTA DE ROCHA S.A.T.C.I. / 64 / 59 / AI095HF". FALTA 1 - el boton de la UI: la verificacion fue por api-key, que ejercita el mismo camino de app pero NO la ruta con sesion NextAuth. Ningun agente puede autenticarse por browser; lo tiene que bajar Elazar desde la UI y confirmar que el archivo sale igual. FALTA 2 - collation, decision de Elazar+Eugenia, NO tocar sin que lo pidan: en el archivo real dos empresas que empiezan igual quedan separadas por un acento - "LINEA 102 - SARGENTO CABRAL S.A." (I acentuada) cae en la fila 747 y "LINEA DE MICROOMNIBUS 47 SA" (sin acento) en la 748. Por la collation de la base (en_US.UTF-8) el archivo esta 100% ordenado, 0 pares fuera de secuencia; el par "invertido" aparecio solo porque la verificacion en Python ordena por codepoint. Si a Eugenia le resulta raro, se arregla con unaccent(entidad) en la vista - la extension unaccent YA esta instalada, es una linea. PERO el blast radius es todo el archivo, no ese par: cambia el orden de TODAS las entidades acentuadas y Eugenia compara descargas entre si. Se decide el criterio ANTES de tocar la vista. RIESGO PERMANENTE ya documentado en el codigo: el ORDER BY de una vista se respeta solo mientras el consumidor lea pelado. src/lib/exports/vehiculos.ts tiene que seguir haciendo db.select().from(vVehiculosExport) sin orderBy/where propio - hay un comentario en el archivo explicandolo. Cualquier join o filtro nuevo puede hacer que el planner descarte el orden en silencio. DEUDA CONOCIDA, misma clase, sin ticket propio: entidades, ramales, lineas, personas e instalaciones siguen exportando por id DESC (orden de importacion).
Activity
-
coder-mba-l-cc / coder
-
db-mba-l-cc: MOVILBA-57 se cancelo por duplicado a favor de este. El dato medido de la collation vive en la descripcion de MOVILBA-57 (wi show MOVILBA-57): el par invertido es fila 747 'LÍNEA 102 - SARGENTO CABRAL S.A.' vs 748 'LINEA DE MICROOMNIBUS 47 SA'; NO es defecto (por collation en_US.UTF-8 el archivo esta 100% ordenado, 0 pares fuera de secuencia), aparece solo si se verifica con el sort de otro lenguaje. La extension unaccent ya esta instalada, o sea el cambio seria una linea en la vista - pero mueve TODAS las entidades acentuadas y el archivo se compara entre descargas.
-
Cruce declarado con MOVILBA-56 (coder-mba-l-cc, 2026-08-20). No son duplicados y ninguno se cancela: 56 quedo en done y es el REGISTRO de la migracion aplicada (md5, metricas del apply, CORV 18.9ms, la verificacion end-to-end de db contra el CSV real). 58 - este - es el SEGUIMIENTO de lo que sigue abierto y no tiene registro donde vivir: (1) el boton de la UI, que solo Elazar puede ejercitar, y (2) la decision de collation con Eugenia. Cerrar 58 recien cuando las dos esten resueltas; 56 no se reabre.
-
Partido en dos por coder02 2026-08-21. MITAD UI: el boton existe y esta cableado entero - components/ExportButton.tsx:36-49 abre /api/export?entity=...&format=..., montado en app/vehiculos/page.tsx:303, y la ruta exige sesion NextAuth + RBAC (api/export/route.ts:158,176). Que se haya EJERCITADO en un navegador no se puede contestar leyendo codigo, y en prod no hay login de app, asi que sigue sin ejercitarse ahi. MITAD COLLATION: SIGUE ABIERTA y sin empezar - no hay ni un COLLATE en src/, drizzle/ ni docs/migrations/; el orden del export es un ORDER BY pelado dentro de v_vehiculos_export (e.nombre, l.numero_linea, vdc.interno, ...) con la collation por defecto de la base, sin declarar.
-
coder-mba-l-ca / coder
-
unassigned
-
2026-09-08 user requested tracking fresh DEV PDF/CSV/XLSX verification here. Deployed v5.5.102: PDF groups Chásis, Motor, Carrocería; chassis fields display Marca/Modelo from canonical catalog; CSV/XLSX shared headers also Marca/Modelo (including external API downloads). Acceptance: download fresh PDF from /vehiculos/AB126BE Exportar PDF and verify yyyy-mm-dd-hhmm-movilba-AB126BE-reporte01.pdf filename, sections, brand/model values and numeral-only Tipo de colectivo; download CSV and XLSX via authenticated UI and inspect headers/data. Deployment health/freshness and source review passed; actual files have NOT been verified for this release. Preserve existing collation decision as separate pending scope. Do not assume only Elazar can authenticate; use an available authorized agent session. Lookup migration artifacts committed separately as 5dd5df66.
-
2026-09-08 item 5 export file verification PASS. Inspected user-provided /data-lezama/movilba/2026-09-08-tests/2026-09-08-1356-movilba-AB126BE-reporte01.pdf plus 2026-09-08-1357-vehiculos.csv and .xlsx. PDF filename matches requested pattern; visually checked page 1: Chásis/Motor/Carrocería, Marca/Modelo MERCEDES BENZ / OH 1721 L-SB/62, Año Modelo 2017, Tipo de colectivo 3; no obsolete chassis Fabricante No registrado. CSV and XLSX each have 2413 rows, same 40 headers, exact cell parity after null-to-empty normalization; Marca/Modelo correct for AB126BE. Tipo values across all rows are only 1/2/3/4 (90/766/1551/6). PDF history text explicitly includes Año modelo De: 2016 A: 2017, retracting my earlier unverified omission claim for PDF. Browser page check delegated to proxy separately. Fresh-file verification complete; existing collation decision remains separate, so not closing the entire item.
-
Proxy-mba-w-cc independently checked live v5.5.102 AB126BE browser UI read-only: Cambios: Año modelo: De: 2016 A: 2017 is PRESENT in open period dated 03/09/2026, visible without expanding Ver más datos. Earlier coder04 inference of an application history omission was incorrect; no history fix needed for this case.
-
Correction requested by Elazar: 2413-row verification established CSV-versus-XLSX parity ONLY, not fidelity to the SSOT workbook. Comprehensive SSOT cell comparison has not been performed. Blackboard opened with coder04, db03 and audit to agree exhaustive deterministic comparison method against 2026-09-07-2350-parque-rutap.xlsx.
-
Blackboard bb-coder04-mba-l-ca-mtsx4vv9-ipsdat completed: coder04, db03 and audit independent proposals. One offline comparator owned by coder04; DB03 frozen catalog/period/app-event evidence; audit small independent output check plus deliberate mutation controls. 40-column versioned manifest; raw match vs approved equivalence distinct; all 96520 cells per file classified; full outer row reconciliation with every source period disposition; ambiguities/unverifiable columns explicitly counted. Actual source inventory: Base header row2, 5388 nonempty rows, 2423 distinct domains, 1729 domains with multiple periods. Do not assume export grain equals historical vehicle-period, do not use export row to pick expected SSOT period, do not blindly reuse importer as oracle, no DB staging, no timestamp-only excuse for app changes. Full SSOT comparison remains NOT RUN.
-
Full SSOT comparison now RUN, not merely CSV/XLSX parity. Frozen 2026-09-08-1357 exports: 2413x40=96520 classified cells each, zero skipped; source Base5388 periods/2407 normalized domains, all periods dispositioned. Per file87763 literal/typed/approved matches;958 differences=778edge whitespace+51internal whitespace+129content;7239app-only/derived cells not SSOT-verifiable;333ambiguous-period cells across9domains;222cells across6export-only domains;4unresolved chassis cells;1precision placeholder. Actual FK check28946correct-catalog+10null, no wrong groups; later14:19 snapshot explicitly not export-time proof. Audit independently confirmed totals/decomposition. DB03 traced47AC to bodywork/history divergence;60expediente prose moved, only17 preserved in export observations/43not surfaced;4MDVR trailing periods already in SQL export values. Report and per-cell/source ledgers: /data-lezama/movilba/research/export-check/2026-09-08-comparison/REPORT.md. No source/DB writes. Comparison complete, fidelity not clean; collation remains separate.
-
Comparator/report tools committed 5f90296a in coder04-mba-l-ca/movilba-369-save-errors. Audit-mba-l-cc closed review with no material issue and independently ran 4/4 behavioral test methods, including10 deliberate value mutations plus missing/duplicate rows. Durable output: /data-lezama/movilba/research/export-check/2026-09-08-comparison/REPORT.md. No app deployment needed for this offline tool.
-
DB03 durable causal report received: /data-lezama/movilba/research/export-check/2026-09-08-db03-content-causes.md. Actual13:57 CSV confirms17/60 normalized expediente phrases preserved and43missing. Targeted remediation plan saved at /data-lezama/movilba/research/export-check/2026-09-08-comparison/FOLLOW-UP.md: establish AC field authority, preserve observations for matched periods without overwriting later comments, and guard four MDVR repairs by exact existing value. No DB writes.
-
Four-agent root-cause/prevention/repair blackboard complete: bb-coder04-mba-l-ca-mtsy2rou-8tk8gb (coder02,db02,db03,audit). Final evidence-resolved synthesis at /data-lezama/movilba/research/export-check/2026-09-08-comparison/BLACKBOARD.md; raw responses adjacent. Existing importer clean() explains764/829 whitespace findings,65remain, measured not assumed. Export/current-record vs normalized-history authority split proven; exact historical writer not established.47ACsource periods allclosed;notes35open/8closed;MDVR3open/1closed require period alignment. Plan: explicit hygiene equivalence+paired-note assertion; DB03 sole scoped repair writer; per-field period/override contract and atomic projection/current sync; one full fresh-export check. Reject universal MDVR numeric constraint and blind catalog/history overwrite.
-
Correction independently confirmed with audit: existing clean() plus NULL-to-empty export serialization explains799/829 whitespace differences,30remain. Earlier764/65 count missed35 whitespace-only source cells cleaned toNone versus CSVempty; no extra internal differences in those35. Typed DB03manifest now resolves source/VDC business-period guards for94category candidates.43notes+4MDVR proposed;47ACstillunresolved. Prepared-scope review only, no DB repair executed.
-
Prepared47-change DEV repair SQL received at /data-lezama/movilba/research/export-check/2026-09-08-db03-47-guarded-DEV-repair.sql. Source-reviewed scope43notes+4MDVR/noAC, guards and postconditions present. NOT executed or database-parse-tested. DB03 finishing recurring writer/projection integration; legacy any-period sync must not be blindly rerun. Requested removal of redundant separate risk-acknowledgment flag to keep one concrete execution decision.
-
DB03 recurring integration handoff received: /data-lezama/movilba/research/export-check/2026-09-08-db03-recurring-projection-integration.md. Repair SQL now has single approval flag. Prevention NOT implemented: known227VDCwriter is a rehearsal artifact; adopted recurring invocation not established. Tools/scripts search shows importer wide-projector call only. Asked coder owner for exact operational entrypoint or confirmation none exists before patching an unused path or introducing a parallel writer.
-
Operational entrypoint established by coder owner and source-read: tools/rutap-sync-prod.sql is repeatable/manual, deliberately excludes MDVR/technical synchronization. Importer separately calls normalized-wide projection only; no automatic full operational wiring found. This is a publication coverage gap, not proof of historical bad-writer identity. Forwarded exact path toDB03 for selected-period recurring-change proposal and explicit field/override contract; no execution.
-
Implementation resumed: comparator now reuses importer hygiene and checks expediente-to-observation preservation jointly. Five regression tests pass; full CSV/XLSX rerun classifies 96520 cells each. Remaining99 mismatches plus86 paired missing-note cells (43 vehicles); ambiguity and non-SSOT coverage remain explicit. Artifacts: /data-lezama/movilba/research/export-check/2026-09-08-comparison-v2/. DB03 recurring sync patch delivered; coder owns integration, coder02 AC/piso preservation implementation, db02 LF rule/target follow-up, audit focused comparator review.
-
Comparator implementation reviewed PASS by audit (tag audit-mba-l-cc-mtszbcvv0ctm), five tests independently pass. Concrete SQL evidence hashes replace incorrect doc citation; serial CR/LF equivalence removes six false differences with raw source preserved. Full updated result:93 mismatches (69 content,24 internal-whitespace) plus86 paired missing-note cells over43 vehicles. Shipping handed to coder. Found and corrected AC patch period-selection design; found recurring-sync global app-history abort and requested per-target exclusion so unrelated imports continue.
-
DEV repair applied and verified in fresh actual-app CSV 15:22 and XLSX 15:30: 2413 rows x 40 columns = 96520 cells per format, zero skips, serialized parity true. All 47 AC mismatches, 43 lost-observation cases (86 paired cells), and 4 terminal-dot MDVR defects resolved. Runtime deployed v5.5.103 / 2052745d; typecheck and health freshness passed. Exact documented TODOBUS alias recognized with catalog evidence. Remaining 41 mismatches: 23 MDVR internal-whitespace and 18 content differences; source ambiguity/catalog/precision and app-only fields remain explicitly unresolved. DB03 owns remaining MDVR ownership check and recurring-sync prerequisite; DEV baseline table/view plus exactly 4 guarded receipts committed, no broad import or PROD changes. Evidence: /data-lezama/movilba/research/export-check/2026-09-08-post-repair-comparison-v2/REPORT.md. Keep item open.
-
DEV reconciliation implemented and final actual UI downloads verified at 15:47 ART: CSV and XLSX each 2413 rows x 40 columns = 96520 classified cells, zero skipped, serialized parity TRUE. All 47 AC read-path discrepancies, 43 missing observations and 28 MDVR values corrected and verified in both formats. Final 24 MDVR transaction committed with 24 ownership receipts; baseline total 28. Recurring sync guards/notes preservation shipped; full operational sync remains a separate manual invocation, not run here. Final archive and TODOBUS evidence shipped v5.5.105 / 7d76f76f, pipeline/typecheck/health PASS. Remaining 17 mismatches are on six app-history domains and preserved, not claimed proven intentional. Separate unresolved coverage: nine ambiguous source domains, two catalog domains (four cells), one precision-risk cell, six export-only test domains and three app-only columns. Final report: /data-lezama/movilba/research/export-check/2026-09-08-final-comparison/REPORT.md. Prior UI-download blocker is resolved for DEV via real authenticated UI clicks. Keep broader item open for unresolved source/catalog cases and existing collation decision; no further audit/rehearsal required for completed repairs.
-
coder04-mba-l-ca
-
researcher 2026-10-08 13:25 ART: splits into two, only one is a decision. FALTA 1 (UI-button/NextAuth-session verification) is not a choice - no agent can browser-auth, only Elazar can run it himself and confirm the file matches. FALTA 2 (collation: accented vs unaccented entity ordering) is the real decision, already correctly framed as his+Eugenia's call before touching the view - en_US.UTF-8 collation gives a 100%-ordered file today (0 pairs out of sequence), the 'inverted pair' was a codepoint-sort artifact of the verification script, not a real defect. unaccent(entidad) is a one-line fix IF they want it, but it reorders every accented entity in the file, not just the one pair - that blast radius is why it needs their word first, not a measured defect to silently fix.
-
2026-10-08T20:30:33-03:00 / 2026-10-08T23:30:33Z researcher-mba-l-cc Investigacion de collation/unaccent para la decision de politica de FALTA 2, fuente-citada (docs Postgres + UCA), escrita en docs/reference/movilba-58-collation-research.md, sha256 217c3196b4eb7cd698f577f77d081f2f4faaf59a6f4d95f7ee5768ddfa6759c4. Ningun DDL propuesto. 1. libc (hoy, en_US.UTF-8): postgresql.org/docs/current/collation.html - Postgres NO documenta regla de orden de acentos bajo libc, delega entero al SO/glibc instalado. Sin garantia universal citable. 2. ICU (CREATE COLLATION provider=icu, locale='es'): CONFIRMADO con terminologia UCA exacta. Nivel Primario (L1) = letra base (acento ignorado), Secundario (L2) = acento (recien ahi desempata). unicode.org/reports/tr10/: "Accent differences are typically ignored, if the base letters differ." Consecuencia: "cafe"/"café" intercalan por letra base, acento solo desempata empates exactos. 3. unaccent() en la vista: postgresql.org/docs/current/unaccent.html - CONFIRMADO que TRANSFORMA el string antes de comparar (borra el acento), no es una collation. Dos nombres que difieren SOLO en acento quedan en empate exacto post-unaccent - orden entre ellos pasa a ser arbitrario/dependiente de una segunda clave de ORDER BY o del plan, sin garantia de ningun lado. Las tres reordenan el archivo entero si se cambia de la actual (mismo blast radius ya senalado en el ticket); la diferencia es que ICU preserva una regla documentada y unaccent() no. No elijo ninguna - decision de Elazar+Eugenia.
-
Picked up for source-path and collation follow-up per coder03's backlog order.
-
2026-10-09 source trace, no code change: /vehiculos ExportButton (src/app/vehiculos/page.tsx SHA 0120016a; component 84ba057d) opens GET /api/export?entity=vehiculos&format=... in a new tab. GET /api/export (SHA 8e539cce) requires a NextAuth session and vehiculos:read before calling fetchParqueMovilExportRows; that service delegates to fetchVehiculosExportRows(false) (service SHA d25e6f9e; builder 8cf7454c). The builder reads v_vehiculos_export without adding orderBy and maps enrichment without reordering, consistent with the existing load-bearing view-order comment. This source trace does not exercise the session-authenticated UI download. Existing researcher note 217c3196 documents libc/ICU/unaccent ordering and leaves the blast-radius decision to Elazar+Eugenia; no ordering policy selected or view edited.
-
Source trace is complete; no code change. Two remaining instruments/decisions are outside this lane: (1) the GET /api/export UI path requires a NextAuth browser session that only Elazar can provide; API-key export did not exercise it. (2) no collation rule has been chosen; researcher’s cited libc/ICU/unaccent analysis leaves the blast-radius/display decision to Elazar and Eugenia. Do not edit view ordering until that policy is decided.