Skip to content

Examples, the scaffolder and the deploy guide follow the dev loop - #1228

Merged
borisno2 merged 2 commits into
prisma-8from
claude/issue-1159-examples-scaffolder-docs
Sep 6, 2026
Merged

Examples, the scaffolder and the deploy guide follow the dev loop#1228
borisno2 merged 2 commits into
prisma-8from
claude/issue-1159-examples-scaffolder-docs

Conversation

@borisno2

@borisno2 borisno2 commented Sep 6, 2026

Copy link
Copy Markdown
Member

Implements #1159. Part of #1125.

Documents and wires the loop that #1157 and #1158 shipped: opensaas dev starts the Dev database, generates, reconciles and spawns the app; opensaas db update promotes a staged change.

Examples (twelve database-backed)

auth-demo, blog, composable-dashboard, custom-field, file-upload-demo, json-demo, mcp-demo, rag-ollama-demo, rag-openai-chatbot, starter, starter-auth, tiptap-demo:

  • devopensaas dev (a custom port becomes opensaas dev -- next dev -p <port>)
  • db:pushdb:updateopensaas db update
  • READMEs drop the schema-apply pre-step; reset is rm -rf .opensaas/dev-db
  • .env.example ships no DATABASE_URL, only a commented escape line
  • the two starters migrate/migrate:deployprisma migration plan / prisma db migrate
  • examples/file-upload-demo/.gitignore stops ignoring prisma/migrations/

examples/plain-css-theming is untouched — it has no dependencies and no database.

Scaffolder

Post-step is installgenerate; the .env it writes sets no DATABASE_URL. DbProvider is gone from env.ts/setup.ts — there is one env shape now. The isolated first-run guard asserts scaffold → generate with no database and no .opensaas/dev-db.

Deploy guide

  • production migrates from the committed migrations/ directory with prisma db migrate; authoring is prisma migration plan
  • a Database escape section, with the pgvector provisioning and privilege paragraph beside it (ADR-0065): Prisma runs CREATE EXTENSION from the committed Extension contract space on every path, a pre-installed extension is skipped, a missing one fails naming the space and SQL state 58P01
  • the bundling section loses outputFileTracingIncludes and every prisma-client mention

