Skip to content

feat: promote build-rls-003-org-roles-permissions to benchmark suite - #162

Open
mattrossman wants to merge 11 commits into
mainfrom
mattrossman/ai-1006-promote-build-rls-003-org-roles-permissions
Open

feat: promote build-rls-003-org-roles-permissions to benchmark suite#162
mattrossman wants to merge 11 commits into
mainfrom
mattrossman/ai-1006-promote-build-rls-003-org-roles-permissions

Conversation

@mattrossman

@mattrossman mattrossman commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Promotes build-rls-003-org-roles-permissions to the benchmark suite and tweaks its prompt / scoring.

Originally this scenario also tested the soft-delete and audit log implementation pattern, for which I found motivations FDBKIN-8277 and FDBKIN-9175 respectively, however I removed these from the scenario to keep the focus on RLS.

Other changes:

  • Added motivation
  • Simplified prompt
  • Seeded a leftover "Enable read access for all users" policy similar to Studio's default template so agents have to fix the existing security hole
  • Added a few more checks to try hardening the scenario e.g. no cross-org member roster visibility, no cross-org role privilege escalation

Agents already pass this across the board, which is against our typical criteria for adding benchmarks, but maybe we're okay with that here.

CleanShot 2026-08-04 at 09 28 59@2x

Preview: https://evals-git-mattrossman-ai-1006-promote-build-rls-47a093-supabase.vercel.app/?group=eval&sheet=eval&item=build-rls-003-org-roles-permissions

Closes AI-1006

@vercel

vercel Bot commented Aug 3, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
evals Ignored Ignored Preview Aug 4, 2026 3:39pm

Request Review

@mattrossman mattrossman added the run-evals-changed Add to a PR to refresh only the benchmark evals that have had changes label Aug 3, 2026
Drops soft-delete and audit-log requirements. They weren't part of
the actual motivation for promoting this scenario (org/role RLS
complexity), and every scorer bug we hit lived in that bolted-on
logic.
…d-rls-003-org-roles-permissions' into mattrossman/ai-1006-promote-build-rls-003-org-roles-permissions
mattrossman and others added 2 commits August 4, 2026 10:33
Matches the checkX(ctx) pattern used elsewhere in the repo instead of
imperative checks.push() calls. Also normalizes ctx.query into a
non-throwing runAsUser helper so an RLS-blocked write (a real Postgres
error) is a value each check judges, not an exception that silently
aborts every check after it.
Seeds a user who's a viewer in org A and admin in org B, then checks
that their org-B admin role doesn't leak into org A. Every seeded user
previously belonged to exactly one org, so a policy that checked role
without joining on org_id would have passed undetected. All tested
benchmark agents still pass, but it's real coverage for a common
multi-tenant RLS mistake.
Fixed a stale "active documents" reference left over from the removed
soft-delete concept, and swapped an unverified PostgREST claim for a
cited Supabase testing-guide reference.
@mattrossman mattrossman removed the run-evals-changed Add to a PR to refresh only the benchmark evals that have had changes label Aug 4, 2026
Removes check comments that just restated their function name, merges
asUser into runAsUser since the split had no independent caller, and
clarifies the multi-org role-leak comment to name the memberships
table explicitly.
@mattrossman
mattrossman marked this pull request as ready for review August 4, 2026 15:39
@mattrossman
mattrossman requested a review from a team August 4, 2026 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant