Repository navigation
chore(postgres-rls): close out the project — promote ADRs, delete project artifacts - #979
Conversation
|
Warning Review limit reached
Next review available in: 30 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (64)
📒 Files selected for processing (6)
📝 WalkthroughWalkthroughThe PR adds ADRs for recursive schema diffing and target-contributed model attributes, updates content-addressed Postgres RLS naming and verification semantics, and aligns subsystem and Supabase documentation with the documented RLS authoring model. ChangesPostgres RLS architecture
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
cf39b6d to
6044fac
Compare
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/architecture` docs/adrs/ADR 234 - Content-addressed wire names for
Postgres-normalized objects.md:
- Around line 109-113: Update the verifier semantics in the “rename”, “missing”,
and “extra” outcomes and the clarification around canonical-body comparison to
be consistently name-only: remove the claim that out-of-band policy body edits
produce extra/missing results, remove the canonical-body comparison fallback,
and state that body edits with unchanged policy names are intentionally
undetectable unless a separate supported detection mechanism is defined.
In `@packages/3-extensions/supabase/README.md`:
- Line 63: Remove all remaining postgres-rls references from the Supabase
README, including the PostgresRole/session-GUC references and the downstream
constituent entry. Replace them with stable package or canonical ADR/subsystem
documentation links where needed, or remove obsolete entries entirely.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yml
Review profile: CHILL
Plan: Pro
Run ID: 59b75ef1-c429-4d0c-88d9-1d08a52d148e
⛔ Files ignored due to path filters (64)
projects/postgres-rls/HANDOFF.mdis excluded by!projects/**projects/postgres-rls/plan.mdis excluded by!projects/**projects/postgres-rls/slices/differ-kind-keying/plan.mdis excluded by!projects/**projects/postgres-rls/slices/differ-kind-keying/spec.mdis excluded by!projects/**projects/postgres-rls/slices/entity-kind-migration-seam/spec-r4-table-node.mdis excluded by!projects/**projects/postgres-rls/slices/entity-kind-migration-seam/spec-r5-build-tree-at-derivation.mdis excluded by!projects/**projects/postgres-rls/slices/entity-kind-migration-seam/spec-r6-tables-are-the-nodes.mdis excluded by!projects/**projects/postgres-rls/slices/entity-kind-migration-seam/spec.mdis excluded by!projects/**projects/postgres-rls/slices/explicit-rls-control/plan.mdis excluded by!projects/**projects/postgres-rls/slices/explicit-rls-control/spec.mdis excluded by!projects/**projects/postgres-rls/slices/foundation/dispatches/01-ir-kinds.mdis excluded by!projects/**projects/postgres-rls/slices/foundation/dispatches/02-canonicalize.mdis excluded by!projects/**projects/postgres-rls/slices/foundation/dispatches/02-canonicalize.r2.mdis excluded by!projects/**projects/postgres-rls/slices/foundation/dispatches/03-serializer.mdis excluded by!projects/**projects/postgres-rls/slices/foundation/dispatches/04-schema-issue-union.mdis excluded by!projects/**projects/postgres-rls/slices/foundation/dispatches/04-schema-issue-union.r2.mdis excluded by!projects/**projects/postgres-rls/slices/foundation/plan.mdis excluded by!projects/**projects/postgres-rls/slices/foundation/spec.mdis excluded by!projects/**projects/postgres-rls/slices/one-differ-two-ir-planner/design-codec-render-via-registry.mdis excluded by!projects/**projects/postgres-rls/slices/one-differ-two-ir-planner/plan.mdis excluded by!projects/**projects/postgres-rls/slices/one-differ-two-ir-planner/spec.mdis excluded by!projects/**projects/postgres-rls/slices/rls-policy-operations-and-roles/plan.mdis excluded by!projects/**projects/postgres-rls/slices/rls-policy-operations-and-roles/spec.mdis excluded by!projects/**projects/postgres-rls/slices/rls-ts-authoring/plan.mdis excluded by!projects/**projects/postgres-rls/slices/rls-ts-authoring/spec.mdis excluded by!projects/**projects/postgres-rls/slices/rls-walking-skeleton/dispatches/01-un-leak.mdis excluded by!projects/**projects/postgres-rls/slices/rls-walking-skeleton/dispatches/02-generic-differ.mdis excluded by!projects/**projects/postgres-rls/slices/rls-walking-skeleton/dispatches/03-introspection.mdis excluded by!projects/**projects/postgres-rls/slices/rls-walking-skeleton/dispatches/04-psl-authoring.mdis excluded by!projects/**projects/postgres-rls/slices/rls-walking-skeleton/dispatches/05-rls-ops.mdis excluded by!projects/**projects/postgres-rls/slices/rls-walking-skeleton/dispatches/06-planner-wiring.mdis excluded by!projects/**projects/postgres-rls/slices/rls-walking-skeleton/dispatches/07-verify-channel.mdis excluded by!projects/**projects/postgres-rls/slices/rls-walking-skeleton/dispatches/08-skeleton-test.mdis excluded by!projects/**projects/postgres-rls/slices/rls-walking-skeleton/dispatches/08-skeleton-test.r2.mdis excluded by!projects/**projects/postgres-rls/slices/rls-walking-skeleton/dispatches/09-psl-e2e.mdis excluded by!projects/**projects/postgres-rls/slices/rls-walking-skeleton/dispatches/10-psl-interpreter-lowering.mdis excluded by!projects/**projects/postgres-rls/slices/rls-walking-skeleton/dispatches/11-e2e-repoint.mdis excluded by!projects/**projects/postgres-rls/slices/rls-walking-skeleton/dispatches/12-f01-build-fix.mdis excluded by!projects/**projects/postgres-rls/slices/rls-walking-skeleton/dispatches/13-drift-fails-verify.mdis excluded by!projects/**projects/postgres-rls/slices/rls-walking-skeleton/dispatches/14-drop-policy-op.mdis excluded by!projects/**projects/postgres-rls/slices/rls-walking-skeleton/dispatches/15-planner-replace.mdis excluded by!projects/**projects/postgres-rls/slices/rls-walking-skeleton/dispatches/16-lifecycle-e2e.mdis excluded by!projects/**projects/postgres-rls/slices/rls-walking-skeleton/dispatches/17-orphan-detection.mdis excluded by!projects/**projects/postgres-rls/slices/rls-walking-skeleton/dispatches/18-example-setup.mdis excluded by!projects/**projects/postgres-rls/slices/rls-walking-skeleton/dispatches/18-example-setup.r2.mdis excluded by!projects/**projects/postgres-rls/slices/rls-walking-skeleton/dispatches/19-example-behavioral-e2e.mdis excluded by!projects/**projects/postgres-rls/slices/rls-walking-skeleton/dispatches/20-hardening-antileak.mdis excluded by!projects/**projects/postgres-rls/slices/rls-walking-skeleton/plan.mdis excluded by!projects/**projects/postgres-rls/slices/rls-walking-skeleton/spec.mdis excluded by!projects/**projects/postgres-rls/slices/schema-node-tree-restructure/design-diff-and-verify.mdis excluded by!projects/**projects/postgres-rls/slices/schema-node-tree-restructure/design.mdis excluded by!projects/**projects/postgres-rls/slices/schema-node-tree-restructure/spec.mdis excluded by!projects/**projects/postgres-rls/slices/unify-unique-and-index-nodes/code-review.mdis excluded by!projects/**projects/postgres-rls/slices/unify-unique-and-index-nodes/design.mdis excluded by!projects/**projects/postgres-rls/slices/unify-unique-and-index-nodes/plan.mdis excluded by!projects/**projects/postgres-rls/slices/unify-unique-and-index-nodes/spec.mdis excluded by!projects/**projects/postgres-rls/spec.mdis excluded by!projects/**projects/postgres-rls/specs/adr-schema-diff-over-structured-ir.mdis excluded by!projects/**projects/postgres-rls/specs/brief-open-entries-refactor.mdis excluded by!projects/**projects/postgres-rls/specs/design-generic-schema-differ.mdis excluded by!projects/**projects/postgres-rls/specs/design-rls-authoring-surface.mdis excluded by!projects/**projects/postgres-rls/specs/extension-migration-participation.mdis excluded by!projects/**projects/postgres-rls/specs/reconciliation-2026-06-08.mdis excluded by!projects/**projects/postgres-rls/trace.jsonlis excluded by!projects/**
📒 Files selected for processing (5)
docs/architecture docs/adrs/ADR 234 - Content-addressed wire names for Postgres-normalized objects.mddocs/architecture docs/adrs/ADR 235 - The schema differ walks two derived schema IRs.mddocs/architecture docs/adrs/ADR 236 - Target-contributed model attributes.mddocs/architecture docs/subsystems/5. Adapters & Targets.mdpackages/3-extensions/supabase/README.md
6044fac to
962b961
Compare
size-limit report 📦
|
@prisma-next/extension-author-tools
@prisma-next/mongo-runtime
@prisma-next/family-mongo
@prisma-next/sql-runtime
@prisma-next/family-sql
@prisma-next/extension-arktype-json
@prisma-next/middleware-cache
@prisma-next/mongo
@prisma-next/extension-paradedb
@prisma-next/extension-pgvector
@prisma-next/extension-postgis
@prisma-next/postgres
@prisma-next/sql-orm-client
@prisma-next/sqlite
@prisma-next/extension-supabase
@prisma-next/target-mongo
@prisma-next/adapter-mongo
@prisma-next/driver-mongo
@prisma-next/contract
@prisma-next/utils
@prisma-next/config
@prisma-next/errors
@prisma-next/framework-components
@prisma-next/operations
@prisma-next/ts-render
@prisma-next/contract-authoring
@prisma-next/ids
@prisma-next/psl-parser
@prisma-next/psl-printer
@prisma-next/cli
@prisma-next/cli-telemetry
@prisma-next/config-loader
@prisma-next/emitter
@prisma-next/language-server
@prisma-next/migration-tools
prisma-next
@prisma-next/vite-plugin-contract-emit
@prisma-next/mongo-codec
@prisma-next/mongo-contract
@prisma-next/mongo-value
@prisma-next/mongo-contract-psl
@prisma-next/mongo-contract-ts
@prisma-next/mongo-emitter
@prisma-next/mongo-schema-ir
@prisma-next/mongo-query-ast
@prisma-next/mongo-orm
@prisma-next/mongo-query-builder
@prisma-next/mongo-lowering
@prisma-next/mongo-wire
@prisma-next/sql-contract
@prisma-next/sql-errors
@prisma-next/sql-operations
@prisma-next/sql-schema-ir
@prisma-next/sql-contract-psl
@prisma-next/sql-contract-ts
@prisma-next/sql-contract-emitter
@prisma-next/sql-lane-query-builder
@prisma-next/sql-relational-core
@prisma-next/sql-builder
@prisma-next/target-postgres
@prisma-next/target-sqlite
@prisma-next/adapter-postgres
@prisma-next/adapter-sqlite
@prisma-next/driver-postgres
@prisma-next/driver-sqlite
commit: |
… Targets Migrate the two accepted project ADRs out of projects/postgres-rls/specs/ as ADR 234 (content-addressed wire names) and ADR 235 (schema differ over two derived IRs), rewritten for a reader without project context: each leads with the decision, grounds it in a worked example before the abstractions, matches the shipped surfaces and differ vocabulary, and ends with alternatives. Author ADR 236 for the two authoring SPIs (AuthoringContributions.modelAttributes, AuthoringPslBlockDescriptor.requiresModelAttribute) per the project DoD. Add the RLS section to the Adapters & Targets subsystem doc. Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
The only repo reference into projects/postgres-rls/ pointed at the project
spec and described the pre-decision authoring surface (.rls builder,
policy {} blocks); point it at ADR 234 + the subsystem RLS section and name
the shipped surfaces. The packages/3-extensions/ touch is declared as an
incidental docs-only diff in the 0.14-to-0.15 upgrade instructions.
Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
All eight slices merged (final: TS RLS authoring, #959); long-lived docs promoted to docs/ in the preceding commits. Per the projects/ lifecycle, transient project artifacts (spec, plan, handoff, slice specs/plans, dispatches, trace) delete with the project. Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
962b961 to
2bc171f
Compare
…ntity Slice-0 reality check: postgres-rls 2.6 merged as #947 keeping SqlUniqueIR and SqlIndexIR as two structural nodes, rejecting the merged-node-with-flag shape this spec assumed. Operator confirmed the two-node substrate is the principled one (discrete-entities: an index must not claim to also be a constraint; ADR 161 superseding note, Data Contract design principle 4). Amendments: name identity covers index nodes and policies only; unique constraints keep tuple identity (fully structured, content comparison is already exact). @@unique/constraints.unique surfaces unchanged; the @@unique default wire-prefix is dropped. TS policy exact-naming is out of scope (rls-ts-authoring was never built; postgres-rls closed in #979). Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
…ntity Slice-0 reality check: postgres-rls 2.6 merged as #947 keeping SqlUniqueIR and SqlIndexIR as two structural nodes, rejecting the merged-node-with-flag shape this spec assumed. Operator confirmed the two-node substrate is the principled one (discrete-entities: an index must not claim to also be a constraint; ADR 161 superseding note, Data Contract design principle 4). Amendments: name identity covers index nodes and policies only; unique constraints keep tuple identity (fully structured, content comparison is already exact). @@unique/constraints.unique surfaces unchanged; the @@unique default wire-prefix is dropped. TS policy exact-naming is out of scope (rls-ts-authoring was never built; postgres-rls closed in #979). Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
Linked issue
Refs TML-2501 — close-out of the Postgres RLS Linear project (now Completed).
At a glance
All eight postgres-rls slices are merged (final: #959, TS RLS authoring). Per the
projects/lifecycle, this PR performs the close-out: promote the long-lived docs intodocs/, strip the one repo reference into the project directory, and deleteprojects/postgres-rls/.Three commits, in lifecycle order:
projects/postgres-rls/re-pointed at ADR 234 + the subsystem section (it also named the pre-decision.rls(...)surface; now names the shipped one).projects/postgres-rls/(spec, plan, handoff, slice specs/plans, dispatches, trace).Project DoD verification
ts-psl-rls-parity.test.ts, byte-identical parity fixture,rls-helper-invisibility.test.tsref()predicate helperALTER POLICY … RENAME TO/ enable)@@rls, grading)pg_rolesfails verify even undercontrol: 'external'examples/supabase/test/skeleton.integration.test.tscase Gexamples/supabaseProfile policies filter rows underSET ROLE, verifier diffs cleanrls-ts-walking-skeleton.integration.test.ts)lint:deps+lint:framework-vocabularygreen on every slice; structural invariant testdocs/architecture docs/adrs/; adapter subsystem doc gains an RLS section5. Adapters & Targets.mdmodelAttributes,requiresModelAttribute)Final retro (mandatory at close)
docs/onboarding/fixtures-emit-and-check.md(fixtures:check does not cover planner ops); the per-factory PSL validation gaps became TML-3023 instead of a fourth patch.Classification (audit trail)
specs/adr-content-addressed-policy-names.md→ ADR 234 (authoring examples updated from the rejected.rls([...])surface to the shippedpolicyUpdate(...)/policy_updateforms);specs/adr-schema-diff-over-structured-ir.md→ ADR 235 (differ vocabulary updated to the shippednot-found | not-expected | not-equalreasons, property-formDiffableNode, the real node tree with roles on the database root; superseded "table nodes are groupers only" section dropped).spec.md,plan.md,HANDOFF.md,trace.jsonl,slices/**(per-slice specs/plans/dispatches), and the remainingspecs/*shaping docs (design-*,brief-*,reconciliation-*,extension-migration-participation.md) — shaping/coordination artifacts whose surviving content is the shipped state and the promoted ADRs.Reference strip
One external reference existed (
packages/3-extensions/supabase/README.md); re-pointed. Post-delete rescan of tracked files forprojects/postgres-rlsis empty.Checklist
🤖 Generated with Claude Code
Summary by CodeRabbit