Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
6 Skipped Deployments
|
Contributor
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
The build-docs-002-rls-guide eval still fails only because agents skip pgTAP: they fetch a short best-practices extract of enable/syntax/roles and never reach tests. Put the CLI commands in that path, move Test before indexes, and expand the example to allow and deny all four operations. Co-authored-by: Miranda Limonczenko <[email protected]>
… copy Grants already pass this eval because they are copyable SQL in the enable-RLS extract. A separate Test section does not: the agent fetches a short best-practices summary of CREATE POLICY, auth.uid(), and public read, and never reaches later testing prose. Put the public-read test file next to the weather_readings grants, and the owner-private test file immediately after the four CREATE POLICY examples, so those extracts include supabase/tests/*.sql. Co-authored-by: Miranda Limonczenko <[email protected]>
czenko
force-pushed
the
cursor/rls-claim-verify-f756
branch
from
August 19, 2026 19:48
302d67c to
4f13de6
Compare
czenko
force-pushed
the
cursor/rls-eval-tests-f756
branch
from
August 19, 2026 19:48
673f80c to
8bca261
Compare
This was referenced Aug 19, 2026
Contributor
Author
czenko
added a commit
that referenced
this pull request
Aug 19, 2026
## Problem The guide alternated between context, procedure, and reference on almost every heading. A reader who wanted to write a policy passed through four context or reference sections to reach one. A reader who wanted the model had to skip three procedures. ## Solution - Group into three sections by information type: `Understand Row Level Security`, `Secure a table with RLS`, and `RLS reference`, with a navigation intro. - Merge the four policy sections. They repeated the same setup block, burying the clause that differed. One setup block now precedes four short policy examples. - Move the auto-enable recipe into `event-triggers.mdx`, whose stub section's entire body was a link back here. - Relocate the stranded `auth.uid()` caution into the `auth.uid()` reference. - Lift the revoke-and-grant procedure out of the danger admonition and merge it with the two other places that taught `enable row level security`. - Point the Grafana IO chart entry at the performance guide. Its `#rls-performance-recommendations` anchor went away when tuning split out in #49016. 765 lines to 582. 30 headings to 25. Headings are demoted rather than renamed wherever anything links to them. Every inbound anchor in the repo still resolves; the only one removed, `#auto-enable-rls-for-new-tables`, was referenced solely by the `event-triggers.mdx` stub this PR replaces. ## Note on the history Rebuilt from `master` after #49011, #49015, and #49016 merged. The branch previously carried those 10 commits plus rebase churn against them. Rebasing naively would have reverted review feedback from #49016 (`70fa812`), which removed the benchmarks table and the "This guide" opener from the performance guide. Those are deliberately not restored here. The only changes to that file are two missing `await`s and a join predicate that was a tautology while unqualified. The three PRs stacked on this one (#49268, #49269, #49270) have been rebased onto the new base. ## Manual testing 1. Open the [Row Level Security guide](https://docs-git-docs-rls-restructure-supabase.vercel.app/docs/guides/database/postgres/row-level-security) on the preview. Three top-level sections appear in the table of contents. 2. Select each link in the intro. All three jump to their section. 3. Open [Event triggers](https://docs-git-docs-rls-restructure-supabase.vercel.app/docs/guides/database/postgres/event-triggers). The auto-enable section holds the full recipe instead of a link. 4. Open the [performance guide](https://docs-git-docs-rls-restructure-supabase.vercel.app/docs/guides/database/postgres/row-level-security-performance). No benchmarks table, and the three bullets at the top link into the RLS guide. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Reworked the Row Level Security guide with clearer guidance on grants, policies, permissions, performance, testing, views, and secure functions. * Added a complete example for automatically enabling RLS on newly created public tables. * Improved SQL examples and clarified table references in RLS performance guidance. * Corrected grammar in the Grafana chart troubleshooting documentation. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Opus 5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I have read the CONTRIBUTING.md file.
YES
What kind of change does this PR introduce?
Docs update, stacked on #49269, which is stacked on #49268, which is stacked on #49017.
Review #49017, then #49268, then #49269, then this PR.
Stack (bottom → top):
#49017(docs/rls-restructure→master) →#49268(cursor/rls-accuracy-f756→docs/rls-restructure) →#49269(cursor/rls-claim-verify-f756→cursor/rls-accuracy-f756) → this PR (cursor/rls-eval-tests-f756→cursor/rls-claim-verify-f756).Local tracking is via
gh stack. Creating the GitHub Stack object failed here withResource not accessible by integration. To attach official GitHub Stack metadata:What is the current behavior?
The latest
build-docs-002-rls-guiderefresh (evals#215) still fails. Grants, policies, access probes, indexes, and security-definer helpers all pass. The only misses are the three pgTAP checks.That split is the signal. The guide already taught grants and already had a Test section. Grants are copyable SQL in the “enable RLS / public read” extract the agent actually fetches (
web_fetch, ~6907 characters). Tests were a later section plus “remember to write tests” prose. The extract query asked for enable RLS,CREATE POLICY,auth.uid(), indexes, wrapping, roles, security definer functions, ownership, and public read. It did not ask for tests. More testing instructions in a Test section do not enter that extract.The prompt never says test. Whether the agent writes pgTAP is the measurement.
What is the new behavior?
Stop adding testing prose. Put the test files in the examples the agent already copies.
weather_readingsnow has enable + revoke +grant select+using (true)and the matchingsupabase/tests/weather_readings_rls.test.sql(allow select / deny writes foranonandauthenticated).CREATE POLICYextract): the four policies are followed immediately bysupabase/tests/profiles_rls.test.sql(plan(12), allow and deny all four operations,returningon allowed writes,is_emptyonusing-filtered update/delete). A short note covers shared-member cases.-- File: supabase/tests/...is the first line of each test so the path survives if fence metadata is dropped.The eval still hits the published URL, so this cannot pass until the stack is on
master.Additional context
Does not name the eval’s membership tables. Does not encode “revoke
EXECUTEfromauthenticated.”