Skip to content

BE-DP-22 · Before the merge: the photo copy's tests, then the generated files

ID BE-DP-22 · Level L0 · Pack Pack R6 · The photo copy · Run order row 6, before pack R6's pull request is merged · Issue #262

On pack R6's branch, every pgTAP test passes on your Mac's local stack, the photo copy's 24 included, and the generated files match its schema (D33). The pack changes only the migration schema and adds the private bucket v1-hold, so pnpm db:types should change nothing; this step proves it. The Backend Engineer's workspace can't run the Supabase stack, so the commands are yours to run; no generated file is ever written by hand (D22).

  • Pack R6's pull request is open on the branch be/262-photo-copy and names #262. Its tests cite R-STO-23, which DOC writes on the rules issue the pull request names; until DOC's page is on the branch, its rules check fails on that ID 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 --short prints 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.

Terminal window
git fetch origin be/262-photo-copy
git switch be/262-photo-copy
pnpm supabase db reset
pnpm supabase test db

2 · The types and the reference pages from this schema

Section titled “2 · The types and the reference pages from this schema”
Terminal window
pnpm db:types
pnpm docs:reference
git status --short

3 · 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.

Terminal window
git add packages/db-types apps/docs/src/content/docs/reference
git commit -m "build(db-types): regenerate for the photo copy (D33, #262)"
git push
  • Block 1: "Finished supabase db reset", then All tests successful. and Result: PASS. The photo copy's tests are the 24 in 49_photo_copy.test.sql, whose descriptions start R-MIG-07, R-STO-10, R-STO-13, R-STO-14, R-STO-20, R-STO-22, R-STO-23 and R-ASR-11. If #286 (pack 0e) merged first, its 17 tests in 48_repo_requests.test.sql are there too.
  • Block 2: most likely nothing. A reference page that lists Storage buckets may gain v1-hold; that's expected, and block 3 commits it.
  • Block 3: ✔️ biome and ✔️ commitlint, then the push.
Terminal window
gh pr checks be/262-photo-copy

Every check passes once DOC's R-STO-23 is on the branch.

  • A test fails in block 1: paste the not ok line and the lines under it that start with # into #262. The test's description starts with the rule it proves. Don't edit the test, and don't merge.
  • Block 2 lists something outside packages/db-types and the reference pages: stop, and paste git status --short into #262.

Before the push: git reset --hard origin/be/262-photo-copy. 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 #262: date · who · result · notes, with block 1's last lines and what block 2 printed.