movilba
MOVILBA-313
Retirar links_and_docs: tabla muerta, su vista, y rebuild de v_personas_completas sin ella
Done high
cmcoder04-mba-l-ca
MOVILBA-313. La tabla existe y NADIE la llama: los 9 usos de <LinksAndDocs> estan comentados. Ensayo DEV 2026-09-07 con AMBOS brazos (positivo: regrant -> rutax_user=r sobrevive; negativo: sin regrant -> SELECT false, relacl NULL, fallando como fallaria el defecto). Cierre de dependencias PROD: 2 vistas, 0 FKs, count 0. GO de Elazar dado 2026-09-07 y condicionado a que exista el documento de apply auditado (verbatim: 'go 313 when the doc is ready'). Doc de ensayo: docs/migrations/2026-09-07-movilba-313-DEV-rehearsal.md.
Sub-tickets — 1/1 done
MOVILBA-682 Done
cmcoder04-mba-l-ca
Activity
-
Retirar links_and_docs: tabla muerta, su vista, y rebuild de v_personas_completas sin ella
-
was: Medido por coder03 2026-09-07, nada arreglado todavia. SINTOMA visible: el modal renderiza "Failed query: update \"vehiculos\" set \"dominio\"..." (proxy, v5.5.28, req f9fc45a3-b857-49de-bfd7-195102e3ff90). El DOM es UNA superficie, no la fuga. 1. ENTRADA: el catch general de la capa de ACCION, no un call site. src/actions/vehiculos.ts:390 devuelve { success:false, error: error.message }. 27 returns asi en 9 archivos de src/actions/. Convencion MIXTA: la mayoria de los catches de esos mismos archivos devuelven un string FIJO. 2. SALE DEL SERVIDOR: el texto crudo viaja en el payload de la accion, o sea en el body HTTP, sin modal y sin JS. Y el log() de arriba YA manda serializeErrorForLog(error) a app_logs: devolverlo no aporta valor diagnostico y solo paga la divulgacion. Eso cierra la objecion "lo necesitamos para debuggear". 3. NO AUTENTICADO - premisa corregida: el login NO filtra, LoginForm.tsx:110-140 mapea CODIGOS a mensajes curados y ya es la convencion destino. De 20 rutas API con el patron, la unica sin auth es api/auth/federated-logout/route.ts:65 y ahi es un log, no un body. La exposicion no autenticada real: el guard de auth esta ADENTRO del try. Si auth() o hasPermission() tiran (DB caida, sesion no decodificable), ese mismo catch devuelve el mensaje crudo a alguien que nunca se autentico. La llamada normal sin sesion devuelve el fijo No autorizado; lo que filtra es el MODO DE FALLA. FORMA DESTINO (ya existe en el repo, no inventar una tercera): mensaje humano accionable + requestId en la UI, error crudo SOLO a app_logs, correlacionado por ese id. DOS BARATAS del mismo transcript: ErrorModal.tsx:119 y :146-150 concatenan titulo y mensaje SIN separador; y el banner pide mandar a soporte un texto que hoy es un fragmento de query - primero el contenido, despues la copy es verdadera.
-
researcher-mba-l-cc 2026-09-24 03:55 - links_and_docs table/view/action removed from code (commits 9d026032, 78df62c3, dd0cc537); verified artifact gone from src/, drizzle schema regenerated and applied in dev 2026-09-07
-
researcher-mba-l-cc 2026-09-24 03:59 - links_and_docs code refs removed from src/ and drizzle schema regenerated (commits 9d026032, 78df62c3, dd0cc537); database objects (table, view, dependent v_personas_completas) require db-side verification in DEV and PROD, not measurable from repo; blocked pending db lane check
-
coder04-mba-l-ca
-
coder04-mba-l-ca | 2026-10-02 13:32 ART. Read current item and rehearsal. The source-code removal is already recorded as completed on 2026-09-24; remaining acceptance is database-side: independently inspect PROD dependencies/owner/ACL, rebuild the view without links_and_docs, drop the dead view/table without CASCADE, re-grant roles, and verify through a real svc_nextjs connection. The only attached rehearsal is DEV rollback-only and explicitly does not cover PROD privileges or a committed runtime check. This is a DB-lane deliverable; no database or repository changes made.
-
coder04-mba-l-ca | 2026-10-05 12:16 ART. Current repo has the pending PROD apply artifact docs/migrations/2026-09-07-movilba-313-PROD-apply.sql; it guards database/current_user, view fingerprint, owner/ACL, exact dependent closure, zero table rows, rebuilt ordered columns, and post-rebuild ACL, and uses no CASCADE. No current PROD read/preflight was run by this lane; requested current read-only fingerprint/owner/ACL/dependency/row-count confirmation from db04 and scoped audit of this artifact. DEV apply is already recorded and remains untouched. No DB/code changes made.
-
audit pass: read docs/migrations/2026-09-07-movilba-313-PROD-apply.sql full 257 lines, structural/logical review only, no DB exec, SHA256 22869ecc74ee
payload
{"scope":"read docs/migrations/2026-09-07-movilba-313-PROD-apply.sql full 257 lines, structural/logical review only, no DB exec, SHA256 22869ecc74ee","outcome":"pass","evidence":"matches 313 GO (apply doc existing); drop links_and_docs+v_links_and_docs, rebuild v_personas_completas sans projection, owner/ACL+svc_nextjs/audit_ro grant preserved, dep closure pinned {v_links_and_docs,v_personas_completas}, no CASCADE, mandatory post-COMMIT fresh-conn check; grep confirms v_ui_links_and_docs_tipo_documento (682) never referenced","reportRef":null} -
2026-10-05 SELECT-only preflight found the pending PROD apply artifact is stale; DO NOT APPLY. Live PROD movilba: public.links_and_docs and public.v_links_and_docs both absent; v_personas_completas already has no links_and_docs output/reference (28 columns, 19 rows), md5(pg_get_viewdef)=c78ce9c8e6584c540ae0c9be021affb0 vs artifact pin f6564705, owner movilba_owner vs artifact expectation elazar, ACL {svc_nextjs=r/movilba_owner,movilba_owner=arwdDxtm/movilba_owner,audit_ro=r/movilba_owner}. DEV also lacks both objects and has same viewdef md5, owner movilba_user. v_ui_links_and_docs_tipo_documento remains in both; PROD has zero DB view dependents (v_links_and_docs no longer exists). This is installed-state measurement only, no DB write. Determine which prior migration/rebuild produced it before recording 313 as applied; artifact cannot run against current PROD.
-
db04 PROD preflight 2026-10-05 12:24: links_and_docs/v_links_and_docs already absent PROD+DEV, v_personas_completas already rebuilt without links projection, but owner/ACL differs from artifact pin (live owner movilba_owner+svc_nextjs/audit_ro grant; artifact expects elazar, md5 c78ce9c8 vs pinned f6564705). My audit PASS reviewed artifact logic and ticket-match only, no DB exec, never clearance to apply. Artifact's own md5 guard would abort on first run regardless. Do not replay this SQL. Needs: identify what already applied the change before closing 313. 682 untouched, no drop authorization.
-
db03-mba-l-cc 2026-10-05 fresh read-only PROD preflight: links_and_docs table and v_links_and_docs view do NOT exist in PROD or DEV already - nothing to drop there. v_ui_links_and_docs_tipo_documento exists both bases (owner postgres, acl all /postgres incl svc_nextjs=arwd), body is a thin opciones wrapper (grupo_nombre=documentos, campo_nombre=tipo_documento) with zero dependency on links_and_docs. Dependent closure (pg_depend rewrite-rule, deptype=n) = zero views depending on it in PROD; zero public/rutap function bodies reference it; zero repo (src/,tools/) hits.
-
Goal state verified SELECT-only 2026-10-05 in PROD and DEV: public.links_and_docs and public.v_links_and_docs absent; v_personas_completas has no links_and_docs output/reference, 28 columns, viewdef md5 c78ce9c8e6584c540ae0c9be021affb0 in both. PROD owner movilba_owner, ACL retains svc_nextjs and audit_ro SELECT; DEV owner movilba_user. Pending 2026-09-07 PROD script was NOT replayed because its fingerprint/owner pins are stale. Apply record missing: the executor/time of the prior successful removal is not recorded. Per coder03 decision, no further 313 DDL.
-
coder04-mba-l-ca | 2026-10-05 12:28 ART. Source-side attribution check: tracked migrations contain only the already-recorded DEV apply/rehearsal and the pending 2026-09-07 PROD artifact; git history has no separate PROD apply artifact/change beyond the initial migration archive. db04's fresh SELECT-only verification finds target state already present in both bases, but explicitly reports the prior executor/time is unrecorded. Do not replay stale SQL. No 313 DDL performed by this lane; status remains open pending disposition of the missing apply record.
-
coder04-mba-l-ca | 2026-10-05 12:29 ART. Closing on db04/db03 SELECT-only verification in PROD and DEV: links_and_docs and v_links_and_docs are absent; v_personas_completas has 28 columns and no links_and_docs output/reference (viewdef md5 c78ce9c8e6584c540ae0c9be021affb0 in both). No dependents remain for the 682 helper view. Apply record missing: no tracked source identifies who applied the PROD change. The pending 2026-09-07 PROD SQL is stale and was not replayed; no DB changes made by this lane.
security
5w ago by wi-cli-venus
1w ago
2026-10-05 15:25