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).
Before
Section titled “Before”- 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 --shortprints 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.
git fetch origin claude/be-pack-g2-cjja5agit switch claude/be-pack-g2-cjja5apnpm supabase stoppnpm supabase startpnpm supabase db reset2 · Every test
Section titled “2 · Every test”pnpm supabase test db3 · The types and the reference pages from this schema
Section titled “3 · The types and the reference pages from this schema”pnpm db:typespnpm docs:referencegit status --short4 · apps/web still typechecks
Section titled “4 · apps/web still typechecks”pnpm typecheckExpect
Section titled “Expect”- Block 1: "Started supabase local development setup", then "Finished supabase db reset".
- Block 2:
All tests successful.,Files=15, Tests=394andResult: PASS. Pack G2's tests are the 27 in42_data_phase_schema.test.sql, whose descriptions startR-RNT-07toR-RNT-17,R-DRV-19,R-SET-08,R-QUE-09,R-CONV-16,R-VEH-26,R-MD-16andR-RNT-22, and theR-NUM-10line in13_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_statusand dropscontracts.daily_rate, which apps/web doesn't read.
git diff --stat origin/claude/be-pack-g2-cjja5aPrints nothing.
If it fails
Section titled “If it fails”supabase startfails on the config: paste the error into #162. The new lines areminimum_password_length,password_requirementsand[auth.sessions] timebox.- A test fails: paste the
not okline 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 --statand the first lines ofgit difffor 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.