basquetWi + New ticket

Removal candidate: view public.v_ui_links_and_docs_tipo_documento

Done normal cmcoder04-mba-l-ca

MOVILBA-667 census (2026-10-02): public.v_ui_links_and_docs_tipo_documento exists in PROD and DEV. Static scan found no src/ or tools/ reader by relation name or generated Drizzle symbol; pg_depend view graph has zero dependent views; installed routine-body scan has no name reference in either base. view-catalog.md lists it as a document-type dropdown source; current/manual need must be checked. Candidate only; no drop authorization.

Sub-tickets

No sub-tickets.
+ Add sub-ticket

Activity

  • coder03assistant-mba-l-ca created · 2w ago
    parent=#4252
  • coder03assistant-mba-l-ca parentChanged · 2w ago
    parent=MOVILBA-313
  • coder03assistant-mba-l-ca assigned · 2w ago
    coder04-mba-l-ca
  • coder03assistant-mba-l-ca progress · 2w ago
    2026-10-02 14:35 ART | Reparented to MOVILBA-313 per PM. Widened consumer scan: no repo refs in scripts/, api-external/, docs/reference/parque-movil-api/ or systemd units; view-catalog.md:57 still documents this view as the document-type dropdown source. No drop authorized by this census. Confirm whether this option view is actually part of the links_and_docs retirement before treating it as covered.
  • coder04-mba-l-ca progress · 1w ago
    coder04-mba-l-ca | 2026-10-05 12:16 ART. Read-only source census: no runtime use of v_ui_links_and_docs_tipo_documento in src/ or tools/ except an old unrelated aiql note; docs/reference/view-catalog.md:57 still lists it as a document-type dropdown source. Historical SQL docs show v_links_and_docs LEFT JOINs it for doc_type_nombre (MOBAAPI-pgcrypto-removal-prod.sql:132-145). The view is outside MOVILBA-313's authorized drop targets; no DDL/deletion authorization exists for this candidate. Requested db04 to recheck installed dependency state; retain as candidate and do not drop pending that evidence/authorization.
  • db04-mba-l-ca progress · 1w ago
    2026-10-05 SELECT-only: public.v_ui_links_and_docs_tipo_documento still exists in PROD and DEV. PROD pg_depend/pg_rewrite shows zero dependent views; the formerly sole DB consumer v_links_and_docs is absent in both bases. No DROP authorization recorded; helper view left unchanged. This revises the older dependency census but does not authorize removal.
  • db03-mba-l-cc progress · 1w ago
    db03-mba-l-cc 2026-10-05: v_links_and_docs (the claimed sole consumer) does not exist in either base - that dependency claim is stale. Zero installed (pg_depend) or installed-function-body consumers found for v_ui_links_and_docs_tipo_documento in PROD. Only open question is view-catalog.md:57's doc claim it's a UI dropdown source - not an installed DB dependency, needs a human/app-layer check before drop, not a DB-side blocker.
  • db04-mba-l-ca progress · 1w ago
    Elazar simplification directive now authorizes retirement (coder03 decision 2026-10-05). SELECT-only PROD: viewdef md5 7bb3c62da875dfe0c5764b39d72e42dc, owner postgres, ACL md5 c9c8b71eb1152a12b89e57055da75598 (literal ACL recorded by rehearsal NOTICE), 0 dependent views, 0 installed routine references. DEV: viewdef md5 edcff37180170d8c30a246a982a470fb, owner movilba_user, ACL NULL, same zero dependencies. rg src/tools/scripts/api-external/docs/reference/parque-movil-api: 0 runtime readers. Guarded DROP VIEW RESTRICT draft /data-lezama/movilba/migration-evidence/2026-10-05-movilba-682-drop-unused-document-type-view-PROD-Y-DEV.sql SHA256 c51e5c78; ROLLBACK rehearsals passed both bases, no DB write committed. Audit requested before PROD apply.
  • audit-mba-l-cc audited · 1w ago
    audit pass: read SQL full, SHA256 c51e5c78 verified, structural review, DB EXECUTION NOT PERFORMED BY AUDIT
    payload
    {"scope":"read SQL full, SHA256 c51e5c78 verified, structural review, DB EXECUTION NOT PERFORMED BY AUDIT","outcome":"pass","evidence":"owner/ACL/body md5 pins match db04 bwi note both bases; RESTRICT not CASCADE; grep confirms zero runtime readers (src/tools/scripts/api-external), only 2 doc mentions (view-catalog.md, db-inventory.md) needing post-drop update; authorization = coder03 2026-10-05 decision citing Elazar simplification directive","reportRef":null}
  • coder04-mba-l-ca progress · 1w ago
    coder04-mba-l-ca | 2026-10-05 12:30 ART. Updated reference docs for the authorized retirement: docs/reference/view-catalog.md no longer lists v_ui_links_and_docs_tipo_documento as the document-type dropdown source (the exact live mention was here, not in opciones-catalogo.md); docs/reference/opciones-catalogo.md no longer claims the dropped links_and_docs.doc_type_opciones_id column exists. Static scan confirms neither doc retains the retired view/table reference. No view/database change by this lane. db04 owns the guarded DROP VIEW artifact; review/apply remains audit-gated, PROD then DEV.
  • audit-mba-l-cc audited · 1w ago
    audit pass: git diff docs/reference/view-catalog.md + opciones-catalogo.md, by-hunk
    payload
    {"scope":"git diff docs/reference/view-catalog.md + opciones-catalogo.md, by-hunk","outcome":"pass","evidence":"view-catalog.md: tipo-documento column/pointer cleanly removed, piso/provincias row intact; opciones-catalogo.md: dead links_and_docs.doc_type_opciones_id claim removed (table already dropped per 313), notas.fuente_id claim intact. Combined with SQL PASS already recorded. db-inventory.md:150 still has a stale keep row for this view, unaddressed by this diff.","reportRef":null}
  • db04-mba-l-ca progress · 1w ago
    2026-10-05 audit PASS on SHA256 c51e5c78. Applied exact guarded SQL PROD first, post-COMMIT to_regclass NULL and v_personas_completas queryable (19 rows); then applied same SQL DEV, post-COMMIT to_regclass NULL and v_personas_completas queryable (62 rows). Both COMMIT; PROD owner/ACL emitted in transcript before DROP, DEV ACL NULL. No CASCADE. Repository artifact docs/migrations/2026-10-05-movilba-682-drop-unused-document-type-view-PROD-Y-DEV.sql byte-identical SHA256 c51e5c78. Remaining shipment: coder04 removes stale docs mentions from opciones-catalogo.md, view-catalog.md and db-inventory.md; coder03 regenerates Drizzle and ships. No further DB work.
  • coder04-mba-l-ca progress · 1w ago
    coder04-mba-l-ca | 2026-10-05 12:32 ART. Audit found a third stale catalog mention at docs/reference/db-inventory.md:150 (, keep). Removed that inventory row; the diff now updates all three docs: view-catalog.md removes its dropdown-source row, opciones-catalogo.md removes the reference to the dropped links_and_docs.doc_type_opciones_id column, and db-inventory.md removes the keep row. No source readers or DB changes. Sent the added hunk for re-audit; db04 owns the guarded DDL.
  • coder04-mba-l-ca progress · 1w ago
    coder04-mba-l-ca | 2026-10-05 12:32 ART. Audit found a third stale catalog mention at docs/reference/db-inventory.md:150 (v_ui_links_and_docs_tipo_documento, keep). Removed that inventory row; the diff now updates all three docs: view-catalog.md removes its dropdown-source row, opciones-catalogo.md removes the reference to the dropped links_and_docs.doc_type_opciones_id column, and db-inventory.md removes the keep row. No source readers or DB changes. Sent the added hunk for re-audit; db04 owns the guarded DDL.
  • audit-mba-l-cc audited · 1w ago
    audit pass: git diff drizzle/schema.ts, docs/migrations/README.md, docs/reference/db-inventory.md
    payload
    {"scope":"git diff drizzle/schema.ts, docs/migrations/README.md, docs/reference/db-inventory.md","outcome":"pass","evidence":"schema.ts: vUiLinksAndDocsTipoDocumento export removed, -5 lines, relations.ts untouched; README new row SHA c51e5c78 matches prior PASS; db-inventory.md: exact stale row removed, no other change. Ship set complete: SQL+view-catalog+opciones-catalogo+schema+README+inventory all PASSed.","reportRef":null}
  • db04-mba-l-ca completed · 1w ago
    Guarded DROP VIEW applied PROD then DEV after audit PASS (SQL SHA256 c51e5c78), post-COMMIT to_regclass NULL in both and v_personas_completas still queryable. SQL, README, regenerated Drizzle and three docs edits shipped by coder03 in v5.6.154 (main 3888c6c5); PROD and DEV health 154. No remaining DB or documentation action.
cleanup
2w ago by coder03assistant-mba-l-ca
1w ago
2026-10-05 15:36