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-1657
Problem
Nothing measures whether the Broadcast guide leads an agent to messages that reach a room's members and nobody else. A database sends to a private channel that has no read policy, and the client never receives it. The common fix is a
using (true)policy, which lets every signed-in user join every room.Evidence:
realtime.send()broadcasts were never delivered locally. The cause was a private channel with no policy onrealtime.messagesand a missingsetAuth. The maintainer's reply used ausing (true)policy.CHANNEL_ERRORon private channels, sends that are queued but never delivered, and aprivateflag that sends to the public topic.privateflag.realtime.sendsignature.using (true)lets users connect to any channel, so a per-topic check is needed. #team-realtime threads add that a private join needs a read policy that includes the broadcast extension.The ticket's claim was "a broadcast message reaches subscribers". The evidence points at who is allowed to receive and send, so the eval measures delivery plus that boundary.
No existing eval covers Broadcast.
build-docs-040, in review, covers Postgres Changes, a separate claim.Sources reached: Linear, Slack, supabase/supabase, supabase/realtime and agent-skills issues. Not reached: Hex, Supacademy.
Changes
Adds
build-docs-042-realtime-broadcast. A team chat shows new messages only on reload. The prompt asks for messages to appear live for everyone in the room, from the web app, the mobile app and the support inbox. Nobody outside a room may see its messages or slip one in, even by talking to Supabase directly. The seed fixeswatchRoominsrc/live.jsandpostMessageinsrc/messages.js. Its tables and membership helper already keep non-members out of the rows, so the eval measures only the live path.The scorer installs the seed's locked dependencies with
npm ci, plus its own pinned client outside the workspace. It sends a database test message first and waits for it. Then it calls the agent'swatchRoomwith signed-in clients, posts through all three sources with run-scoped bodies, and has an outsider and a visitor listen and forge on every topic the member joined.Checks:
watchRoom.Expected signal: The page's own pieces together are a database trigger, a
using (true)policy and a listener with noprivate: true. They fail the member checks, the outsider check and the forgery check. Addingprivate: truestill fails the outsider check. A Postgres Changes route also passes, because the eval scores the outcome. The member notes record which route each run took.What part of the guide this tests:
watchRoomself,ackpostMessagehttpSendVerification
pnpm exec biome check evals/docs/build-docs-042-realtime-broadcastpasses.pnpm --filter @supabase-evals/framework typecheckpasses.pnpm eval:dry -- --suite docs --eval build-docs-042-realtime-broadcastplans one pair oncodex-gpt-6-luna-no-skills.24a9a530: three runs ofcodex-gpt-6-luna-no-skills. One run passed all ten checks, delivered by broadcast. Two runs turned public channels off on the local Realtime tenant, a stricter and reasonable choice. The scorer's warm-up message went to a public topic, so it never arrived and six checks failed as could-not-measure. Both agents also ran out of time. Every run read the guide. Braintrust run.053160d5: the warm-up message and the forgery control use a private run-scoped topic and a service-role listener. A refused public join counts as no leak and no forgery. A correct project with public channels off passes locally, and the page's pieces still fail.053160d5: three runs. All three passed all ten checks, delivered by broadcast, including the guide read. A full-marks pass does not show the page carried the run. 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.