Prerequisite: fresh clone + pnpm install from api/.
task dev:api(startswrangler devon :8787 with local D1).curl localhost:8787/healthz- Expect HTTP 200
{"ok":true,"db":1}— a live D1 round-trip (SELECT 1), not a static string.
task migrate(runswrangler d1 migrations apply DB --localfromapi/).- Expect
0001_init.sqlapplied; re-run reports no migrations to apply. task migrate:prodis explicit-only (--remote, sameapi/migrations/directory).
- Open
infra/d1.md; confirm database name, bindings table (DB→skramz,MEDIA→skramz-media), local workflow, and secrets/rotation via GitHub secrets /wrangler secretwith placeholder IDs (no real values in git).
cd api && pnpm typecheckclean;pnpm test3/3 pass.