Repository navigation
Conversation
A FINALIZE step ran as an ordinary brief step inside a transaction, skipping the detach step's partition read; refuse it before anything runs.
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 e79ba54: 0 blocking, 4 non-blocking. Inspected the whole change at The PR is +69/-2. A sequence step that parses as What "replayed" means here, from the code: nothing is detected. The check is on the parsed statement ( Invariants ( Non-blocking
Test case (not run here): a FINALIZE in any spelling is refusedfunc TestAdmitSequenceRefusesADetachFinalizeInEverySpelling(t *testing.T) {
for name, sql := range map[string]string{
"beside another subcommand": `ALTER TABLE s.t ADD COLUMN note text, DETACH PARTITION s.p FINALIZE`,
"if exists": `ALTER TABLE IF EXISTS s.t DETACH PARTITION s.p FINALIZE`,
"only": `ALTER TABLE ONLY s.t DETACH PARTITION s.p FINALIZE`,
} {
t.Run(name, func(t *testing.T) {
require.ErrorIs(t, AdmitSequenceShape([]string{sql}), ErrUnsupportedSequenceStep)
})
}
}Not run: the three spellings are expected to parse and be refused by the loop in
Verified
This review was generated by Claude Code (claude-sonnet-5-5). |
|
🤖 Review 2/2 (OSS adoption and integration) of e79ba54: 0 blocking, 2 non-blocking. Read the change from two seats: a host that plans through the library and hands steps back to 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: 0 blocking, 6 non-blocking (see the review comments above).
This stamp was left by Claude Code (claude-sonnet-5-5).
|
🤖 I reviewed the complete four-file diff at P2 · Exercise a detach-pending fixture. The integration case starts with a normally attached partition. A fixture left in detach-pending state would additionally demonstrate that a GitHub reported all 18 checks successful. I did not run local tests. Direct Builderbot lookup failed to resolve its host. GitHub showed no current-head Builderbot check or review, and I did not independently enumerate unresolved inline threads. |
JashLal
left a comment
There was a problem hiding this comment.
🤖 Approved by Codex on Jash’s behalf after reviewing the current head, as instructed. See my substantive review comment for findings and validation limits; approval does not resolve those findings.
executor.RunSequencenow refuses a sequence that carriesALTER TABLE ... DETACH PARTITION ... FINALIZEbefore any of its steps runs.Why
Detaching a partition concurrently can be interrupted, leaving the partition "detach-pending"; the plan then shows the
FINALIZEstatement that finishes it. A library caller that copied that statement back into a sequence had it run as a plain step inside a transaction, after earlier steps had already changed the table, instead of through the detach step that checks the partition's state first. Now the caller is told up front to rerun the original concurrent detach, and nothing in the sequence runs.What
admitAlterTableStepchecks the parsed statement'sFinalizesDetach()first and returnsErrUnsupportedSequenceStep, pointing at theDETACH PARTITION ... CONCURRENTLYthat finishes the detach. The existing sentinel keeps the typed code mapping unchanged.FINALIZE.docs/plan-report.md'sexec_sqlrow states the refusal.notecolumn is never added and the partition stays attached).Before / after
The same two-step sequence goes to
RunSequence. Before, step 1 commits and step 2 then runs as a plain transactional step; after, the sequence is refused before step 1.