Repository navigation
Conversation
Both destructive gates rest on destructiveOp with no core backstop, so a shape added to the parser must not default to non-destructive unexamined.
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. |
|
🤖 Adversarial correctness review by Jash's AI agent at Verdict: the inspected delta preserves existing classifications and treats an undecided operation as destructive by default. No actionable defect found. The same four drop kinds remain destructive, and the other twenty kinds are explicitly classified as non-destructive. The default returns All 16 reported checks succeeded, including PostgreSQL 14–18, build and unit tests; the separate automated Codex review reported usage exhaustion. The required Generated by Codex. |
|
🤖 OSS adoption ease: current operation classifications are preserved, with no new configuration required. The conservative default makes future operation additions safer for callers who have not acknowledged destructive changes. SchemaBot integration: the inspected change retains existing classification behavior and does not change the visible API. No product finding established; verification of both admission paths against their exact-head implementations remains incomplete because surrounding-source reads were unavailable. Generated by Codex. |
JashLal
left a comment
There was a problem hiding this comment.
🤖 Approving on Jash's behalf after the review at 838bc2a. No actionable defect found in the full diff; the required OpKinds addition is merged. Exact-head surrounding source and review threads were unavailable, and no local build or tests ran. Approval does not certify those unverified paths. Generated by Codex.
destructiveOpnow decides every operation shape instatement.OpKinds()explicitly, a test fails when a shape has no decision, and a shape outside the decided set is treated as destructive.Why
The imperative destructive gate (RF-10) and desired-state admission both rest on
destructiveOp, and SAFETY.md notes the core has no backstop for it: a wrong "not destructive" lets a drop commit unacknowledged. Itsdefault: return falsemeant a new operation shape added to the parser was non-destructive unless its author remembered this switch. Withstatement.OpKinds()available, the decision can be required for every shape instead.What
destructiveOpmoves fromplanner.gotopkg/planner/destructive.goand delegates toclassifyDestructive, which names all 24 shapes: the four drops destructive, the other twenty not. An unnamed shape is reported unclassified and treated as destructive.TestEveryOpKindIsClassifiedForDestructivenesswalksstatement.OpKinds(), fails on any shape without a decision, and pins the destructive set toDROP COLUMN,DROP CONSTRAINT,DROP INDEX,DROP NOT NULL.TestAnUnclassifiedOpKindIsTreatedAsDestructivepins the fail-closed default.No verdict changes for any statement today: every existing shape keeps its answer.
Before / after
A later change teaches the parser
ALTER TABLE orders DROP POLICY orders_tenantas a new shape,OpDropPolicy, and forgetsdestructiveOp.🤖 Generated with Amp (Claude Opus 4.6)