Skip to content

Label addition edges: shared types, default-in-same-run, append ordering, idempotence #332

Description

@0x054

Parent

Spec: #329.

What to build

The edges that make label addition production-shaped rather than demo-shaped:

  • One StrEnum shared by several models reconciles its type exactly once per run — clean boot output, clean catalog history.
  • The single-deploy shape "add a member, add a new column defaulting to it" works in one migrate_updates=True boot: the label lands (committed, autocommit pre-pass) before the table plan that references it.
  • Appended labels take end-of-order positions in the Postgres enum ordering regardless of Python declaration order — pinned as documented behavior, since ORDER BY on an enum column follows database order.
  • A second boot against a reconciled schema plans zero enum DDL: label addition is idempotent and warm reconnects stay fast.

Acceptance criteria

  • Live test: shared type across two models → exactly one reconciliation
  • Live test: new label used as a new column's default in the same run → boot succeeds and default applies
  • Live test: appended label sorts last under ORDER BY on the enum column
  • Live test: second migrate_updates=True boot emits no enum statements

Blocked by

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agentFully specified, ready for an AFK agent

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions