Skip to content

BE-DP-02 · Before the merge: every test, then the generated files on pack G2's branch

ID BE-DP-02 · Level L0 · Pack Pack G2 · The schema the data phase maps v1 onto · Run order row 0a, after BE-DP-01 and before pack G2's pull request is merged · Issue #162

On pack G2's branch, every pgTAP test passes on your Mac's local stack (394 in 15 files), and the generated files match G2's schema: packages/db-types and the reference pages are already on the branch, regenerated by pnpm db:types and pnpm docs:reference in the Backend Engineer's workspace (D33), and this step proves your stack writes the same. The types are only ever written by pnpm db:types, never by hand (D22).

  • BE-DP-01's output is on #162.
  • Pack G2's pull request is open on the branch claude/be-pack-g2-cjja5a, names #162, and its checks are green.
  • You are in ~/opleet-v2/opleet, and git status --short prints nothing.

1 · The branch, with the stack restarted for its new auth settings

Section titled “1 · The branch, with the stack restarted for its new auth settings”

Pack G2 changes supabase/config.toml (D51), which the stack reads only when it starts. The migration files were edited in place (D11), so the database is rebuilt, never migrated.

Terminal window
git fetch origin claude/be-pack-g2-cjja5a
git switch claude/be-pack-g2-cjja5a
pnpm supabase stop
pnpm supabase start
pnpm supabase db reset
Terminal window
pnpm supabase test db

3 · The types and the reference pages from this schema

Section titled “3 · The types and the reference pages from this schema”
Terminal window
pnpm db:types
pnpm docs:reference
git status --short
Terminal window
pnpm typecheck
  • Block 1: "Started supabase local development setup", then "Finished supabase db reset".
  • Block 2: All tests successful., Files=15, Tests=394 and Result: PASS. Pack G2's tests are the 27 in 42_data_phase_schema.test.sql, whose descriptions start R-RNT-07 to R-RNT-17, R-DRV-19, R-SET-08, R-QUE-09, R-CONV-16, R-VEH-26, R-MD-16 and R-RNT-22, and the R-NUM-10 line in 13_tenancy_access.test.sql.
  • Block 3: nothing listed by git status --short: the branch already holds what your stack generates.
  • Block 4: no error. G2 renames vehicles.contract_status and drops contracts.daily_rate, which apps/web doesn't read.
Terminal window
git diff --stat origin/claude/be-pack-g2-cjja5a

Prints nothing.

  • supabase start fails on the config: paste the error into #162. The new lines are minimum_password_length, password_requirements and [auth.sessions] timebox.
  • A test fails: paste the not ok line and the lines under it that start with #. The test's description starts with the rule it proves. Don't edit the test.
  • Block 3 lists a file: your CLI or stack differs from the Backend Engineer's. Paste git diff --stat and the first lines of git diff for that file into #162, and don't commit it; the database check in CI decides which is right.
  • Block 4 fails: paste the errors. Per D33, the Frontend Engineer fixes apps/web on this branch before the merge.

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 #162: date · who · result · notes, with the last lines of block 2 and what block 3 printed.