Repository navigation
feat(evals): move RLS test checks into an RLS testing guide eval - #454
Conversation
build-docs-002-rls-guide no longer scores pgTAP tests. build-docs-014-rls-testing-guide points at the RLS testing guide and carries those checks against a seed whose policies already exist.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
The scorer checks the seeded policies are unchanged, then opens reads on todos and list_items with an added permissive policy and requires the agent's suite to fail.
…d of time The persona can't reply, so the prompt takes the rules the migrations enforce as agreed.
Runs against the docs preview
Run 1: the persona could still be asked questionsRun 40566907337. In all three runs, the agent read the guide, wrote out the access rules for the six tables, and stopped to ask for confirmation. No tests were written, so every check after "the seeded policies and helper functions are unchanged" failed. The two opened-read checks reported "could not measure". The persona now says they're offline, and takes the rules the migrations enforce as agreed (bc6b1dd). Run 2: the persona can't replyRun 40590435040, against the current guide on the preview.
|
Closes DOCS-1558
supabase/supabase#52344 must merge first.
Problem
build-docs-002-rls-guidescores pgTAP tests, but its prompt points at the Row Level Security guide. Testing has its own guide now, so the RLS guide eval measures something its page doesn't own.Solution
build-docs-002-rls-guide: removes the three pgTAP checks and the README section about tests. The eval now scores policies, grants, access probes, and the guide read.build-docs-014-rls-testing-guide: a new eval that points at the RLS testing guide. It carries the three pgTAP checks, plus a check that the agent read the guide.build-docs-002-rls-guide, with working policies already in place. The weather tables start with rows in them.todosand onlist_itemswith an addedusing (true)policy, and require the agent's suite to fail. A passing suite that can't catch a broken policy doesn't protect it.flakiness.md: two entries. A passing suite isn't proof it can fail, and the scorer's own rows red a correct suite inbuild-docs-002-rls-guide.The new eval points at
/docs/guides/database/postgres/testing-row-level-security, which supabase/supabase#52344 adds. It can't score until that PR merges.Note: This change is great news for RLS. A new round of iteration has made the testing checks much more likely to pass.
Manual testing
pnpm typecheckandpnpm format:checkpass.pnpm eval:dryplans both evals.build-docs-014-rls-testing-guidemigration applies on a local stack.