Repository navigation
Conversation
…type The closed copy-and-swap gate told the operator to pass --copy-and-swap, which only reaches the partitioned-parent refusal.
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. |
|
🤖 Review 1/2 (correctness) of ff4ffd3: 1 blocking, 3 non-blocking. Inspected the whole change at CI: 7 checks red, 6 of them from one new test in this PR, which is blocking. The change itself reads correct: the route is unchanged, the new cause is minted only when every decision routed to the closed route is a retype the planner marked, and any other mix, a resumed stopped run, or an opened route keeps the old behavior. The fail-closed direction is right: a decoded plan, a retype the planner could not verify, or a retype that rewrites the column anyway all fall back to Invariants ( Blocking
Fix sketch (not run)func retypeOrders(t *testing.T) (*pgxpool.Pool, string) {
t.Helper()
url := testutil.NewDatabase(t, testutil.StartPostgres(t))
pool, err := dbconn.NewPool(t.Context(), dbconn.Config{
URL: url,
MaxConnsFloor: migrate.CopySwapMinConns(copier.Options{}),
})
// ...with Non-blocking
Verified
This review was generated by Claude Code (claude-sonnet-5-5). |
|
🤖 Review 2/2 (OSS adoption and integration) of ff4ffd3: 1 blocking, 2 non-blocking. The blocking count is the PR-wide total from comment 1/2 (the red test); this comment adds no blocking finding of its own. Read the change from two seats: an operator who hits the refusal on the CLI and has only its Non-blocking
What reads well for adopters
This review was generated by Claude Code (claude-sonnet-5-5). |
aparajon
left a comment
There was a problem hiding this comment.
🤖 Stamping with comments: 1 blocking, 5 non-blocking (see the review comments above).
This stamp was left by Claude Code (claude-sonnet-5-5).
The test that opens the copy-and-swap route reached its pool-size check on CI runners whose default pool holds 4 connections, not the 6 it needs.
|
🤖 Delta review of 44f9374: 0 blocking, 5 non-blocking. Delta since the reviewed BlockingNone. The one blocking finding is fixed. Fixed: the red Whether it passes is CI's to say, not mine: I ran nothing here (see the CI line below). Prior non-blocking findingsNone of the five was addressed in this commit. All five stay open and none blocks the merge.
New defects in the new commitNone found. The commit is test-only and adds one import ( Verified at the new head
This review was generated by Claude Code (claude-sonnet-5-5). |
aparajon
left a comment
There was a problem hiding this comment.
🤖 Stamping with comments: 0 blocking, 5 non-blocking (see the delta review comment above). The earlier blocker, the pool-size failure in the new test, is fixed by reading; CI on this head was still running when I posted.
This stamp was left by Claude Code (claude-sonnet-5-5).
Retyping a column that a partitioned table's index reads is now refused with its own cause,
partitioned-index-rebuild, and the refusal says how to run the change, instead of pointing at--copy-and-swap.Why
Some type changes, such as widening
varchar(10)tovarchar(20), are instant on an ordinary table. On a partitioned table, PostgreSQL rebuilds every partition's index that reads the column while it locks the whole table, so pg-sprite refuses to run it directly. The refusal said to turn on copy-and-swap (pg-sprite's rebuild-a-copy route), but copy-and-swap does not take partitioned tables either, so an operator who followed the advice hit a second refusal and still had no way forward.What
New cause
verdict.CausePartitionedIndexRebuild(partitioned-index-rebuild) undercopy-and-swap-refused, classcapability-boundary, listed insiteRefusals()and inTestReasonAndCauseTokensAreFlat.The planner marks such a retype with
RebuildsPartitionedIndexes(in-process only, not in the plan JSON or the fingerprint, so no format bump).New
pkg/migrate/partitioned_index_rebuild.go. The run's gate, the imperative dry run, the dry run's preflight and the desired-state door use it when every copy-and-swap decision is such a retype and the statement does not resume a stopped run.The detail names the rebuild and the two-run path:
--accept-blocking,--allow-destructiveand--expect-fingerprint.Or run the statement with
--force, which holds the lock while the indexes rebuild.An ordinary table's retype keeps
copy-and-swap-not-enabled. With--copy-and-swappassed, the refusal is stillcopy-and-swap-partitioned.Docs:
refusal-classes.md,schemabot-integration.md,cli-output-examples.md,limitations.md,binary-coercible-type-changes.md,capabilities.mdandcapabilities.yaml.Tests:
migrate.Runwith default options asserts the new cause. Further tests check that the opened route still givescopy-and-swap-partitioned, that an ordinary table and a rewriting retype keep the old cause, and that the CLI dry run matches the run. The new-cause tests fail without the change.Before / after
eventsis partitioned and has an index onname varchar(10); the change widens the column.