Skip to content

BE-M0-39 · Before the merge: every test, then the regenerated types on the branch

ID BE-M0-39 · Level L0 · Pack Pack G1 · The review's schema changes · Run order row 22b, first: before pack G1's pull request is merged · Issue #150

On pack G1's branch, every pgTAP test passes on your local stack (348 in 13 files), and packages/db-types holds the types generated from G1's schema, committed on the same branch so the schema and its types reach main in one squashed commit (D33). The Backend Engineer's workspace can't run the Supabase stack, so this one command is yours: the types are only ever written by pnpm db:types, never by hand (D22).

  • Pack G1's pull request is open and names #150. Its database job fails on "The generated files match the schema" until this step's commit lands; every other check is green.
  • You are in ~/opleet-v2/opleet, 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”
Terminal window
git fetch origin be/pack-g1
git switch be/pack-g1
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
Terminal window
pnpm typecheck

4 · Commit the generated files and push them to the branch

Section titled “4 · Commit the generated files and push them to the branch”
Terminal window
git add packages/db-types apps/docs/src/content/docs/reference
git commit -m "build(db-types): regenerate for pack G1 (D33)"
git push
Terminal window
pnpm db:e2e-users
  • Block 1: "Finished supabase db reset", then "All tests successful.", "Files=13, Tests=348" and "Result: PASS".
  • Block 2: M packages/db-types/src/database.ts. The reference pages were generated in the pull request from the same schema, so they should not change; if one does, it is listed too and goes into the same commit.
  • Block 3: no error. A change that only adds (a column, a table, a view, a function, an enum value) breaks nothing in apps/web.
  • Block 4: ✔️ biome and ✔️ commitlint, then the push.
  • Block 5: eleven lines starting with "kept" (or "made" after a fresh reset), then "11 logins in the E2E organization, all pools. .env.e2e updated (password not shown)."

The pull request's checks, after the push:

Terminal window
gh pr checks be/pack-g1

Every check passes, the database job included.

  • A test fails in block 1: paste the not ok line and the lines under it starting with # into #150, and don't merge.
  • Block 3 fails: paste the errors into the pull request. Under D33 the Frontend Engineer fixes the named pages on the same branch before you merge; the Backend Engineer doesn't change apps/web.
  • Block 2 lists something outside packages/db-types and the reference pages: stop, and paste git status --short.
  • "permission denied" or "must be owner" on auth.sessions in block 1: the migration can't end sessions on this stack (D37). Paste it; don't merge.

Before the push: git reset --hard origin/be/pack-g1. After it: tell the Backend Engineer on the pull request, who reverts the commit. Nothing here touches staging or production.

Log each run as a comment on #150: the date, block 1's last lines, block 2's git status --short and the commit's hash.