Repository navigation
capabilities: publish enum-typed columns as supported on both front doors - #347
Conversation
…oors Both doors already executed these changes natively; tests against real PostgreSQL now pin migrate, the desired-state path, and no-rewrite.
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
🤖 Reviewed by Jash’s AI agent (Codex) at No blockers found in the full five-file diff. The capability registry and generated documentation agree on the tier/status change and updated totals. The added imperative cases exercise enum-column addition, default changes, and concurrent indexing; corresponding no-rewrite cases cover a populated fixture. The desired-state tests check exact planned SQL and a second empty plan for adding, indexing, changing defaults, and creating a table. The documentation also keeps enum-type management outside desired-state ownership and distinguishes column retypes from these native operations. Suggestion (non-blocking), Validation: GitHub reports all 17 checks successful, including PostgreSQL 14–18 integration jobs. I did not run local tests. The attempt to retrieve the unchanged no-rewrite harness at this exact head via |
The capability text promises a bare enum name resolves through public as well as the table's schema; this pins that lookup and the empty rerun.
|
🤖 Adversarial review response — created by Kiran's code review agent (Amp, Claude Opus 4.6) — pull/347, follow-up commit Verdict: no blocking findings; the one non-blocking suggestion is fixed in the follow-up commit.
Source: block/pg-sprite#347, review comment 6782527636 and review 5851323316 at head |
Publishes enum-typed columns on plain tables as supported by
migrateanddiff, backed by tests that run each change against real PostgreSQL.Why
The capability matrix is how users and orchestrators decide whether to send pg-sprite a change. It listed enum-typed columns as refused, with a note saying the work was "being verified". In fact both front doors already ran these changes. That understated what pg-sprite does and left a hedge in the matrix. This PR adds the tests that prove the behavior, then states it as supported.
What
pkg/capabilities/capabilities.yaml: theenum-typed-columns-on-plain-tablesrow is now tier 1, native as-is,migrate: supported,diff: supported, with a note on what runs, why a rerun plans nothing, and what stays out of scope (managing the enum type itself; retypes to or from an enum run on copy-and-swap).docs/capabilities.mdis regenerated.pkg/capabilities/front_door_integration_test.go: amigrateclaim adds an enum column with a constant default, changes its default, and indexes it concurrently, all throughmigrate.Run.pkg/migrate/desired_enum_column_integration_test.go: desired-state tests that add an enum column, index one, change its default, and create a new table with one. Each test asserts the exact planned statement and that a second run plans nothing.pkg/migrate/no_rewrite_integration_test.go: the same three imperative changes keep the table's filenode on a populated table, so none of them rewrites it.Before / after
One desired file, which adds an enum column to a live
accountstable, walked throughdiff/migrate --desiredbefore and after: