Skip to content

Umbrella: data-layer — Alembic chain repair + schema/ORM sync (blocks RBAC → enterprise) #9920

Description

@mrveiss

Mission

Repair and harden the schema/migration layer so a fresh database upgrades cleanly and ORM models match their migrations. The broken Alembic chain (#9759) is the keystone: it makes fresh-DB upgrades impossible, which blocks RBAC bootstrap, which blocks the enterprise tier. Fix the chain (divergent heads, id mismatch, env.py), then bring out-of-sync ORM models into alignment with their migration columns.

Dependency edges

  • Blocks: RBAC fresh-DB bootstrap → enterprise tier (U12 SSO/tenancy) · U1 fresh-VM provisioning paths that run migrations.
  • Blocked by: none — this is a root. Highest-leverage serial dependency in the graph.

Members (sized)

Note: RBAC fresh-DB schema bootstrap (secrets table only via create_all, not migrations) is tracked under #9759's remediation per the compose out-of-box notes.

Triage delta — 2026-06-12 (new members, post-close follow-ups)

Discoveries — 2026-06-13 (from #10027/#9980 verification)

Triage delta — 2026-06-21

Activity

  1. mrveiss commented on Jun 11, 2026

    @mrveiss
    OwnerAuthor

    Status: both members implemented — PRs open

    Discoveries filed: #9975 (Secret.workflow_id — fixed in #9989), #9980 (LLC models' sa.Enum(PythonEnum) emits member NAMES vs migrations' lowercase values — create_all/migration enum mismatch, 10 columns affected).

  2. mrveiss commented on Jun 11, 2026

    @mrveiss
    OwnerAuthor

    Umbrella complete — both members merged and closed

    Follow-up discovery left open: #9980 (LLC models' sa.Enum(PythonEnum) emits member NAMES vs migrations' lowercase values — 10 columns).

  3. mrveiss commented on Jun 11, 2026

    @mrveiss
    OwnerAuthor

    Post-closure audit (session close-out) surfaced two more gaps in the same family, filed as:

    Already filed during implementation: #9975 (closed via #9989), #9980 (open).

  4. mrveiss commented on Jun 12, 2026

    @mrveiss
    OwnerAuthor

    Reopened: umbrella epics close only by explicit human decision, not by PR keywords or task-list completion.

  5. added a commit that references this issue on Jun 21, 2026
  6. mrveiss commented on Jun 21, 2026

    @mrveiss
    OwnerAuthor

    Data-layer umbrella — all members closed ✅ (recommend close)

    Every member of #9920 (Alembic chain repair + schema/ORM sync) is now merged & closed:

    Member What Landed
    #10027 Shared alembic guard helpers (has_table/ensure_pg_enum…) across 002/018/6 LLC migrations #10072 4c8b019b6
    #9980 values_callable=pg_enum_values on 11 LLC enum columns (repairs ORM read path) #10077 57e9fa625
    #10001 Ansible Alembic tasks silently failing (no -c, swallowed errors) #10039
    #10002 Fresh-DB alembic-upgrade CI gate #10039
    #10026 Legacy-DB upgrade-path gate — case 1 stamped-intermediate, case 3 unstamped→baseline-adoption (#10039), case 2 naive-timestamp 018 conversion (#10368 74fbbeefa) #10039 + #10368

    The repaired chain now upgrades cleanly from every reachable fleet state (fresh, intermediate-stamp, naive-timestamp, unstamped-populated), all gated in migration-matrix CI; the enum NAMES/values mismatch is fixed; and the strict Ansible invocation + baseline-adoption entrypoint protect never-migrated native deploys. Data-layer work complete — recommend closing #9920 (umbrellas are human-closed).

  7. mrveiss commented on Jun 21, 2026

    @mrveiss
    OwnerAuthor

    Data-layer umbrella COMPLETE — closing

    All members merged & closed: #9759, #9899, #9980 (#10077), #10027 (#10072), #10001 + #10002 + #10026 (#10039 + #10368), #10043, #10075, #10076. The repaired Alembic chain upgrades cleanly from every reachable fleet state (fresh / intermediate-stamp / naive-timestamp / unstamped-populated), all gated in migration-matrix CI; enum NAMES/values fixed; strict Ansible invocation + baseline-adoption protect never-migrated native deploys. Data-layer foundation done — it unblocked the RBAC/secrets sub-umbrellas (#10088 well underway, #10193 PRD-stage).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions