Skip to content

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.

  • BE-DP-09 is logged clean on #247, and its pull request is merged into 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.

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 tables
from information_schema.role_table_grants
where table_schema = 'public' and grantee in ('anon', 'authenticated', 'service_role')
group by grantee order by grantee;
  • Block 1: BE-M0-33's own Expect, its E2E logins included.
  • Block 2: two rows, authenticated | 75 and service_role | 76, and no anon row. 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.

  • Block 2 shows fewer tables, or an anon row: 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.