basquetWi + New ticket
movilba MOVILBA-750

El esquema agents no existe en PROD y en DEV tiene agents.v_vehiculo_lookup con 70 columnas

Done normal dmdb04-mba-l-ca

Measured while censusing MOVILBA-745 on 2026-10-08, SELECT-only, both bases. The whole schema 'agents' DOES NOT EXIST in PROD movilba - information_schema.schemata has no row for it - while DEV movilba_dev has it with agents.v_vehiculo_lookup, 70 columns, observaciones already absent. DEV's only legitimate divergence is ROWS, never objects, so an object DEV has and PROD lacks is a defect by the project rule, and the direction is the question this item answers: either the view is wanted and PROD is missing it, or it was a DEV-only experiment and DEV carries a stray object. Do NOT assume PROD is the side to fix - the rule says structure flows PROD to DEV unless a migration or ticket establishes otherwise for that object, and docs/migrations/2026-09-18-movilba-472-drop-vdc-observaciones-DEV.sql lines 24-29 DOES establish intent for it, calling it an interface toward unknown external consumers not documented in docs/reference/agents-vehiculo-lookup.md. Cite that or supersede it; do not re-derive from memory. OPERATIONAL CONSEQUENCE, which is why this is filed and not a note: the DEV recipe for dropping vdc.observaciones includes a DROP of agents.v_vehiculo_lookup that has NO counterpart in PROD, so anyone replaying that file against PROD hits a missing relation. The PROD dependency chain is ten views and does not include it. INSTRUMENT WARNING: a probe shaped coalesce((select count(...) ...),'ABSENT') can never report ABSENT because an aggregate returns a row with zero matches - it needs case when count(*)>0 inside. With the broken shape I read this view as PRESENT in PROD, where the schema does not exist. Parity is reported as a census keyed by name and diffed in BOTH directions, per MOVILBA-585.

Sub-tickets

No sub-tickets.
+ Add sub-ticket

Activity

  • db03-mba-l-cc created · 1w ago
  • coder03-mba-l-cc assigned · 1w ago
    db04-mba-l-ca
  • db04-mba-l-ca statusChanged · 1w ago
    Checking installed state and the existing MOVILBA-472/479/585 documentation before choosing convergence direction; SELECT-only, no DDL.
  • db04-mba-l-ca progress · 1w ago
    SELECT-only 2026-10-08: PROD movilba has NO agents schema; DEV movilba_dev has exactly two agents views: v_vehiculo_lookup (70 cols) and v_rutap_historial_carroceria_normalizacion_invariante (13 cols), both owner movilba_user, relacl NULL; agents schema nspacl NULL. pg_depend through pg_rewrite: neither agents view has a downstream DB view dependent. v_vehiculo_lookup reads public v_opciones, v_validadoras_actual, v_vehiculo_cadena, v_vehiculo_historial, v_vehiculos_detalle, and rutap.vehiculo_historial_normalizado. No runtime src/ or tools/ references to either agents view; DEV has no pg_stat_statements extension, so manual/external reads are unobservable, NOT proven absent. Crucial provenance: docs/migrations/2026-08-24-agents-v-vehiculo-lookup-DEV.sql header explicitly says DEV-only, agent-query convenience, no app consumer, no PROD version absent Elazar request; docs/reference/agents-vehiculo-lookup.md documents use. 2026-09-18 applied 472 DEV migration deliberately rebuilt it without observaciones as an interface to unknown external consumers. Later parity rule and 585/731 record this as structural divergence, but original migration establishes intentional DEV-only scope. Direction remains a decision: port both views to PROD (new schema/interface) or retain a documented DEV-only exception; do not DROP in DEV on zero code references alone.
  • db04-mba-l-ca blocked · 1w ago
    Await Elazar/PM decision on the explicit DEV-only agents interface versus the later schema-parity rule. Original 2026-08-24 migration says no PROD version absent Elazar request; current DEV has 2 views (70/13 cols), no app/DB-view dependents, but unknown manual consumers. No PROD CREATE or DEV DROP authorized by this census alone.
  • db04-mba-l-ca progress · 1w ago
    Further provenance/dup check: MOVILBA-747 (p1, assigned db03) already asks the same v_vehiculo_lookup direction/consumer decision. 750 should not independently decide or implement that lookup. Second DEV-only agents view is distinct: v_rutap_historial_carroceria_normalizacion_invariante, 13 cols, zero rows today; installed body is a diagnostic over imported normalized history joined to carrocerias, showing missing/ambiguous exact catalog matches. No repo migration creates it (rg docs/tools/src), no src/tools runtime reader and no downstream DB-view dependent; DEV pg_stat_statements absent, so manual reads unobservable. Its original intent is not established by the explicit 2026-08-24 DEV-only lookup migration. Proposal to PM/db03: let 747 own lookup; scope 750 to this second diagnostic object or cancel as duplicate if 747 absorbs both. No DDL.
  • db04-mba-l-ca decision · 1w ago
    PM 2026-10-08: is a documented DEV-only exception under the parity rule, not a missing PROD deployment. Citation: docs/migrations/2026-08-24-agents-v-vehiculo-lookup-DEV.sql header says agent-query convenience, not product, no PROD version absent Elazar request; docs/migrations/2026-09-18-movilba-472-drop-vdc-observaciones-DEV.sql deliberately preserves/rebuilds lookup as an interface. No PROD CREATE or DEV DROP. Current two DEV views covered by PM's schema-level decision; second zero-row diagnostic view's creation artifact remains absent from repo and is not falsely attributed to Aug24. Parity census paragraph updated at docs/reference/movilba-585-dev-prod-structural-census.md SHA256 64d89ab7689645236ed0d991508821150c7af1ab9d59cd371e8c5690a7a754e7.
  • db04-mba-l-ca unblocked · 1w ago
    cleared: Await Elazar/PM decision on the explicit DEV-only agents interface versus the later schema-parity rule. Original 2026-08-24 migration says no PROD version absent Elazar request; current DEV has 2 views (70/13 cols), no app/DB-view dependents, but unknown manual consumers. No PROD CREATE or DEV DROP authorized by this census alone.
  • db04-mba-l-ca completed · 1w ago
    Documented DEV-only agents exception; parity census and MOVILBA-479/585 records corrected. No DB write.
  • db04-mba-l-ca note · 1w ago
    Correction to the 21:36 decision event: its first sentence must read "the agents schema is a documented DEV-only exception". Shell interpretation removed the schema name from that one sentence; all citations and the census paragraph were recorded correctly. No DB change.
  • db04-mba-l-ca note · 1w ago
    CORRECTION to 21:36 decision/close note: parity carve-out applies ONLY to agents.v_vehiculo_lookup. PM 18:36 ART clarified that the second agents view, v_rutap_historial_carroceria_normalizacion_invariante, has no creation migration citation and is NOT an exception. Filed MOVILBA-757 removal candidate, blocked on external/manual-consumer decision; no DROP/CREATE. The 585 census now splits the two objects, SHA256 90caa1f79bd0aa16663fff1b4562e60f184218e5aef4c591a12c1d315cb7fd69, superseding 64d89ab7. 750 remains closed for the lookup decision.
bug
1w ago by db03-mba-l-cc
1w ago
2026-10-08 21:36