movilba
MOVILBA-360
Permanently retire suffixed colectivo subtype values; permit only SSOT 1, 2, 3, 4
Done urgent
cmcoder04-mba-l-ca
Permanent remediation: SSOT collective subtype values are exactly 1, 2, 3 and 4. Remove and forbid retired aliases 1-Corto, 2-Medio, 3-Largo and 4-Articulado across DEV and PROD catalog options, dependent views, importers, seed/migration scripts, application code, tests and documentation. Preserve the existing option IDs/FKs by updating canonical option values where possible; hard-delete retired duplicate option records only after every FK/reference is repointed and verified. Add an importer/catalog guard that rejects any non-numeric collective subtype value instead of reintroducing an alias. Deploy DEV first; PROD requires explicit execution approval after its migration is prepared and verified.
Activity
-
CORRECCION AL GATE DE ESTE ITEM, y a lo que yo escribi en MOVILBA-359. Medido por db02-mba-l-cc, DEV y PROD, SELECT only. Corrijo en los tres lugares: cuerpo, este evento y el mensaje a los carriles. 1. NO ES UN FK A opciones. La columna de negocio es public.vehiculos.vehiculo_subtipo_transporte_id y apunta a public.vehiculos_subtipos_transporte, una tabla APARTE. Yo escribi en 359 "la columna de negocio guarda el FK a opciones" y eso manda la revision a mirar la tabla equivocada. 2. HAY UN SEÑUELO EN opciones Y ES EXACTAMENTE LA TRAMPA. En opciones, grupo 'vehiculo', campo 'tipo_longitud', existen los ids 120/121/122/123 con valor_opcion 1_CORTO / 2_MEDIO / 3_LARGO / 4_ARTICULADO, presentes e identicos en los dos entornos, y CERO vehiculos apuntan ahi en cualquiera de los dos. Es un catalogo paralelo sin uso. Quien lea 359 y vaya a buscar a opciones va a encontrar cuatro filas que parecen las correctas y son las equivocadas. 3. LOS PARES REALES, identicos en DEV y PROD: id 6 codigo '1-Corto', id 18 codigo '2-Medio', id 17 codigo '3-Largo', id 3 codigo '4-Articulado'. Notar que el id NO sigue al numero del libro: el id 17 es el 3 del libro y el id 18 es el 2. Por eso el numero se toma SIEMPRE de codigo y JAMAS del id. 4. BIYECTIVO sobre los cuatro valores del libro: en DEV, raw_tipo -> codigo da 1->1-Corto 628, 2->2-Medio 6648, 3->3-Largo 14206, 4->4-Articulado 32; 21514 de 21514 filas, sin un quinto par y sin NULL de ninguno de los dos lados. v_ui_vehiculo_subtipo_colectivo devuelve esas cuatro filas con codigo ya expuesto en los dos entornos. 5. LA EXCEPCION QUE HAY QUE RESOLVER ANTES DE SHIPEAR, y es de una sola direccion: el catalogo NO es todo digito-prefijado. vehiculo_tipo_id=1 tiene NUEVE filas vivas: las cuatro de arriba mas ELECTRICO(1), DOBLE_PISO(2), METROBUS(4), MINIBUS(5), COLECTIVO(9), que no llevan digito. El desplegable no las ofrece, PERO LOS DATOS DE PROD APUNTAN AHI: 25 vehiculos vivos en ELECTRICO y 1 en METROBUS. DEV tiene cero. O sea que para 26 vehiculos de PROD no hay numero de libro que mostrar, y un presentador que asuma que codigo arranca con digito muestra 'ELECTRICO' o peor, corta mal. Hay que DECIDIR que muestran esos 26 y escribirlo; que no lo decida un indice de substring.
-
Depende de MOVILBA-361: en PROD raw_tipo esta NULL en las 5388 filas importadas, asi que la procedencia del numero del libro no existe ahi. 360 igual se puede shipear - el codigo del catalogo trae el numero y no depende de raw_tipo - pero NO se puede afirmar fidelidad al libro en PROD mientras 361 este abierto.
-
Tracing all subtype display surfaces; use existing catalog codigo verbatim, central decision, preserve FK storage, no schema migration.
-
Display decision: use vehiculos_subtipos_transporte.codigo verbatim, including ELECTRICO, DOBLE_PISO, METROBUS, MINIBUS and COLECTIVO; do not invent a book numeral. Dedicated subtype FK remains unchanged (id 18 -> 2-Medio; id 17 -> 3-Largo). No opciones.tipo_longitud lookup. No provenance repair or imported data writes; PROD book fidelity remains unproven pending MOVILBA-361.
-
RECORTE DE ALCANCE, Elazar 2026-09-08 06:03: se shipea lo que DEV necesita y nada mas. El codigo del catalogo verbatim en las superficies relevadas ES el arreglo y es correcto en DEV. SALE de este parche la rama SOLO-PROD que coder04 estaba construyendo: retener ELECTRICO/METROBUS como opcion guardada en la edicion es manejo para valores que DEV tiene en CERO, y construirlo hoy es trabajar sobre prod. EL HALLAZGO NO SE BORRA y queda como PRECONDICION del deploy a PROD, con su medicion: 25 vehiculos vivos en ELECTRICO y 1 en METROBUS, ausentes de la vista de cuatro opciones, y la edicion perderia el valor guardado. Se construye cuando vayamos a PROD, no antes. El resto del alcance (dropdown, DTO de detalle y PDF, DTO de lista, historial tipado, export CSV y XLSX, vista de export intacta, sin cambios de almacenamiento) queda igual.
-
Elazar scope correction relayed by coder02 at 06:03 ART: DEV only. Removed saved legacy-code edit option branch from this patch. FUTURE PROD DEPLOY PRECONDITION: db02 previously measured 25 live vehicles using ELECTRICO and 1 METROBUS, absent from v_ui_vehiculo_subtipo_colectivo four-option dropdown; edit cannot display their saved selection today. Build and validate that handling when PROD work is authorized. Finding retained; no further PROD work or measurement for 360. MOVILBA-361 parked by lead.
-
db03 READ-ONLY DEV using actual shared helper: ids 6/18/17/3 resolve 1-Corto/2-Medio/3-Largo/4-Articulado; NULL and -1 resolve NULL; existing deleted ids 10..14 resolve NULL. Detail/list FK versus vehiculos: zero mismatches each. Actual fetchVehiculosExportRows(false) 2409 rows versus original SELECT 2409; zero vehicle-ID sequence differences and zero subtype-label mismatches. History helper uses each historical row FK. No DDL/DML or fixtures. Main vehicle list has no subtype column; its DTO now uses shared code. Ficha PDF uses detail DTO, raw imported PDF change text remains source provenance.
-
Deployed DEV commit 8edd5b91 v5.5.84 via gitdeploydev.sh, exit0. Lint/typecheck/build/sync passed; health attempt1 and freshness patch84 matched. Lock released. 12 Chromium edit tests pass, history values/presenter/renderer pass. Audit and read-only browser/PDF/export checks requested; closure pending their evidence.
-
Audit audit-mba-l-cc CLEARED 8edd5b91 (mtsg4sv4vz62): shared helper across readers, correct dedicated catalog identity, per-period history FK preserved, same deleted predicate, batched export lookup retains view order, proportional tests. No blockers. Browser/PDF/export confirmation queued with proxy behind active 359 exercise; item remains open until that evidence.
-
Persistent future-PROD prerequisite record created: /home/rob/Documents/work/gcaba/movilba-web/agents/coder04-mba-l/handoffs/2026-09-08-movilba-360-prod-preconditions.md . Survives DEV closure. Records shipped codigo-verbatim helper, dedicated subtype table (not opciones), previously reported 25 ELECTRICO + 1 METROBUS and zero DEV cases, deferred edit-selection preservation and verification required when PROD work is authorized. No fresh PROD query, code, or deployment. Closure must enumerate ficha/list/alta/edit/export/PDF actually exercised versus not exercised; audit/DB/component evidence is not browser evidence.
-
CORRECTION to preceding prerequisite-file reference: canonical record is docs/migrations/pending-prod-changes.md, now updated with the standalone 2026-09-08 MOVILBA-360 entry. Removed the duplicate handoff file. Entry preserves prior 25 ELECTRICO + 1 METROBUS measurement, zero DEV cases and explicitly unexercised branch, shipped codigo verbatim, decision reserved to Elazar whether those 26 should show something else, and deferred edit-selection issue. Record survives DEV item closure; no new PROD work.
-
v5.5.84 browser found GET dropdown batch 500. Root cause reproduced by db03 as SQLSTATE21000: Drizzle unqualified nested id self-correlated. Prior export-only SQL replay did not exercise colliding id case. Corrective b7ce74e4 v5.5.85 deploying: dropdowns read codigo directly from view; remaining helper preserves explicit qualification; generated-query regression uses identical inner/outer id. Canonical pending-prod record committed in this correction. Browser evidence so far: PB111AA ficha 2-Medio; AE922FX import ficha and typed Alta history 3-Largo. Other surfaces not yet browser verified. No closure until corrected endpoint and remaining evidence.
-
Corrective DEV deployment b7ce74e4 v5.5.85 completed exit0; lint/typecheck/build/sync passed, health attempt1 and freshness85 matched; lock released. Proxy asked to retry exact failing authenticated dropdown batch and resume359 first. Re-audit requested. Source-only residual, nonblocking: edit submits saved React state, not DOM FormData, so missing select option does not clear saved subtype; intentional blank sanitizes null then becomes undefined and is omitted by writer. No PROD browser claim or data-loss finding.
-
Corrective b7ce74e4 independently CLEARED by audit (mtsggnx5inpn) after generated SQL review. Proxy authenticated retry of exact failing batch now HTTP200 on v5.5.85; selects populated, FABRI/359 resumed (mtsgggjgmsvz). This proves endpoint recovery, not blanket browser verification of all 360 surfaces. Remaining closure evidence stays pending.
-
Read-only browser coverage proxy ondev01 patch88: LIST subtype NOT EXPOSED, only Dominio/Entidad/Linea columns. CSV/Excel Descargar content NOT VERIFIED: synthetic popup blocked and tool cannot inspect export; credential-bearingURL not shared. PB111AA PDF generated application/pdf5527bytes, text content NOT VERIFIED (proxy lacks parser). Existing PDF shared-path handoff requested for localpdftotext; no content-pass claim.
-
PDF content verification remains NOT EXERCISED: proxy has no filesystem/blob-save capability; tool output sanitizer blocks encoded bytes, download unavailable. No extraction workaround or file transfer attempted. Localpdftotext available but needs actualartifact from capablebrowser/download lane. Keep generation success separate from subtype text correctness.
-
Source verification complete: ficha PDF exports Tipo de colectivo from subtipoTransporteNombre; repository resolves this through vehiculoSubtipoLabel. CSV/XLSX shared export column Tipo resolves the same dedicated vehiculos_subtipos_transporte.codigo by FK, excluding deleted catalog rows. No numeric FK is emitted. Browser list does not expose a subtype column. Browser export contents remain NOT EXERCISED; source verification does not establish downloaded content.
-
Proxy reports Elazar manually exported and shared PB111AA PDF: Tipo de colectivo: 2-Medio renders correctly. PDF content now confirmed. CSV/XLSX retain source verification only; browser-rendered downloaded contents NOT EXERCISED. List has no subtype column. PB111AA state has changed since the prior rehearsal; do not reuse the old baseline.
-
Elazar corrected acceptance: Tipo de colectivo must show SSOT literals1,2,3,4. Prior no-defect verdict withdrawn. DB03 measured id6 codigo=1-Corto descripcion=Corto; id18 2-Medio/Medio; id17 3-Largo/Largo; id3 4-Articulado/Articulado. Runtime reads codigo verbatim, no concatenation. Historical migration33 intentionally replaced descripcion digits with words; Aug31 migration called digits a bug. Correct both columns and old-string dropdown view atomically; preserve FK identities. Rerunnable tipo_longitud seed removed, historical migrations preserved with README supersession. Runtime Nombre contract renamed Codigo.
-
DB03 applied corrective migration DEV only: four existing subtype IDs6/18/17/3 now have codigo and descripcion1/2/3/4. Dropdown view updated in same transaction; posterior SELECT verifies all4 id/code/label rows. Runtime field rename and seed removal ready to deploy. Existing component regression suite15/15 passes plus generatedSQL correlation check. No PROD write. No introspection per lead instruction; same view columns/types.
-
db03 applied DEV-only docs/migrations/2026-09-08-movilba-360-subtipos-DEV.sql in coder04 worktree. Transaction asserted host10.9.10.54/database movilba_dev and exact before images, updated IDs6/18/17/3 codigo+descripcion to1/2/3/4, replaced dropdown filter atomically, selected all4 rows and view and asserted matching4. COMMIT confirmed. No persistent suffix CHECK; PROD untouched. coder04 owns guarded direct introspection/code ship. Separate risks386/387 filed.
-
SHIPPED4dece879 v5.5.90 to DEV, deploy exit0, lint/typecheck and health/freshness pass. Catalog and dropdown corrected by DB03; codigo/descripcion1,2,3,4 preserve IDs6,18,17,3. Runtime contract now subtipoTransporteCodigo. Incorrect active tipo_longitud seed removed; historical migrations preserved with supersession; canonical instruction prohibits inferred descriptions. Generated subtype view refreshed verbatim from direct DEV introspection; unrelated generation drift excluded.15component tests+SQLscope test pass. No persistent DB suffix constraint added; no PROD changes.
-
Proxy read-only verification PASS on DEV v5.5.90 / 4dece879: PB111AA ficha shows Tipo de colectivo: 2; edit dropdown labels are exactly 1, 2, 3, 4 with existing IDs 6, 18, 17, 3. No save or vehicle mutation. PDF was not re-exported in this verification; shared ficha/PDF source uses corrected catalog code.
-
Verification scope clarified per PM: runtime measured ONLY PB111AA ficha and edit dropdown on DEV v5.5.90, read-only. PDF export path NOT exercised after correction; other vehicles NOT exercised. Corrected shared source is supporting code evidence, not a measured PDF result. DEV work accepted; item remains OPEN because PROD still contains suffix corruption. No PROD action until fresh explicit Elazar GO relayed through coder02. No extra PDF verification round requested now.
-
coder04-mba-l-cc
-
DATO PARA CUANDO SE TOQUE PROD - db02-mba-l-cc, 2026-09-12, medido en PROD (10.78.42.168), SOLO LECTURA. Confirma que el item sigue abierto por PROD y agrega una poblacion que hay que decidir ANTES de repetir ahi la migracion de DEV. 1. Estado actual de PROD: los cuatro subtipos siguen con codigo 1-Corto / 2-Medio / 3-Largo / 4-Articulado, y v_ui_vehiculo_subtipo_colectivo de PROD tiene la lista blanca VIEJA con esos mismos cuatro literales. O sea PROD es internamente coherente y el desplegable funciona: la deriva es que DEV y PROD tienen hoy distinto catalogo Y distinta definicion de vista. 2. LA POBLACION QUE CAMBIA EL ALCANCE: en PROD hay 9 subtipos vivos, no 4. Los cuatro numerados mas COLECTIVO, DOBLE_PISO, ELECTRICO, METROBUS y MINIBUS. Y hay 26 vehiculos VIVOS de PROD apuntando a subtipos que el desplegable no ofrece: 25 en ELECTRICO y 1 en METROBUS. En DEV no hay ninguno - los 2425 caen en 1/2/3/4. O sea que la migracion que en DEV toco cuatro filas sin poblacion afuera, en PROD se corre sobre un catalogo donde 26 fichas vivas quedan fuera del desplegable con el que se las edita. 3. Conteo por subtipo en PROD, vehiculos vivos: 1-Corto 67, 2-Medio 761, 3-Largo 1549, 4-Articulado 4, ELECTRICO 25, METROBUS 1. Total 2407. 4. Ademas, y vale para los dos entornos: la vista lleva un SEGUNDO filtro de texto que la correccion de DEV no toco, vtt.descripcion = 'Colectivo'. Hoy hay un solo tipo vivo con ese nombre exacto, asi que no excluye nada y es el punto donde un cambio de etiqueta vacia el desplegable entero. Detalle y propuesta en MOVILBA-387. Nada ejecutado. PROD no se toca sin GO propio.
-
PROD artifact prepared, no DB write and no deployment: commit 5ffbc306 on branch coder04-mba-l-cc/movilba-360-prod-prep adds docs/migrations/2026-09-13-movilba-360-subtipos-PROD.sql. It preserves IDs/FKs, updates only IDs 6/18/17/3 from 1-Corto/2-Medio/3-Largo/4-Articulado to SSOT literals 1/2/3/4, replaces the dropdown view in the same transaction, and aborts on wrong DB/server or changed before-image. ELECTRICO/METROBUS remain untouched because live PROD vehicles reference them and this item defines no replacement. Fresh explicit PROD GO remains required before execution.
-
Tipo de colectivo must show SSOT numerals 1, 2, 3 or 4 only
-
was: Elazar, 2026-09-08 CLI: 'data shown in movilba should be mirror of ssot snapshot, if ssot reads 1, then we use 1'. El libro trae Tipo como un NUMERO (hoja PRUEBAS en DEV01, columna M: 2, 3, 2, 4). La pantalla muestra solo Corto/Medio/Largo/Articulado, asi que quien tiene el libro al lado no puede cotejar: el dato que el usa para identificar desaparecio. MEDIDO POR db02-mba-l-cc EN DEV, y es lo que hace que esto NO necesite migracion: el catalogo de subtipo ya guarda el codigo como '1-Corto', '2-Medio', '3-Largo', '4-Articulado', y la vista v_ui_vehiculo_subtipo_colectivo ya expone codigo ADEMAS de la etiqueta. O sea que el numero del libro NO se perdio nunca: esta en el catalogo y la vista ya lo entrega. ARREGLO: la pantalla muestra el codigo del catalogo TAL CUAL ('2-Medio'), que contiene el numeral exacto del libro y la etiqueta juntos. No se parsea el string para extraer el numero - partir por el guion es fragil y no hace falta - y no se toca ninguna columna. Es un cambio de presentacion contra una vista que ya devuelve el campo. PROHIBICION QUE GATEA LA REVISION: el numero crudo del libro NUNCA va a una columna FK; el 2 del libro no es el id 2 de opciones. El almacenamiento sigue siendo el FK a opciones y no cambia. Alcance: enumerar TODAS las superficies que muestran subtipo (ficha, lista, alta, edicion, export, PDF) y decidir en una sola, no parchear la que aparecio en el ensayo. Encontrado durante el ensayo del guion de Eugenia, MOVILBA-359.
-
Acceptance criterion corrected from historical wording: the visible value must be exactly the SSOT numeral; 2-Medio is a defect.
-
Current detail/PDF has one shared subtipoTransporteNombre presenter path; create/edit dropdown source remains a separate surface to verify before declaring every visible path compliant.
-
coder04-mba-l-ca
-
Assignment normalized to coder04-mba-l-ca following identity correction.
-
was: SSOT Tipo de colectivo values are the numerals 1, 2, 3 and 4. Remove all appended labels such as Corto, Medio, Largo and Articulado from every user-visible surface: vehicle detail, PDF, XLSX/CSV export, create and edit dropdowns. Preserve the existing option FKs; external SSOT numerals are never option IDs. DEV was corrected earlier but a later PDF showed 2-Medio, so the current deployment and all shared presentation paths must be reconciled to numerals only. PROD remains a separate explicit-approval action.
-
Independent deployed-code review (sha 564a026c, DEV v5.5.151) confirms shared consumers use catalog codigo verbatim. No hardcoded suffix consumer found. Diagnose any DEV recurrence from the catalog row; PROD retains 1-Corto/2-Medio/3-Largo/4-Articulado pending its explicitly gated migration.
-
Permanently retire suffixed colectivo subtype values; permit only SSOT 1, 2, 3, 4
-
was: SSOT Tipo de colectivo values must be displayed exactly as numerals 1, 2, 3 or 4 in every user-facing surface. At deployed DEV v5.5.151 the presentation code is single-sourced from catalog codigo and has no hardcoded descriptive suffixes; a recurrence such as 2-Medio is a catalog/deployment-data problem, not a new presenter implementation. Preserve option FKs. PROD catalog still has suffixed values and remains unchanged until explicit PROD GO.
-
Stakeholder direction 2026-09-14: eliminate retired descriptive aliases permanently across DB, import paths, code and docs. A recurring 2-Medio is unacceptable; the future contract is numeric-only 1/2/3/4.
-
Repository census: active-looking stale subtype mappings exist in tools/aiql-movilba/CLAUDE.md and tools/import/IMPORT_STATUS.md; the historical import design explicitly matches leading digits against suffixed catalog codes; pending PROD SQL alters descripcion only while leaving codigo suffixed. These are recurrence paths. Separate tipo_longitud/tipo_vehiculo records must be classified before deletion because they may be distinct domains.
-
db03 measured no duplicate subtype rows in DEV or PROD. Canonical stable IDs 3/6/17/18 preserve all FKs; DEV codes already numeric and PROD retains the four hybrid aliases. db03 is executing guarded in-place normalization in DEV then PROD under Elazar's authorization, with a hybrid-alias guard. No delete/repoint is required.
-
DEV and PROD complete: stable subtype IDs 3/6/17/18 normalized in place to 4/1/3/2; view returns exactly 1|2|3|4; validated CHECK and trigger block hybrid aliases; deliberate DEV 1-Corto rejection passed. db03 also measured zero FK references to the separate tipo_longitud aliases 1_CORTO/2_MEDIO/3_LARGO/4_ARTICULADO and hard-deleted all four in DEV and PROD. Audit approved the migration; descripcion trigger protection and exact live projection resolver are in progress as final recurrence closures.
-
DEV and PROD now enforce exact SSOT colectivo subtype codes 1..4: catalog normalized; stable IDs protected from code/display drift and soft deletion; live DEV projection exact-matches bare numeric input; retired unreferenced tipo_longitud aliases hard-deleted in both environments. Final independent audit requested.
-
Application/source cleanup committed and pushed to DEV as 02ff439d (v5.5.154); release tool passed lint and full typecheck. DEV health endpoint returned ok after build initiation.
-
Independent audit PASS: DEV/PROD exact-subtype loader guards reviewed; host gate, no-op behavior, exact function pre/postflight, and strict bare-digit resolver verified. Added ON_ERROR_STOP to both migration records to align with the repository convention.
bug
5w ago by wi-cli-venus
4w ago
2026-09-14 15:52