Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
This branch has not been deployed
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.
Closes DOCS-1655
Problem
Nothing measures whether the Postgres Changes guide leads an agent to changes that reach the right subscriber. A table added to the publication still sends a signed-in subscriber nothing when row level security has no read policy for them. The common workaround opens the table to everyone, so other people's rows leak.
Evidence:
Docs findings:
selecttoanon. It does not say that Realtime delivers only rows the subscriber's role can read, or that a signed-in user needs a read policy.The ticket's claim was "a table change reaches a subscriber". A bare delivery claim saturates, so the eval measures who gets the change and what it carries.
No existing eval subscribes.
investigate-realtime-001andbuild-realtime-001check publication membership with a query.Sources reached: Linear, Slack, GitHub, the troubleshooting article. Not reached: Hex, Supacademy.
Changes
Adds
build-docs-040-realtime-postgres-changes. A shop's order screen should update by itself, and the app version with the subscription code is already out, so the fix has to be on the database side. Customers must only see their own orders. The seed has the shipped client subscription, anorderstable with row level security and no read policy that is not in the publication, and a published public banner table as a control.The scorer signs up two customers and subscribes with the shipped subscription. It sends a banner change first and waits for it, so the first order change cannot be lost to warm-up. Then it writes orders with run-scoped markers.
Checks:
Expected signal: The guide's quick start copied onto
ordersfails the customer's insert, status change and old status checks, and leaks to the visitor. An adaptedto authenticated using (true)policy fails the other-customer check.What part of the guide this tests:
eqfilter onlyVerification
pnpm exec biome check evals/docs/build-docs-040-realtime-postgres-changespasses.pnpm --filter @supabase-evals/framework typecheckpasses.pnpm eval:dry -- --suite docs --eval build-docs-040-realtime-postgres-changesplans one pair oncodex-gpt-6-luna-no-skills.9f97c2d4: three runs ofcodex-gpt-6-luna-no-skills. One run passed all nine checks. One never addedordersto the publication, so the server refused the subscription and the six order checks failed. One failed only the visitor check, on empty events marked unauthorized after the agent revokedanon's access toorders. That was a scorer false red. Every run read the guide. Braintrust run.5824ac18: the leak checks count only events that carry row data, and note the empty unauthorized events they skip. A correct project withanonrevoked now passes locally, and ananonpolicy that exposes rows still fails.5824ac18: three runs. One run passed all nine checks. One never addedordersto the publication, so the server refused the subscription and the six order checks failed. One left out replica identity full, so the status change carried no earlier status and the filtered delete never arrived. Both failures are agent gaps the checks are built to catch. Every run read the guide. Braintrust run.For new or changed evals (see Submitting evals for review):
run-evals-changedlabel or the Refresh eval results workflow (suite: regressionfor framework changes), and linked the Braintrust run here.