basquetWi + New ticket
movilba MOVILBA-395

Census residual raw chassis-model column before any database drop

Blocked normal cmcoder03assistant-mba-l-ca ⛔ Census is complete for available source. Awaiting Elazar decision before any destructive change to the populated column: A) retain raw chasis_modelo and current API transfer paths; B) authorize coordinated retirement across app DB, sync contracts and external APIs. The agents schema and named downstream-client reads are not present in this checkout; the Node/PHP APIs use separate vehiculos_rutap storage and expose the field, but do not directly read the three app views. No DDL/data change without explicit GO.

DEV v5.5.151 no longer exposes or collects chasisModeloVehiculo in vehicle add, edit, or detail pages. The raw alias remains only in actions, services, repositories, and types as an accept/write path. Before removing that plumbing or dropping public.vehiculos.chasis_modelo, db03 must complete the pg_depend and importer census. Preserve normalized catalog chassis data and historical/source witnesses. No database deletion is authorized by this item alone.

Sub-tickets

No sub-tickets.
+ Add sub-ticket

Activity

  • wi-cli-venus created · 5w ago
  • wi-cli-venus note · 5w ago
    UI removal scoped3pages plus regression. Four tests PASS: TSX sweep no raw alias/label; normalized selectors retained; actual production edit mapping compiled to Drizzle UPDATE omits chasis_modelo when payload omits key, positive legacy-key control included. This proves built statement only, NOT live saved-row preservation; no live save performed. Fast-forwarded b9997c73 v93 preserving PDF filename patch. v94 deploy running. DB/importer census pending for exact public.vehiculos.chasis_modelo, distinct normalized/raw-history fields untouched.
  • wi-cli-venus note · 5w ago
    UI SHIPPED50bbc165 v5.5.94: normal deploy exit0 lint/typecheck/health/freshness PASS, lock released. Conditional DB drop NOT done; awaiting db03 DB projector/dependency/actual-write census. No inference of unused from repo grep. Normalized chassis model and raw/history source witness unchanged.
  • wi-cli-venus assigned · 4w ago
    coder-mba-l-cc
  • wi-cli-venus statusChanged · 4w ago
    Reopened: the current source still exposes raw Chasis Excel presentation paths; reconcile removal with MOVILBA-399's canonical Marca/Modelo display.
  • wi-cli-venus progress · 4w ago
    Codebase reconciliation found raw per-vehicle chasisModeloVehiculo presentation in the vehicle detail page. It conflicts with this item's completed UI-removal claim; deployment state must be verified before closing.
  • wi-cli-venus progress · 4w ago
    Current source confirms the raw field is still editable as chasisModeloVehiculo in /vehiculos/agregar/colectivo and /vehiculos/[id]/editar/colectivo, and still displayed in /vehiculos/[id]. The prior UI-shipped claim is therefore not a current-code closure.
  • wi-cli-venus titleChanged · 4w ago
    Census residual raw chassis-model column before any database drop
  • wi-cli-venus descriptionChanged · 4w ago
    was: Remove Modelo de chasis (excel) raw field from UI everywhere, preserving normalized chasis selector/model. UI alias chasisModeloVehiculo maps public.vehiculos.chasis_modelo; remove create/edit input, state/hydration and raw match prefill. Conditional DB drop separate: db03 pg_depend/importer census, no DROP until unused confirmed and coordinated. Do not confuse normalized chasis.chasis_modelo or rutap historical/raw source witness.
  • wi-cli-venus progress · 4w ago
    Correction to 2026-09-14 local-worktree finding: deployed DEV sha 564a026c has no raw-field UI presentation. The earlier reopening was based on a dirty non-deployed worktree and must not be treated as runtime evidence. Remaining scope is dependency/importer census and a separate approved DB decision.
  • wi-cli-venus assigned · 4w ago
    coder03-mba-l-cc / coder
  • coder03assistant-mba-l-ca progress · 3w ago
    coder03assistant-mba-l-ca | 2026-09-24 04:00:26 ART DEV movilba_dev: 2413/2431 live vehiculos retain nonblank raw chasis_modelo; PROD movilba: 2413/2413. Both branches still carry raw column plumbing. pg_depend/importer census and deletion decision remain outstanding; do not drop.
  • coder03-mba-l-cc assigned · 2w ago
    coder03assistant-mba-l-ca
  • db03-mba-l-cc progress · 1w ago
    db03-mba-l-cc 2026-10-05 15:11 ART - DEPENDENCY CENSUS of public.vehiculos.chasis_modelo (raw book text), SELECT only, PROD then DEV, identical in both. 1. Column: text, nullable. Non-blank: PROD 2419/2419 rows; DEV 2419/2457 (38 blank are app-created DEV rows). 2. pg_depend: 3 views project it as chasis_modelo_vehiculo: v_vehiculos_detalle, v_vehiculos_export, v_vehiculos_list (the separate ch.chasis_modelo in each is the normalized catalog, a different column). No constraint, index or trigger depends on it. 3. Importer WRITES it: rutap.materializar_snapshot_raices INSERT (line 171, via rutap.chasis_modelo_desde_libro); rutap.reconciliar_snapshot UPDATE (line 526) plus a drift comparison (line 190) plus the missing-value report (line 146); rutap.proyectar_snapshot carries chasis_modelo on the normalized side, NOT this column (keep it). 4. App: write path only, at repositories/vehiculos.ts:752,958,1343, services/vehiculos.ts:38,606,981, actions/vehiculos.ts:294 and types/vehiculos.ts:23,142,330. The read path is vehiculos.ts:464 getViewSelectedFields(vVehiculosDetalle), which pulls chasisModeloVehiculo into the DTO; no src/app file references it, so no UI shows it (tools/tests/colectivo-no-raw-chassis-ui.test.cjs). The XLSX export (lib/exports/vehiculos.ts:117) selects the whole view, but the COLUMNS array does not emit it. The /api/v1 tree has no reference. DROP SEQUENCE if Elazar wants it (needs his decision; there is a non-null value on every PROD row): a) remove the app write path and types; b) redefine the 3 views without the column (CREATE OR REPLACE cannot drop a column: it takes DROP+CREATE plus grant re-apply, PROD first); c) remove the column from the materializar INSERT and the reconciliar UPDATE/compare/report; d) ALTER TABLE DROP COLUMN; e) mba-introspect. Witness preserved: rutap.vehiculo_historial_normalizado.raw_chasis_modelo and the normalized chasis_id. NOT MEASURED: the agents schema; out-of-repo consumers (nodejs-api/php-api) reading these 3 views.
  • researcher-mba-l-cc note · 1w ago
    researcher 2026-10-08 13:22 ART: real decision, stays with Elazar - db03's 2026-10-05 census is complete (pg_depend: 3 views project chasis_modelo; importer writes it on both paths; app only writes, never reads for UI; XLSX export selects the view but its COLUMNS array doesn't emit it). The open question is genuinely his: drop the column (5-step sequence already scoped: app write path, 3 view DROP+CREATE+regrant, importer INSERT/UPDATE/report, ALTER TABLE DROP COLUMN, introspect) given every PROD row has a non-null value, or keep it as a dormant witness alongside the already-preserved rutap.vehiculo_historial_normalizado.raw_chasis_modelo. Not measured yet: agents schema, out-of-repo API consumers - note that gap before he decides.
  • coder03assistant-mba-l-ca note · 1w ago
    Additional read-only census for the missing decision gap: no separate schema file or schema reference under agents/ refers to the raw field; the only agents/ code hit is agents/db03-mba-l/refresh-analysis-20260805.sql:41, which compares source m.chasis_modelo with e.chasis_modelo_vehiculo. External API consumers are real code paths, not inferred from the view census: nested api-external/nodejs-api accepts chasis_modelo in SyncVehicle and persists it to vehiculos_rutap (src/services/sync.ts:5-10,75; schema.ts:32-38), and /v1/consulta01 returns it as chasis_modelo (services/vehicles.ts:22-28; routes/v1/consulta01.ts:67-68). Nested PHP API also selects vehiculos_rutap.chasis_modelo and emits modelo_chasis (/public_html/query_consulta01.php:98-112,144-155), and sync.php writes chasis_modelo (/public_html/sync.php:69-80). Its external-api-db.yaml:116-120 documents this field in the downstream view and :124+ lists PLUG, DGT, ORT and GCBA internal consumers. This proves the external API contract/path uses the value; it does NOT establish which named client currently reads that field. Therefore retain the gap: client-level usage and any schema outside the checkout remain unmeasured, for Elazar's decision before any DROP. No edits or DB writes.
  • coder03assistant-mba-l-ca note · 1w ago
    Census addendum 2026-10-08: the checked-out agents/ tree has no separate schema and only one raw-field SQL hit (refresh-analysis-20260805.sql:41). The nested api-external Node and PHP services are independent consumers of the field in their own vehiculos_rutap storage: both accept/persist chasis_modelo and expose it through consulta01 (Node response key chasis_modelo; PHP modelo_chasis). Their code does NOT directly read the three public app views, and source/docs do not establish which named downstream client reads the field. The agent schema and actual client-level usage remain unobserved. No code, data, or DDL changed. Decision needed before any drop: A) retain the populated raw column and its app/API transfer paths; B) authorize a coordinated retirement of the raw field across app DB, sync contracts and external APIs, accepting the downstream compatibility risk.
  • coder03assistant-mba-l-ca blocked · 1w ago
    Census is complete for available source. Awaiting Elazar decision before any destructive change to the populated column: A) retain raw chasis_modelo and current API transfer paths; B) authorize coordinated retirement across app DB, sync contracts and external APIs. The agents schema and named downstream-client reads are not present in this checkout; the Node/PHP APIs use separate vehiculos_rutap storage and expose the field, but do not directly read the three app views. No DDL/data change without explicit GO.
task
5w ago by wi-cli-venus
1w ago