Verification

  • pnpm build, pnpm lint (0 errors, 2 pre-existing warnings), pnpm format, pnpm manypkg fix
  • package tests pass per package: core 1550, cli 372, ui 53 files, auth 17, rag 16, storage 8, storage-s3 1, storage-vercel 1, create-opensaas-app 37
  • the real scaffolder binary run in an OS temp dir with DATABASE_URL/DIRECT_DATABASE_URL unset completes and writes an .env with no active DATABASE_URL
  • opensaas dev in that scaffolded project brought up a Dev database (postgres://postgres@127.0.0.1:64471/postgres), applied Create table "Note" through db update, and spawned the app child with PROVENANCE dev-database and no injected DATABASE_URL

Out of scope

Example opensaas.config.ts files still declare provider: 'sqlite' and import @prisma/adapter-better-sqlite3, so example builds fail on this branch exactly as they do on prisma-8 today. That is spec 9 (#1129); the scaffolded project above had to be given a Prisma 8 config to exercise the loop. The deploy guide's Step 2 ("Switch Your Config to PostgreSQL", Prisma 7 driver adapters) is left for the same owner.

🤖 Generated with Claude Code

Every database-backed example's `dev` script is now `opensaas dev`, its
`db:push` is `opensaas db update`, its README drops the schema-apply
pre-step, and its `.env.example` ships no default `DATABASE_URL` — a fresh
clone takes the Dev database branch (ADR-0063). The two starter templates'
`migrate`/`migrate:deploy` point at `prisma migration plan` and
`prisma db migrate`.

The scaffolder's post-step is install and generate only, and the `.env` it
writes sets no `DATABASE_URL`, so scaffolding reaches no database and the
first `pnpm dev` brings one up.

The deploy guide migrates from the committed `migrations/` directory with
`prisma db migrate`, carries the pgvector provisioning and privilege
paragraph beside the Database escape (ADR-0065), and loses the file-tracing
pin along with the `prisma-client` tree that no longer exists.

`examples/plain-css-theming` is untouched: it has no package dependencies
and no database.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Sep 6, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 9fc28ca

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
create-opensaas-app Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@vercel

vercel Bot commented Sep 6, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
stack-docs Ready Ready Preview Sep 6, 2026 9:13pm UTC

Comment thread examples/rag-ollama-demo/README.md Outdated
This creates the SQLite database (`dev.db`) with your schema.

### 5. Run the Test Script
### 4. Run the Test Script

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Step 4 now runs a database-dependent script before anything creates a database. Previously step 4 was pnpm db:push, which created dev.db; now the only thing that brings a database up is pnpm dev at step 5. Following the README in order, the test script calls getContext()resolveDatabaseUrl(), which finds no DATABASE_URL (the new .env.example leaves it commented) and no .opensaas/dev-db state file, and throws DatabaseUrlUnresolvedError. Either move the test-script step after "Start the Admin UI", or say it needs pnpm dev running in another terminal — the way examples/rag-openai-chatbot was updated in this same PR.

Comment thread examples/composable-dashboard/README.md Outdated
```

### 5. Seed Some Data (Optional)
### 4. Seed Some Data (Optional)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same ordering problem as rag-ollama-demo: the seed/inspect step (and pnpm db:studio two lines below) is now numbered ahead of pnpm dev, but pnpm db:push was the step that used to create the database and it is gone. With no DATABASE_URL and no running dev loop there is no connection to resolve, so pnpm db:studio fails at step 4. It needs to come after "Run Development Server", or say it requires pnpm dev running in a second terminal.

"db:push": "prisma db push",
"migrate": "prisma migrate dev",
"migrate:deploy": "prisma migrate deploy",
"db:update": "opensaas db update",

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing db:push here breaks the Playwright e2e harness, which is not updated in this PR. e2e/global-setup.ts targets examples/starter-auth and calls setupDatabase(), which runs execSync('pnpm db:push --accept-data-loss', { cwd: exampleDir }) (e2e/utils/db.ts:43) — that script no longer exists, so global setup dies with "Command db:push not found" before any test runs. The same file also seeds .env with envContent.replace(/DATABASE_URL=.*/, ...); the new .env.example only carries DATABASE_URL on a commented line, so that substitution now rewrites a comment and leaves the variable unset. The e2e job is gated on github.base_ref == 'main' so it does not run on this PR, but it will fail the moment prisma-8 targets main.

"db:push": "prisma db push",
"migrate": "prisma migrate dev",
"migrate:deploy": "prisma migrate deploy",
"db:update": "opensaas db update",

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The nightly published-create-e2e job still drives the scaffolded project through the removed script: .github/workflows/nightly.yml runs pnpm generate; pnpm db:push; pnpm build and then asserts test -f dev.db, with DATABASE_URL: file:./dev.db. Once this scaffolder change is published, pnpm db:push will not exist in the generated project and the job fails. The examples-build job in the same file also still claims each .env.example "defaults DATABASE_URL to a value that matches its config's Prisma provider", which is no longer true for any example after this PR.

@@ -230,17 +236,16 @@ openssl rand -base64 32

## Step 4: Author the First Migration

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This step dropped the # Ensure DATABASE_URL + DIRECT_DATABASE_URL are set prerequisite, but the command still needs a live connection: the guide itself says so at "Authoring Migrations in CI" — "Planning a new one needs a database to plan against — prisma migration plan resolves its origin through the db ref ... and the connection prisma.config.ts gives it". A reader who follows Step 4 literally, with no DATABASE_URL set (which is now the documented local default) and no opensaas dev running, gets a connection failure rather than a planned migration. Restore the prerequisite line, or say to run it with pnpm dev up / DIRECT_DATABASE_URL pointed at a disposable Postgres.

### "Migration failed"

**Symptoms:** `prisma migrate deploy` errors
**Symptoms:** `prisma db migrate` errors

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The symptom line was updated to prisma db migrate but the two solutions immediately below it were not, and they are now wrong on both counts: "Check migration files in prisma/migrations/" contradicts line 246, which says the packages live in migrations/ at the project root, and npx prisma migrate resolve is a Prisma 7 command that no longer exists in the migration plan / db migrate surface this guide now documents. Someone hitting a failed migration is sent to an empty directory and a command that errors.

pnpm dev

# 4. Seed the knowledge base
# 4. Seed the knowledge base, from a second terminal

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a single pasteable bash block, and pnpm dev on the line above never exits — so nothing after it runs. The prose "from a second terminal" is right, but a reader copying the block (which is the point of a QUICKSTART) hangs at step 3 and never seeds. Split the seed into its own fenced block under a "in a second terminal" heading.


// The two documented setup steps, run via the borrowed toolchain.
const setupEnv = { ...process.env }
delete setupEnv.DATABASE_URL

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only DATABASE_URL is cleared, but findDatabaseUrl consults DIRECT_DATABASE_URL first (packages/core/src/db/url.ts, CONNECTION_VARIABLES = ["DIRECT_DATABASE_URL", "DATABASE_URL"]). On any machine or runner that exports DIRECT_DATABASE_URL, generate takes the environment branch and the guard silently stops proving what its name and the assertions below claim — that the scaffold reaches a Generated bundle with no database anywhere. Delete both variables.

@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Coverage Report for Core Package Coverage (./packages/core)

Status Category Percentage Covered / Total
🟢 Lines 94.26% (🎯 65%) 2810 / 2981
🟢 Statements 92.96% (🎯 65%) 3078 / 3311
🟢 Functions 96.68% (🎯 62%) 555 / 574
🟢 Branches 87.76% (🎯 50%) 2167 / 2469
File CoverageNo changed files found.
Generated in workflow #2012 for commit 9fc28ca by the Vitest Coverage Report Action

@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Coverage Report for UI Package Coverage (./packages/ui)

Status Category Percentage Covered / Total
🔵 Lines 78.45% 244 / 311
🔵 Statements 77.95% 251 / 322
🔵 Functions 69.81% 74 / 106
🔵 Branches 66.94% 160 / 239
File CoverageNo changed files found.
Generated in workflow #2012 for commit 9fc28ca by the Vitest Coverage Report Action

@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Coverage Report for CLI Package Coverage (./packages/cli)

Status Category Percentage Covered / Total
🔵 Lines 73.64% 1646 / 2235
🔵 Statements 73.23% 1765 / 2410
🔵 Functions 82.42% 286 / 347
🔵 Branches 60.62% 819 / 1351
File CoverageNo changed files found.
Generated in workflow #2012 for commit 9fc28ca by the Vitest Coverage Report Action

@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Coverage Report for Auth Package Coverage (./packages/auth)

Status Category Percentage Covered / Total
🔵 Lines 99.48% 195 / 196
🔵 Statements 98.13% 210 / 214
🔵 Functions 100% 44 / 44
🔵 Branches 90.77% 187 / 206
File CoverageNo changed files found.
Generated in workflow #2012 for commit 9fc28ca by the Vitest Coverage Report Action

@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Coverage Report for Storage Package Coverage (./packages/storage)

Status Category Percentage Covered / Total
🔵 Lines 79.66% 235 / 295
🔵 Statements 81.17% 263 / 324
🔵 Functions 87.91% 80 / 91
🔵 Branches 77.46% 220 / 284
File CoverageNo changed files found.
Generated in workflow #2012 for commit 9fc28ca by the Vitest Coverage Report Action

@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Coverage Report for RAG Package Coverage (./packages/rag)

Status Category Percentage Covered / Total
🔵 Lines 54.38% 397 / 730
🔵 Statements 53.85% 419 / 778
🔵 Functions 64.06% 82 / 128
🔵 Branches 47.25% 198 / 419
File CoverageNo changed files found.
Generated in workflow #2012 for commit 9fc28ca by the Vitest Coverage Report Action

@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Coverage Report for Storage S3 Package Coverage (./packages/storage-s3)

Status Category Percentage Covered / Total
🔵 Lines 100% 40 / 40
🔵 Statements 100% 40 / 40
🔵 Functions 100% 9 / 9
🔵 Branches 100% 19 / 19
File CoverageNo changed files found.
Generated in workflow #2012 for commit 9fc28ca by the Vitest Coverage Report Action

@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Coverage Report for Storage Vercel Package Coverage (./packages/storage-vercel)

Status Category Percentage Covered / Total
🔵 Lines 100% 68 / 68
🔵 Statements 100% 71 / 71
🔵 Functions 100% 15 / 15
🔵 Branches 97.87% 46 / 47
File CoverageNo changed files found.
Generated in workflow #2012 for commit 9fc28ca by the Vitest Coverage Report Action

@borisno2 borisno2 left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review — verdict: REQUEST CHANGES

High-effort review of the full 50-file diff (claude/issue-1159-examples-scaffolder-docsprisma-8). Eight findings are posted as inline comments; the blocking ones and the cross-cutting checks are summarised here.

Blocking

  1. examples/starter/package.json / examples/starter-auth/package.json — removing db:push breaks two live consumers.

    • e2e/utils/db.ts:43 runs pnpm db:push --accept-data-loss in examples/starter-auth; Playwright global setup dies before any test. e2e/global-setup.ts's /DATABASE_URL=.*/ substitution now only rewrites the commented line, so the var is never set. Latent only because the e2e job is gated on base_ref == 'main' — it detonates at the merge to main.
    • .github/workflows/nightly.yml still runs pnpm db:push and asserts test -f dev.db against the scaffolded app. That fails as soon as this scaffolder change publishes. The examples-build job's comment claiming .env.example defaults DATABASE_URL is now false for every example.
      Workflows and e2e are correctly untouched here (a concurrent PR owns them), but this PR is what invalidates them — the two need to land together or in a stated order.
  2. examples/rag-ollama-demo/README.md:82 and examples/composable-dashboard/README.md:98 — steps that need a database are numbered ahead of the step that starts one. db:push was what created it; with no DATABASE_URL and no .opensaas/dev-db state file, resolveDatabaseUrl() throws DatabaseUrlUnresolvedError. Either reorder, or add the "second terminal" note rag-openai-chatbot got.

  3. docs/content/how-to/deploy.md:238 — the dropped DATABASE_URL + DIRECT_DATABASE_URL prerequisite was load-bearing. Line 451 of the same guide says prisma migration plan needs a database to plan against. Followed literally against the new local default (no DATABASE_URL, no opensaas dev), step 4 fails.

  4. docs/content/how-to/deploy.md:607 — half-updated troubleshooting. The symptom line moved to prisma db migrate, but the solutions beneath still say prisma/migrations/ (contradicting line 246's root migrations/) and npx prisma migrate resolve, a Prisma 7 command that no longer exists on this surface. A doc naming a command that isn't there is the failure mode this ticket exists to remove.

Non-blocking

  1. examples/rag-openai-chatbot/QUICKSTART.md:25 — one pasteable bash block in which pnpm dev never exits, so the seed below it never runs, despite the prose saying "second terminal". Split the block.
  2. packages/create-opensaas-app/tests/scaffold-first-run-guard.test.ts:140 — only DATABASE_URL is deleted, but findDatabaseUrl prefers DIRECT_DATABASE_URL. On any environment exporting the latter, the guard quietly stops proving "no database anywhere". Delete both.
  3. examples/composable-dashboard keeps --port 3002 where every other ported example uses -p. Pre-existing spelling, faithfully preserved — a nit, not a defect. (The 3002 collision with tiptap-demo is also pre-existing.)

Checked and correct

  • opensaas dev -- next dev -p <port> genuinely works: commander consumes the top-level -- and the remainder lands in the [command...] variadic — no unknown-option error. Applied to all five custom-port examples; the seven default-port ones get a bare opensaas dev. plain-css-theming is a static CSS example with no scripts and is correctly excluded — twelve is the right count.
  • Command spellings: opensaas dev, opensaas db update, prisma migration plan, prisma db migrate all match ADR-0003/ADR-0065 and the CLI surface on this branch. rm -rf .opensaas/dev-db matches DEV_DATABASE_DIR in packages/cli/src/commands/dev.ts. db:studio still resolves while the dev loop runs, via the state file.
  • .env.example: no active DATABASE_URL in any of the twelve — every one is commented, and env.test.ts now asserts envExample === env so the pair cannot drift.
  • Scaffolder: no remaining reference to DbProvider anywhere in the repo; the post-step plan is exactly install → generate with no database step; no any, no type casts in the three changed TS files.
  • Tests strengthened, not loosened — the guard now asserts .opensaas/dev-db is absent and the env pair is identical; setup.test.ts asserts the exact two-step array.
  • Deploy guide: zero occurrences of outputFileTracingIncludes or prisma-client; the pgvector provisioning-and-privilege paragraph is present at line 42 beside the Database escape, correctly noting pgvector is not a trusted extension and the 58P01 failure mode.
  • Scope: no example opensaas.config.ts or application source, no .github/workflows/, no e2e/ — only scripts, env files, docs and the scaffolder/deploy guide, as the ticket requires.
  • Changesets: exactly one file, added, +18/-0. No pre-existing .changeset/ file modified or deleted.

On the pre-existing SQLite state — verified independently, and it matters more than "premature"

The report is accurate. DatabaseConfig.provider on this branch is typed 'postgresql' (single literal, packages/core/src/config/types.ts:2669), yet eleven of the twelve examples still declare provider: 'sqlite' with @prisma/adapter-better-sqlite3; only rag-openai-chatbot is Postgres. So opensaas generate — and therefore opensaas dev — cannot succeed in those eleven today. That is pre-existing and belongs to another ticket.

Where I would not sign it off as merely "premature docs": the scaffolder now runs generate automatically, and scaffold-first-run-guard.test.ts asserts that opensaas generate on the scaffolded starter template reaches a Generated bundle. The starter template is one of the eleven SQLite configs. So this PR's own guard test cannot pass until the config conversion lands — this is not only documentation running ahead of the code, it is a test in this PR depending on it.

Verdict: REQUEST CHANGES. The doc/step-ordering issues (2–4) are fixable within this PR and should be. The scaffolder, env files, changeset and scope are all clean, and the -- argument form is correct. The db:push removal (1) and the SQLite precondition are sequencing constraints against sibling PRs rather than defects in this diff — but they must be sequenced explicitly, not merged on the assumption that someone else's PR lands first.

Every example README's DB-dependent step now follows the step that brings a
database up. `rag-ollama-demo` and `composable-dashboard` had them numbered
ahead of `pnpm dev`; `rag-openai-chatbot` numbered its seed before the server
it told the reader to have running. The standalone test/seed scripts in
`auth-demo`, `blog`, `json-demo` and `mcp-demo` say they need `pnpm dev` up.
The QUICKSTART's single pasteable block is split, since `pnpm dev` never exits.

The deploy guide restores the connection prerequisite on Step 4 — planning
needs a database, as "Authoring Migrations in CI" says two hundred lines
later — as the Database escape rather than the old default `DATABASE_URL`. The
"Migration failed" entry is consistent again: the packages live in
`migrations/` at the project root, and there is no `migrate resolve` in Prisma
8, so it says what a deployer does instead (an apply is one transaction; a
failure leaves the database where it started).

`scaffold-first-run-guard.test.ts` asserted `opensaas generate` on the starter
template, which still declares `provider: 'sqlite'` and a Prisma 7 adapter that
is not resolvable on this branch — the guard fails at config load when it
actually runs. It passed only because `RUN_SCAFFOLD_GUARD=1` is set in the
`e2e` job alone, which is gated on `base_ref == 'main'`. It now reads the
template's declared provider and skips against #1129 until the conversion
lands, and clears `DIRECT_DATABASE_URL` as well as `DATABASE_URL` so the "no
database anywhere" claim is not provable by the runner's environment.

`composable-dashboard` uses `-p` like every other ported example.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@borisno2

borisno2 commented Sep 6, 2026

Copy link
Copy Markdown
Member Author

Review findings addressed in 9fc28ca. Per finding:

1 — db:push consumers (blocking). Verified and left to #1160 / PR #1227, which merges first and owns e2e/** and .github/workflows/**. Its diff removes the execSync('pnpm db:push --accept-data-loss') in e2e/utils/db.ts and the .env DATABASE_URL= substitution in e2e/global-setup.ts, replaces nightly's pnpm db:push + test -f dev.db with prisma db update + test -f .opensaas/dev-db.json, and rewrites the examples-build comment about .env.example defaulting DATABASE_URL. Nothing in that lane is left uncovered, so nothing was changed here.

2 — README step ordering (blocking). Reordered so a reader following the numbers succeeds. I walked all twelve database-backed examples, not just the two named:

  • Reordered: rag-ollama-demo (test script was step 4, dev step 5), composable-dashboard (seed/db:studio step 4, dev step 5), and rag-openai-chatbot — which numbered its seed as step 7 while telling the reader to have the step-8 server running.
  • Note added, no reorder needed: auth-demo, blog, json-demo (the npx tsx test.ts sections, well after pnpm dev but with nothing saying it must be up) and mcp-demo's "Seed a Test User".
  • Already correct, unchanged: custom-field, file-upload-demo, starter, starter-auth, tiptap-demo — every one ends its numbered sequence at pnpm dev and touches no database before it. plain-css-theming has no database.

Checked mechanically as well as by eye: in every README, the first pnpm dev now precedes every db:studio / db:update / npx tsx / pnpm test / pnpm db:seed occurrence.

3 — deploy.md:238 prerequisite (blocking). Restored, phrased as the Database escape rather than the old unconditional DATABASE_URL: set DIRECT_DATABASE_URL (or DATABASE_URL) at a Postgres you are willing to have a planning connection opened against — the Neon project from Step 1, a local Docker Postgres, or a throwaway branch. Consistent with "Authoring Migrations in CI" further down.

4 — deploy.md:607 troubleshooting (blocking). Whole entry made consistent: the packages are under migrations/ at the project root (matching line 246), including the refs and every extension contract space. npx prisma migrate resolve is gone — there is no Prisma 8 equivalent, so instead of naming a command that does not exist the entry says what actually holds: an apply runs in one transaction, a failed prisma db migrate leaves the database where it started, so fix the cause, re-plan if the packages need to change, and re-run pnpm migrate:deploy. Added the 58P01 / extension-space pointer to the Database escape.

5 — the guard test (blocking). You were right, and the reason it passes is worse than "not yet true": it never runs. RUN_SCAFFOLD_GUARD=1 is set only in the e2e job of test.yml, which is if: github.base_ref == 'main' — this PR targets prisma-8. In every lane that does run, the flag is unset, prerequisitesPresent is false, the real suite is describe.skipIf'd, and only the placeholder describe runs, asserting prerequisitesPresent === false. It passes vacuously.

I ran it for real (RUN_SCAFFOLD_GUARD=1 after install + build) and it fails — and not on the provider type. It dies at config load: Cannot find module '@prisma/adapter-better-sqlite3', which this branch no longer installs at all. So the guard cannot reach anything it is about until #1129 converts the templates.

Rather than loosen it, the guard now reads the declared provider in examples/starter/opensaas.config.ts (the source copy-templates.ts builds templates/basic from) and skips while it is not postgresql, with a "Blocked on #1129" section in the header saying what unblocks it. The skip is self-clearing: the moment #1129 lands, the check flips and the guard starts running with no edit here. The placeholder test name says so too. Verified both branches of the check — false on starter, true on rag-openai-chatbot's Postgres config.

Non-blocking. QUICKSTART's single block split at pnpm dev with a "in a second terminal" heading for the seed. The guard now deletes DIRECT_DATABASE_URL as well as DATABASE_URL, so its environment is actually pinned against findDatabaseUrl's preference order. composable-dashboard uses -p 3002 like the other four ported examples.

.changeset/mellow-lanterns-scaffold.md is unchanged — nothing here alters what it claims about the published scaffolder, and no other changeset was touched.

Verified: pnpm build, pnpm lint (0 errors, 2 pre-existing warnings), pnpm manypkg fix, pnpm format, and turbo run test --filter='./packages/*' — 19/19 tasks, all green.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant