Repository navigation
Conversation
Each gate had its own tests but nothing checked the set was complete; the registry's test found RunDesired passing AcceptBlocking and Restart through to planned statements, so desired-state execution now rejects every acknowledgement from the same list.
Kiran01bm
marked this pull request as ready for review
October 30, 2026 04:49
Kiran01bm
requested review from
JashLal,
aparajon and
eeSeeGee
as code owners
October 30, 2026 04:49
Codex Review SummaryThis 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. |
JashLal
approved these changes
Oct 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
One registry in
pkg/migratelists every operation pg-sprite can run that cannot be undone, with the acknowledgement that lifts its refusal, and a unit test fails CI when a new acknowledgement or destructive shape arrives without an entry.Why
"Make mistakes hard to commit" is enforced gate by gate today:
--allow-destructive,--accept-blocking,--force,--restart,--block-writes, each with its own tests. Nothing checks that the set of gates is complete, so a new irreversible path is caught only if its author remembers to add one. Writing the registry found a gap straight away:RunDesiredrejectedForce,AllowDestructiveandBlockWrites, but passedAcceptBlockingandCopySwap.Restartthrough to every statement the plan derived. The CLI already rejects both with--desired, so only library callers were exposed.What
pkg/migrate/irreversible_registry.go: the five acknowledgements (ackKind) and the registry entries. The destructive-shape entries are derived from the newplanner.DestructiveOpKinds(), so the planner's classification stays the only list of destructive shapes. The other five are listed: blockingDROP INDEX, blockingREINDEX, the submitted blocking form, copy-and-swap restart, and blocked writes.RunDesiredrejects every acknowledgement by walking that list, addingErrAcceptBlockingNotSupportedandErrRestartNotSupported.TestIrreversibleOperationRegistryIsCompletechecks that:Optionsfield, has its own sentinel, and is rejected byRunDesired;docs/schemabot-integration.md:RunDesiredtakes no acknowledgement.No CLI behaviour changes; the behaviour of each gate under a real database is the follow-up.
Before / after
A library caller reuses one
Optionsvalue, withCopySwap.Restart: "public.orders"left set from an imperative run, for a desired-state run whose plan retypespublic.orders.id.Stacked on #281; retarget to
mainonce it merges.