Repository navigation
fix(test): isolate PostgreSQL upgrade schema ownership checks - #206391
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: passed. What this changesThis PR scopes the PostgreSQL upgrade test’s schema inventory to its unique fixture role. Example: Another test creates an unrelated schema during PostgreSQL 16.15 upgrade preflight coverage.
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this PR makes a focused correction to a source-verifiable conformance-test isolation bug, with no actionable defects found. Reviewed head: Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe conformance test invokes the production PostgreSQL upgrade preflight with a restricted connection, then checks its grant diagnostic and absence of leaked schemas. flowchart LR
A[Unique fixture role] --> B[Restricted connection]
B --> C[Production upgrade preflight]
C --> D[Missing CREATE diagnostic]
A --> E[Owned schema inventory]
E --> F[Original schema assertion]
Technical reviewBest possible solution: Use the fixture role’s complete schema inventory to preserve leak detection without observing unrelated tests. Do we have a high-confidence way to reproduce the issue? The original query observes unrelated concurrent schema creation; the body reports this PostgreSQL 16.15 experiment and a fixture-owned positive control, but I did not execute a reproduction. Is this the best way to solve the issue? The existing unique role supplies the correct isolation boundary, and exact equality still detects any extra owned schema without relying on naming conventions. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 0362c5b16eac. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceTests +1. Total +1 across 1 file. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 27, 2026, 12:08 AM ET / 05:08 UTC. |
|
Merged via squash auto-merge.
|
What Problem This Solves
The PostgreSQL upgrade conformance test counted every schema in its shared test database. A concurrent Talk test created two schemas between snapshots, making a correct missing-permission refusal fail. Failed conformance shard
User Impact
Contributors can run upgrade and Talk coverage together and still detect leaked upgrade schemas. The change only affects the test.
Why This Change Was Made
Each run creates a unique restricted role that owns the original schema. PostgreSQL also assigns any backup created through that connection to that role. Assert that its complete inventory after rejection consists of the original schema. This catches additional schemas regardless of their names and preserves the exact database and role in the expected grant hint.
Evidence