Repository navigation
docs(design): ADR-0056 — prisma dev --serve runs a service's own dev command - #377
Merged
Merged
Conversation
…command A Next.js service under `prisma dev` runs its assembled standalone build, so every edit needs `next build` plus a reconverge, and its logs are not on the terminal. Running `next dev` beside it fails because nothing writes the address-free stash that `service.input()` and `service.load()` read. ADR-0056 decides the extension that local-dev.md left open: a per-run `--serve <address>=<command>` flag. The served service is not assembled. It lowers without its Deployment, and its instance keeps its port but runs no process. Its command runs in the foreground with inherited stdio, and gets the deployment's environment re-stashed by the same function run() uses. The ADR covers the watch loop, restarting the command when its environment changes, the --detach conflict, and how a later `prisma dev exec` would reuse the environment seam. It amends ADR-0041 (hot reload was left out; every service booted as deployed; the CLI supervised nothing) and ADR-0053 (dev url/dev stop/--detach). It also points local-dev.md's out-of-scope note at the ADR. Signed-off-by: Shane Neubauer <[email protected]>
|
Caution Gizmo's review pass for 36d48fb failed before posting a review. |
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Comment |
commit: |
…d prisma dev runs it Under `prisma dev`, a service runs the dev server its build adapter declares, in place of its built artifact, with no flag: `nextjs()` declares `next dev`, and `node()` declares none unless the author writes `dev: [...]` on it. The Compute emulator runs the dev server as a command deployment on the service's instance, so readiness, logs, crash supervision, restart on environment change, `--detach`, `dev stop` and session resume are unchanged and the dev session still owns no processes. This replaces the per-run `--serve <address>=<command>` design: the adapter already knows the directory, the port flags and the binary, and the emulator already owns a process lifecycle. The ADR now specifies every type, route, event, message and sequence. The file is renamed to match the title; the amendment notes, the index and local-dev.md follow. Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]> Co-Authored-By: Claude Fable 5.1 <[email protected]>
sneub
marked this pull request as ready for review
October 23, 2026 09:27
wmadden
approved these changes
Oct 23, 2026
4 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Linked issue
n/a — design only. The implementation follows in a separate PR once this ADR is accepted.
Summary
A Next.js service under
prisma devruns its assembled standalone build. Every edit needsnext buildand a reconverge, and the service's logs don't show up in the terminal. Runningnext devbeside it doesn't work either, because nothing writes the address-free stash thatservice.input()andservice.load()read, soinput()throwsenv COMPOSER_INPUT is unset.ADR-0056 decides the extension that
local-dev.md§ Out of scope sketched:prisma dev module.ts --serve web="next dev".Deployment.lower()gainsunassembled, and the service descriptor gains an optionalreservestep. Its environment rows, its instance, its port and its dependents' URLs all stay as they are.run(). The command gets the deployment's materialized environment, re-stashed address-free by the same functionrun()uses, plusPORTandHOST, laid over the shell's environment.--detach: refuses--serve.prisma dev exec: would reuse only the environment function, not the process lifecycle.Amends ADR-0041 (hot reload was left out, every service booted as deployed, the CLI supervised no process) and ADR-0053 (
dev urlreportsserved,dev stopends a served command,--detachrefuses--serve). Both ADRs carry amendment notes and the index is updated.Testing performed
node scripts/lint-control-bytes.mjs,node scripts/lint-framework-vocabulary.mjsandgit diff --check; all pass.Checklist
git commit -s) per the DCO. The DCO status check will block merge if any commit is missing aSigned-off-by:trailer.feat,fix,chore,docs,refactor,test,build) — PR titles drive the auto-generated release notes.n/aif the change is doc-only / refactor with no behavioural delta). n/a — doc-only.Notes for the reviewer
lower()fails on a missing bundle, and dependents get the service's URL from theDeployment.reservereturns the URL from theAppinstead, which locally is the samelocalhost:<port>.--serve, which overlaps with theserve()function in service-rpc.--dev-commandis the alternative.prisma devwas started from.prisma dev logswork; whichever merges second renumbers.