BE-DP-10 · Staging rebuilt with explicit grants, and what each role holds there
ID BE-DP-10 · Level L0 · Pack Pack G3 · Explicit grants · Run order row 0f, after the pull request for #247 is merged · Issue #247
Staging is rebuilt from main with the explicit grants, and on staging authenticated and service_role hold every public table and view while anon holds none (R-ACC-72, R-ACC-02). From then on, Supabase's change on 2026-10-30 changes nothing for us: no table relies on a default grant.
Until this step is logged, don't rebuild staging after 2026-10-30. A rebuild from a main without #247 would leave every table ungranted, and apps/web and the E2E logins script would fail with 42501.
Before
Section titled “Before”- BE-DP-09 is logged clean on #247, and its pull request is merged into main.
1 · Rebuild staging from main
Section titled “1 · Rebuild staging from main”Run BE-M0-33 as it is written. It wipes staging and is never run against production. Log that run on #22 as usual.
2 · What each role holds on staging
Section titled “2 · What each role holds on staging”In staging's SQL editor (the staging project's Dashboard, SQL Editor, a new query). It reads the catalog only:
select grantee, count(distinct table_name) as tablesfrom information_schema.role_table_grantswhere table_schema = 'public' and grantee in ('anon', 'authenticated', 'service_role')group by grantee order by grantee;Expect
Section titled “Expect”- Block 1: BE-M0-33's own Expect, its E2E logins included.
- Block 2: two rows,
authenticated | 75andservice_role | 76, and noanonrow. The same as BE-DP-09's block 2 on your Mac.
BE-M0-33's E2E sign-in check passes on staging: a login reads its own profile through the API, which needs the grant on profiles.
If it fails
Section titled “If it fails”- Block 2 shows fewer tables, or an
anonrow: paste the result into #247 and stop rebuilding staging until BE replies. - BE-M0-33's E2E logins fail with
42501: paste the line into #247. The table it names is missing its grant.
Not reversible: BE-M0-33 wipes staging. Rebuilding it again from main is the way back.
Log each run as a comment on #247: the date, BE-M0-33's run on #22, and block 2's rows.