Repository navigation
Conversation
…build A column added beside the gated changes, or the key dropped or replaced under a new name, built and committed a shadow that failed at the first chunk and was reported as a data fault. Refuse it in the build's transaction instead, as shadow-statement-new-column.
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. |
|
🤖 Reviewed the full PR diff at The new guard checks that the source key remains among the kept columns before examining omitted shadow columns. Reusing One non-blocking coverage suggestion: Validation limits: all 16 reported CI checks are successful, including the PostgreSQL 14–18 jobs. I did not run a local build, tests, or database reproduction. The exact-head surrounding-source API request was unavailable in this execution environment, so I could not independently inspect the unchanged implementations of |
JashLal
left a comment
There was a problem hiding this comment.
🤖 Approving on Jash's behalf after the full-diff review at 51f5765. No concrete blocker found; the optional end-to-end default-fill test and exact-head surrounding-source verification limits are recorded in the review. No local build or tests were run. Generated by Codex.
The shadow build now refuses, as
shadow-statement-new-column, a gated statement that adds a column the copy cannot fill or that leaves the shadow without the source's primary key, instead of committing a shadow whose first chunk fails.Why
The copy list names only the source columns the shadow kept as the same column; every other shadow column is a new column that takes its default on every copied row. The re-add check covers a column dropped and added back under its own name, but a column added beside the other changes, or the key dropped or replaced under a new name, went unchecked: the build committed a shadow, wrote the checkpoint row, and the first chunk failed — with the server's
not_null_violation, which the run treats as a data fault and abandons withcode: data-fault, for a statement no data could have satisfied. From the CLI the shape is one multi-operation statement away:ADD COLUMN … NOT NULLalone is routed native and rejected by the server, but beside anALTER COLUMN TYPEit rides into the copy-and-swap statement and reaches the build.What
refuseUnfillableNewColumnsruns right after the re-add check, inside the build's transaction: it refuses when the primary key is not among the kept columns, and when any other shadow column the copy leaves out refuses NULL (its ownNOT NULLor a domain's) with no default, generation expression, or identity to fill it. Nothing is committed and no checkpoint row is written.shadow-statement-new-column(capability-boundary, ST-11); the message names the column and the remedy.CHECKcase), invariants ST-11, capabilities reason note, README.Before / after
The same statement on
orders(id bigserial PK, qty integer NOT NULL, note text, sku text)with rows in it:ALTER TABLE orders ALTER COLUMN qty TYPE bigint, ADD COLUMN region text NOT NULL. What changed is where it stops; the retype-only statement beside it, and a new column with a default, build and run exactly as before.The other shape,
DROP COLUMN id, ADD COLUMN new_id bigint PRIMARY KEY, ALTER COLUMN qty TYPE bigint, is refused by the same check: it too built and committed a shadow before, one the copy would have to drive byid, which the shadow no longer has.🤖 Generated with Amp (Claude Opus 4.6)