Repository navigation
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-red RED evidence (pins removed once): proof drift 'add acl:(function:public.f()).corpus_prev_owner', 'remove acl:(table:public.t).corpus_dp_reader', 'add column:public.t_r.c_r', and 'dependency cycle among N actions' for the rename cases. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review Summary: ✅ CompletedThis 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. |
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e730e4f3b2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
commit: |
The trigger-rename scenarios and rename--column-on-recreated-table have NOT NULL columns without a default, so the proof's DEFAULT VALUES seed would skip them once the pins are removed. The recreated table's b side is partitioned with no partitions and cannot hold a row, so it gets no seed-b. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Four corpus scenarios, each pinned on its forward direction (reverse passes): - table-ops--rowtype-column-blocks-add-domain-column and table-ops--rowtype-column-blocks-retype (#677): t1 is created with a column of t2's row type before the ALTER that rewrites t2, which fails with 'cannot alter table "t2" because column "t1.r" uses its row type'. - type-ops--enum-remove-label-keeps-grant and type-ops--enum-remove-label-keeps-public-revoke (#678): the enum rebuild drops the type's grant to a role and its REVOKE from PUBLIC (drift). The export round-trip hits #677 too on the by-object and ordered layouts; KnownGap gains `layouts` so that gap is pinned while grouped must pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0102a9e203
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
With a child row, leaving the parent now fails the data proof
("s"."p": 2 -> 1 rows) because the child is dropped and re-created, so
the forward direction is pinned in EXPECTED_RED for #634. The reverse
replacement stays pinned in budget.json.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Summary
TL;DR: Pins all 27 Ephyra property-testing findings (#615–#641), plus #677 and #678 from the compaction differential test, as expected failures, so each bug has a red test on
mainbefore anyone starts its fix. Each pin checks the specific failure text (or exact symptom) and turns the suite red once the bug is fixed, forcing the pin's removal in the fix PR. Test-only: nosrc/change, no changeset.Tracking: CLI-3259 (Linear umbrella).
How each finding is pinned
EXPECTED_REDpin (proof loop, pinned direction must fail with the recorded text; the other direction must pass): pg-delta: retyping both ends of a foreign key fails ("foreign key constraint … cannot be implemented") #615, pg-delta: a column type change drops the column's collation, and the next plan drops the column #616, pg-delta: SET DEFAULT runs before the column's new type exists #617, pg-delta: ADD GENERATED AS IDENTITY runs before SET NOT NULL and before the type change #618, pg-delta: removing an enum label fails when a policy references the column #619, pg-delta: a type change between types with no cast produces a plan that cannot apply #620, pg-delta: a column a child table both declares and inherits is planned as the child's own (already exists / cannot alter inherited column) #622 (retype case), pg-delta: DROP NOT NULL on an inheritance parent also clears the child's own NOT NULL (PG < 18) #623, pg-delta: dependency cycle when a partitioned table with a column-level grant becomes a plain table #624, pg-delta: publication membership of inheritance children is planned twice (already member / not part of the publication) #625, pg-delta: dropping or moving a partition fails when a foreign key references the partitioned table #626, pg-delta: an explicit grant to an object's previous owner is lost when the owner changes #627, pg-delta: the applying role's default privileges stay on a new table created for another owner #628, pg-delta: default privileges a role holds on its own objects are planned wrong; on Supabase every schema apply plans GRANT EXECUTE ON FUNCTIONS TO PUBLIC #630 (plain PG), pg-delta: dependency cycle when an inheritance parent with an FK to its child becomes partitioned #632, pg-delta: the proof counts an inheritance parent's children as its own rows (false data loss) #633, pg-delta: changing a collation's locale or determinism fails while a column uses it #635, pg-delta: a function that must be re-created is dropped while a generated column still calls it #636, pg-delta: rename detection throws a dependency cycle (column + trigger, type + column, rename + container change, rename + function change, rename on a re-created table) #637 (six cases), pg-delta: a partition index whose name changes is dropped while attached; a new partition's index keeps PostgreSQL's generated name #638, pg-delta: renaming a table and one of its columns together renames only the table #639, pg-delta: a column moved to a range type that reuses the old multirange name creates the new range first #640, pg-delta: on PostgreSQL 14, planning any ICU collation throws "expected a scalar, got null" #641, pg-delta: a table whose row type a new column uses is altered after that column exists, and PostgreSQL refuses the ALTER #677 (two cases), pg-delta: removing an enum label rebuilds the type without its privileges #678 (two cases).budget.jsonexpectedFailure: pg-delta: adding or removing a table's inheritance parent drops and re-creates the table instead of INHERIT / NO INHERIT #634 (the proof passes, but the plan replaces the child table instead ofINHERIT/NO INHERIT).KNOWN_GAPS: pg-delta: a column a child table both declares and inherits is planned as the child's own (already exists / cannot alter inherited column) #622 and pg-delta: a partition index whose name changes is dropped while attached; a new partition's index keeps PostgreSQL's generated name #638 export forms, pg-delta: DROP NOT NULL on an inheritance parent also clears the child's own NOT NULL (PG < 18) #623's scenario, pg-delta: default privileges a role holds on its own objects are planned wrong; on Supabase every schema apply plans GRANT EXECUTE ON FUNCTIONS TO PUBLIC #630 (both scenarios), pg-delta: on PostgreSQL 14, planning any ICU collation throws "expected a scalar, got null" #641 on PG 14, pg-delta: a table whose row type a new column uses is altered after that column exists, and PostgreSQL refuses the ALTER #677's domain-column form (by-object and ordered layouts only).rewriteRisknot set), pg-delta: schema apply never gives an object back to the default owner and re-plans the same REVOKE forever #631 (owner never returned, REVOKEs re-planned), pg-delta (Supabase profile): a new table in a user schema keeps grants from postgres's default privileges #629 and pg-delta: default privileges a role holds on its own objects are planned wrong; on Supabase every schema apply plans GRANT EXECUTE ON FUNCTIONS TO PUBLIC #630 Supabase (self-skip unlessPGDELTA_NEXT_SUPABASE_TESTS=1).table-ops--inherits-redeclared-column*scenarios.Harness changes (tests only)
RedPingainsmaxMajor(pg-delta: DROP NOT NULL on an inheritance parent also clears the child's own NOT NULL (PG < 18) #623 is red only below PG 18, pg-delta: on PostgreSQL 14, planning any ICU collation throws "expected a scalar, got null" #641 only on PG 14) andfailureaccepts aRegExp, so cycle pins name the actions in the cycle and pg-delta: a function that must be re-created is dropped while a generated column still calls it #636 accepts PG 14's silent drift or PG 15+'s error, each in full.KnownGapgainsmaxMajorandlayouts(pg-delta: a table whose row type a new column uses is altered after that column exists, and PostgreSQL refuses the ALTER #677's export form fails on by-object and ordered; grouped must pass).Findings worth knowing about
Verification
engine.test.ts) onpostgres:17-alpine: green (every pin red as recorded, nothing else broken).postgres:14-alpine,17-alpine,18-alpine. PG 15/16 are left to CI.export-roundtrip-corpus.test.tson PG 17 (full) and the pg-delta: on PostgreSQL 14, planning any ICU collation throws "expected a scalar, got null" #641 case on PG 14: green.PGDELTA_NEXT_SUPABASE_TESTS=1onsupabase/postgres:17.12.0.005: green.bun test src/,format-and-lint,check-types: green. knip green in a clean checkout.postgres:14-alpine,17-alpine,18-alpine; full export round-trip green on PG 14 and 17.e730e4f3/cf9589d3.Linked issue
Refs #615, #616, #617, #618, #619, #620, #621, #622, #623, #624, #625, #626, #627, #628, #629, #630, #631, #632, #633, #634, #635, #636, #637, #638, #639, #640, #641, #677, #678
Checklist
bun run format-and-lintandbun run check-typespass🤖 Generated with Claude Code