BE-DP-28 · Before the merge: the access step's tests, then the generated files
ID BE-DP-28 · Level L0 · Pack Row 5 · The domain steps · Run order row 5, before the access step's pull request is merged · Issue #278
On the access step's branch, every pgTAP test passes on your Mac's local stack, the access step's 26 included, and the generated files match its schema (D33). The step changes the migration schema and the body of app.end_sessions_on_access_change(), so pnpm db:types and pnpm docs:reference should change nothing; this step proves it. The Backend Engineer's workspace can't pull the stack's images, so the commands are yours to run; no generated file is ever written by hand (D22).
Before
Section titled “Before”- The access step's pull request is open on the branch
be/278-access-stepand names #278. Its tests cite R-ACC-73 to R-ACC-76, which DOC writes from #287; until those rules are on main or the branch, its rules check fails on those four IDs only. - No other schema pull request has merged since the branch was last rebased onto main; if one has, say so on the pull request and the Backend Engineer rebases first (one schema pull request merges at a time).
- You are at the root of your clone, the local stack is running, and
git status --shortprints nothing.
1 · The branch, rebuilt from nothing, and every test
Section titled “1 · The branch, rebuilt from nothing, and every test”The migration files were edited in place (D11), so the database is rebuilt, never migrated.
git fetch origin be/278-access-stepgit switch be/278-access-steppnpm supabase db resetpnpm supabase test db2 · The types and the reference pages from this schema
Section titled “2 · The types and the reference pages from this schema”pnpm db:typespnpm docs:referencegit status --short3 · If block 2 listed a file: commit it to the branch
Section titled “3 · If block 2 listed a file: commit it to the branch”Skip this block when block 2 printed nothing.
git add packages/db-types apps/docs/src/content/docs/referencegit commit -m "build(db-types): regenerate for the access step (D33, #278)"git pushExpect
Section titled “Expect”- Block 1: "Finished supabase db reset", then
All tests successful.andResult: PASS. The access step's tests are the 26 in51_migration_access.test.sql, whose descriptions startR-ACC-58,R-ACC-71,R-ACC-73toR-ACC-76,R-APP-05,R-AUD-15andR-MIG-02orR-MIG-04. The 18 in41_access_changes.test.sqlstill pass: an access change made outside the migration still ends the member's sessions. - Block 2: nothing.
- Block 3: skipped.
gh pr checks be/278-access-stepEvery check passes once DOC's R-ACC-73 to R-ACC-76 are on main or the branch.
If it fails
Section titled “If it fails”- A test fails in block 1: paste the
not okline and the lines under it that start with#into #278. The test's description starts with the rule it proves. Don't edit the test, and don't merge. column "…" of relation "users" does not exist: the local Auth's columns differ from what the step writes. Paste the line into #278; it names a column, never a value.- Block 2 lists a file: commit it with block 3, and say on the pull request which file; the Backend Engineer checks why.
Before the push: git reset --hard origin/be/278-access-step. After it: say so on the pull request, and the Backend Engineer reverts the commit. git switch main and pnpm supabase db reset put your local database back on main's schema. Nothing here touches staging or production.
Log each run as a comment on #278: date · who · result · notes, with block 1's last lines and what block 2 printed.