basquetWi + New ticket

Removal candidate: view public.v_asociaciones_entidad_persona

Done normal rmresearcher-mba-l-cc

MOVILBA-667 census (2026-10-02): public.v_asociaciones_entidad_persona 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 documents it as a raw entity-person association view; manual/external use 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 progress · 2w ago
    2026-10-02 14:36 ART | Expanded static consumer scan found no references in scripts/, api-external/, docs/reference/parque-movil-api/, or systemd unit files. Prior PROD+DEV checks: view installed, zero dependent views, zero installed routine-body references, no src/tools direct or generated-symbol reader. External/manual SQL consumers and runtime usage remain unmeasured; candidate evidence is not drop authorization.
  • coder03-mba-l-cc assigned · 1w ago
    researcher-mba-l-cc / solo
  • coder03-mba-l-cc statusChanged · 1w ago
    coder03-mba-l-cc 19:35Z - the whole 674-690 + 700 series moves from coder03assistant (now loaded with 407 then 741) to researcher as ONE code-side reader census, not 17 investigations. HARD CONSTRAINT carried from MOVILBA-667: a view with no observed reader is NOT an unused view. 667's honest result was 43 used / 28 undecided / 73 uninstrumented / ZERO unused, and nothing in it authorized a deletion. Same here: the code-side census can only ever produce USED or UNDECIDED. The DB-side half (pg_stat, app_logs, dependent views) needs a db lane and is a separate ask. No drop is authorized by either half.
  • researcher-mba-l-cc note · 1w ago
    2026-10-08T16:33:53-03:00 / 19:33:53Z researcher-mba-l-cc. CODE-SIDE census, 17 removal-candidate items (674-681, 683-690, 700). Scope: src/, tools/, docs/ - identifier grep in BOTH naming forms (snake_case literal, as a raw sql`` template would use it, and the Drizzle-generated camelCase export, as a normal import would use it), since a plain snake_case grep alone would miss an ORM-mapped reader. drizzle/schema.ts itself is the auto-generated DB mirror, not a reader - its presence there is not usage. RESULT: all 17 are UNDECIDED. Zero readers found in src/ or tools/ in either naming form, for every one. docs/ mentions exist for all of them (inventory lists, migration scripts, archived agent maps) but those are documentation ABOUT the object, not code that reads it - not counted as usage, per the instruction. Per-item table (view/column, schema.ts location, code refs found, verdict): 674 v_asociaciones_entidad_persona - drizzle/schema.ts:3253 (pgView). Zero refs to `vAsociacionesEntidadPersona` or snake_case in src/tools. CAUTION: a DIFFERENT, SIMILARLY NAMED view - v_asociaciones_entidad_persona_detalle (schema.ts:3265) - IS actively used: src/actions/asociaciones.ts:10,97-99,142-144. Do not let 674's verdict or any future drop touch the _detalle view; they are two separate database objects sharing a prefix. UNDECIDED. 675 v_audit_integridad - schema.ts:2245 (pgView). Zero refs either naming form. UNDECIDED. 676 v_auth_methods_stats - not found in schema.ts at all (absent from the current Drizzle mirror - possibly already dropped from DEV, or never introspected; db lane should confirm which). Zero code refs. docs/migrations/2026-10-02-movilba-702-drop-accounts-views-DEV-Y-PROD.sql already names it as a drop target. UNDECIDED (code side has nothing to add either way). 677 v_correos_electronicos - schema.ts:3313 (pgView). Zero code refs. UNDECIDED. 678 v_db_users_dominio_falso - not found in schema.ts. Zero code refs. Named in the same 702 drop migration as 676. UNDECIDED. 679 v_db_users_sin_login - not found in schema.ts. Zero code refs. Named in the same 702 drop migration. UNDECIDED. 680 v_direcciones_postales - schema.ts:3324 (pgView). Zero code refs. UNDECIDED. 681 v_numeros_telefonicos - schema.ts:3525 (pgView). Zero code refs. UNDECIDED. 683 v_ui_users - schema.ts:3602 (pgView). Zero code refs. UNDECIDED. 684 v_users - schema.ts:3716 (pgView). Zero code refs (do not confuse with the `users` TABLE, drizzle/schema.ts's `users` export, which IS used extensively - that is a different object). UNDECIDED. 685 v_usuario_permisos - schema.ts:2347 (pgView). Zero code refs. UNDECIDED. 686 v_vehiculos_historial_mas_items - schema.ts:3019 (pgView). Zero code refs. UNDECIDED. 687 rutap.v_rutap_latest_empresas - schema.ts:2124 (rutap.view). Zero code refs. UNDECIDED. 688 rutap.v_rutap_rows_norm - schema.ts:2051 (rutap.view). Zero code refs. UNDECIDED. 689 rutap.v_rutap_ultima_alta_por_dominio - schema.ts:2827 (rutap.view). Zero code refs. UNDECIDED. 690 rutap.v_vdc_mdvr_import_baseline - schema.ts:2025 (rutap.view). Zero code refs. UNDECIDED. 700 public.vehiculos_archive.numero_serie_carroceria (column, not a view) - schema.ts:1591 (`numeroSerieCarroceria: varchar(...)`, part of the vehiculos_archive table definition). Zero code refs to either `numeroSerieCarroceria` or the snake_case literal anywhere in src/ or tools/ - docs/migrations mention it only in SQL files that are themselves migration/reference artifacts, not application code. UNDECIDED. NOT COVERED, explicitly: pg_stat_user_tables / any live-traffic signal (db lane's ask, not this one). Whether any OTHER view depends on one of these 17 as its own source (the "a view read only by another view looks dead from the code side" case coder03 named) - that is DB-side dependency (pg_depend / information_schema.view_table_usage), not visible from a src/ grep, and not checked here. Whether any of these are referenced from a tool/script OUTSIDE this repo (e.g. a one-off analysis script on a corner of data-lezama) - out of the stated scope (src/, tools/, docs/ of this checkout only). Did not check for a raw string built by concatenation (e.g. a schema-prefixed variable + table name joined at runtime) rather than a literal - that would also evade this grep and was not specifically tested for. No drops proposed. All 17 verdicts are UNDECIDED, zero are USED, zero are called UNUSED.
  • researcher-mba-l-cc statusChanged · 1w ago
  • researcher-mba-l-cc note · 1w ago
    2026-10-08T16:35:43-03:00 / 19:35:43Z researcher-mba-l-cc. CORRECTION, coder03's: my 676/678/679 note that 'not found in drizzle/schema.ts' meant they were already dropped was wrong. mba-introspect.sh introspects DEV only - absence from the mirror is DEV-only evidence, it cannot distinguish dropped-in-both from dropped-in-DEV-still-live-in-PROD, and PROD is the base that decides. Retracting that inference; db04's existence-check (per base, separately) is what settles it, not the mirror or the 702 migration's stated intent. Code-side verdict for 676/678/679 unchanged at UNDECIDED either way - zero code refs regardless of which base they exist in.
  • db04-mba-l-ca progress · 1w ago
    2026-10-08 DB-side SELECT-only census: exists both; 0 direct dependent views; base seq/idx PROD 228/0, DEV 1611/448. Ordinary views have no own pg_stat_user_tables/pg_statio_user_tables row; base-table counters do NOT attribute reads to this view, and stats_reset is NULL. No DROP; code-side UNDECIDED remains. Exact query and per-view report: /data-lezama/movilba/evidencia/MOVILBA-667/2026-10-08-view-dependency-and-stats-census.md.
  • researcher-mba-l-cc blocked · 1w ago
    Blocked on Elazar - packaged by coder03 as ONE decision for all 13 unresolvable removal-candidate views (674,675,677,680,681,683-690) plus 700 (moot, already dropped by 702). db04's PROD+DEV existence/pg_depend census is terminal; code side found zero readers in either naming form. No further instrument changes this without the external/manual-consumer evidence class nobody here can observe.
  • researcher-mba-l-cc note · 1w ago
    researcher-mba-l-cc 2026-10-08 19:12 ART / 22:12 UTC. ONE-PASS BRIEF for Elazar, collapsing MOVILBA-674/675/677/680/681/683/684/685/686/687/688/689/690/757 into a single decision. Evidence behind every row: code census (src/, tools/, docs/, both snake_case and Drizzle camelCase naming, 2026-10-08), API-contract scan (docs/reference/parque-movil-api/ + scripts/ + api-external/, 2026-10-02), DB dependency census (pg_depend/information_schema, PROD+DEV, db04 2026-10-08). 30-day hit-count control: UNMEASURED - no base access from this lane, stated rather than left blank. | Item | View (schema-qualified) | Consumers in src | /api/v1 or ship path | Absence-of-ref is the WHOLE evidence? | 30d hits | Recommendation | |---|---|---|---|---|---|---| | 674 | public.v_asociaciones_entidad_persona | NONE (do not confuse with v_asociaciones_entidad_persona_detalle, a DIFFERENT view, actively used at src/actions/asociaciones.ts:10,97-99,142-144) | NONE | NO - also 0 DB dependents, 0 routine refs | unmeasured | DROP - zero consumers across 3 independent checks | | 675 | public.v_audit_integridad | NONE | NONE | NO - also 0 DB dependents | unmeasured | DROP - same reason | | 677 | public.v_correos_electronicos | NONE | NONE | NO - also 0 DB dependents | unmeasured | DROP - same reason | | 680 | public.v_direcciones_postales | NONE | NONE | NO - also 0 DB dependents | unmeasured | DROP - same reason | | 681 | public.v_numeros_telefonicos | NONE | NONE | NO - also 0 DB dependents | unmeasured | DROP - same reason | | 683 | public.v_ui_users | NONE | NONE | NO - also 0 DB dependents | unmeasured | DROP - same reason | | 684 | public.v_users | NONE (not the `users` TABLE, which IS used extensively - different object) | NONE | NO - also 0 DB dependents | unmeasured | DROP - same reason | | 685 | public.v_usuario_permisos | NONE | NONE | NO - also 0 DB dependents | unmeasured | DROP - same reason | | 686 | public.v_vehiculos_historial_mas_items | NONE | NONE | NO - also 0 DB dependents | unmeasured | DROP - same reason | | 687 | rutap.v_rutap_latest_empresas | NONE | NONE | NO - also 0 DB dependents | unmeasured | DROP - same reason | | 688 | rutap.v_rutap_rows_norm | NONE | NONE | NO - also 0 DB dependents | unmeasured | DROP - same reason | | 689 | rutap.v_rutap_ultima_alta_por_dominio | NONE | NONE | NO - also 0 DB dependents | unmeasured | DROP - same reason | | 690 | rutap.v_vdc_mdvr_import_baseline | NONE | NONE | NO - also 0 DB dependents | unmeasured | DROP - same reason | | 757 | agents.v_rutap_historial_carroceria_normalizacion_invariante | NONE | NONE | NO - no creation migration found either (db04) | unmeasured | DROP - weakest case of the 14: not even a migration names its origin | Base-table seq/idx scan counts db04 reported per item (PROD/DEV) are NOT view usage - they count reads on the BASE tables the view selects from, not the view itself; an ordinary view has no own pg_stat row. Not used to support any recommendation above; included in each item's own notes for the record, not repeated here. What none of the three instruments can see, for all 14 alike: a manual/ad-hoc SQL consumer (an analyst query, a corner script outside this repo, a BI tool pointed straight at the DB) leaves no trace in src/, in pg_depend, or in any log this fleet reads. That is the residual risk behind every DROP above - not a reason to withhold the recommendation, but the reason this is Elazar's call and not an automatic action. ONE QUESTION: all 14 views above show zero consumers in code, zero dependent views/routines, and (for 13 of them) a prior API/script scan - same evidence shape across the board. Elazar: DROP all 14 as a single batch, or name which ones to keep and why (e.g. a manual report you run against one of them)? A KEEP needs no further measurement from us, since the only unmeasured class is manual/external use only you would know about.
  • researcher-mba-l-cc note · 1w ago
    2026-10-09T00:38:52Z Batch census (8 views, 701/703 excluded as already-dropped): docs/reference/movilba-674-685-removal-candidate-views-census.md sha256 239ff493877803ac8a78fd12b5435923195d535b045e3017ab073d81e8358ce7. Code refs: zero app usage, schema-mirror only. pg_depend: zero dependents (positive-controlled). relacl: PROD has 9/3/9/9/9/10/9/3 explicit grants across the 8; DEV has grants on only 1 of 8 (owner-only) - flagged as PROD/DEV object divergence. No DROP authorized.
  • researcher-mba-l-cc note · 1w ago
    2026-10-09T00:38:52Z Batch census (8 views, 701/703 excluded as already-dropped): docs/reference/movilba-674-685-removal-candidate-views-census.md sha256 239ff493877803ac8a78fd12b5435923195d535b045e3017ab073d81e8358ce7. Code refs: zero app usage, schema-mirror only. pg_depend: zero dependents (positive-controlled). relacl: PROD has 9/3/9/9/9/10/9/3 explicit grants across the 8; DEV has grants on only 1 of 8 (owner-only) - flagged as PROD/DEV object divergence. No DROP authorized.
  • researcher-mba-l-cc note · 1w ago
    2026-10-09T00:43:00Z RETRACTION/SUPERSEDED: my docs/reference/movilba-674-685-removal-candidate-views-census.md (239ff493) duplicates db03's independently-produced docs/reference/movilba-667-ocho-vistas-relacl-y-dependencias.md (sha256 f9b3b1f5de753a785999c733ed969702ae4a3a07bd7c02ad423bf650cf26bafe), which covers the same 8 views with finer PROD role detail (movilba_readonlyusergroup, penql, audit_ro, three CUIT-named roles, nossesmacchia, 20366097083 on v_ui_users; svc_nextjs arwd on 5 / r on 2) and an instrument-bug correction (coalesce collapsed DEV NULL relacl into NO_EXISTE on db03's first pass). db03's file is canonical for this census; mine adds nothing beyond it. My code-reference grep (zero app usage, all 8) still stands as my half, already matched in db03's writeup's framing. No DROP authorized.
  • researcher-mba-l-cc note · 1w ago
    2026-10-09T00:41:53Z docs/reference/movilba-674-685-removal-candidate-views-census.md retracted in-file (sha256 now 53c11f1e9c63314483738a5f0c5cda329a4e3357b39f03631a471dd8c4d0f033), first line marks f9b3b1f5 canonical. Code-ref half handed to db03 to fold into f9b3b1f5. New batch-drop decision doc for Elazar compiled: docs/reference/movilba-674-685-batch-drop-decision.md sha256 c544fe8ebd57f62c69b9a7e54134e0dc3d71dcaae1e9c7f7ee60c04ba12e440a. Three options stated (DROP both bases / REVOKE external-looking PROD grants only / do nothing), no recommendation picked - decision is Elazar's.
  • researcher-mba-l-cc note · 1w ago
    2026-10-09T00:44:10Z Batch-drop decision doc re-based on e9ce78b7's corrected numbers: svc_nextjs SELECT on all 8 (not 5), PROD counts 9/9/9/9/9/10/3/3, DEV movilba_user on v_audit_integridad AND v_usuario_permisos. Dependents section now states TWO methods (pg_depend + prosrc word-boundary scan, both positive-controlled) per coder03's instruction. Residual-risk line strengthened: svc_nextjs on all 8 is a live internal grantee nothing in code traces, on the whole set not a subset. New sha256: 3ed2a7960da74506278171f3fce073937829c0f03e5c2b88847102e516ecf198. Separate deliverable, coder03's instrument-capability question (which mechanism, if any, could show a live external reader): docs/reference/movilba-674-685-reader-instrument-capability.md, documentation-only research citing postgresql.org (pg_stat_activity=snapshot not history; pg_stat_user_tables has no per-view row for plain views, already established; log_statement default 'none' means no SELECT log unless set to 'all'; pg_stat_statements needs the extension installed; pgaudit not assumed present). Live measurement (is any of these actually active, what window) handed to db03/db04 with 4 specific SELECT-only queries in the file.
  • researcher-mba-l-cc note · 1w ago
    2026-10-09T00:45:xxZ sha256 for docs/reference/movilba-674-685-reader-instrument-capability.md: 5067e284281c26b8fdf19f1c4885a94856b548d39eed1c1f4bc94e64749bbdb3. Will re-pin once db04's live results go in.
  • researcher-mba-l-cc note · 1w ago
    2026-10-09T00:44:57Z sha256 for docs/reference/movilba-674-685-reader-instrument-capability.md: 5067e284281c26b8fdf19f1c4885a94856b548d39eed1c1f4bc94e64749bbdb3. Will re-pin once db04's live results go in.
  • researcher-mba-l-cc note · 1w ago
    2026-10-09T00:45:39Z db03's live results folded in. reader-instrument-capability.md final sha256 426b938c042eeb8f94fed855f7e157e2660d064dd3edb810b4edcf42e2e77310: log_statement PROD=ddl/DEV=none (neither logs SELECT), log_min_duration_statement=-1 both, no pg_stat_statements/pgaudit either base, pg_stat_user_tables has no row for a plain view (positive-controlled vs public.vehiculos real counters), stats_reset NULL both. Answer: unknowable with current instruments, not unknown risk. batch-drop-decision.md updated to state this plainly, final sha256 456f58d0fe546a345d993fff7ae145955fe5779816d2bc788975798e9d47d3db.
  • researcher-mba-l-cc note · 1w ago
    2026-10-09T00:50:36Z Swapped the positive control per coder03: public.vehiculos is a TABLE and does not discriminate the claim (always gets a row). db04's control is correct: public.v_vehiculos_list, a plain view the live repository actually reads today, has 0 pg_stat_user_tables rows in both bases - identical to candidate v_users, proving the counter cannot see view reads for ANY view, used or not. Table check kept as secondary (only proves the counter mechanism works for tables). Re-pinned: ecec89623debd0c18b2f0d8ecf0c9467a8ed338cc8cb336807f123d988d12dec.
  • researcher-mba-l-cc note · 1w ago
    2026-10-09T14:30:00Z. Elazar GO via coder03: DROP all 14 (674/675/677/680/681/683/684/685/686/687/688/689/690/757). DDL apply routes to db04/db03 per standard gate, not this lane. This item's one-pass brief (22:12:30Z note) is the evidence base - no further research owed.
  • db03-mba-l-cc note · 1w ago
    db03 2026-10-09 17:21:35Z PROD / 17:21:43Z DEV. Pre-apply pg_depend check both bases: zero dependent views. Rehearsed under ROLLBACK, then DROP VIEW applied (SUPERUSER_ELAZAR_URL, superuser elazar, PROD first) and DEV (movilba_user). to_regclass confirmed NULL both bases post-drop. Elazar GO via coder03, MOVILBA-674 batch.
  • db03-mba-l-cc unblocked · 1w ago
  • db03-mba-l-cc completed · 1w ago
cleanup
2w ago by coder03assistant-mba-l-ca
1w ago
2026-10-09 17:21