Repository navigation
fix(cli): a new app's composition root composes again after a failure - #518
Merged
Merged
Conversation
composeIntelligo() in the scaffold marked itself done before it bound anything. In a process that outlived a first failure, every later call skipped the registrations and went on with nothing bound. The mark is put back when binding throws.
|
This pull request is merged. |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
intelligo-web | 8bd261b | Commit Preview URL Branch Preview URL |
Dec 05 2026, 05:55 PM |
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.
Why
The scaffold's
composeIntelligo()runs the app's registrations once per process. It set itscomposedflag before callingbind(), whose first statement checks the environment. When that threw, the flag stayed set: a second call in the same process skipped every registration and carried on to seed the database with nothing bound. A production server stops on the first throw, so this showed in processes that outlive it: a dev server, a worker, a test run, a script.The flag is still set first, so a registration that itself composes does not recurse, and is put back when
bind()throws, so the next call binds again. The seed promise beside it already retried this way.The reference app and the showcase carry the same change in their own
lib/intelligo.ts.app-scaffoldis 1.34.1.Review
.github/CODEOWNERS); the review-window check holds it for 24 hours after it is first seen as high-riskAnother open pull request also changes
app-scaffoldand its pinned hash; whichever merges second takes the next version and a recomputed hash.Checklist
tests/architecture/for a boundary change):packages/cli/src/templates.test.tsruns the guard as the template writes it, with abindthat fails oncepnpm type-check && pnpm lint && pnpm testpass locally: the CLI's tests, type-check of both apps,tests/architecture, the sync check. The rest is left to CI.CHANGELOG.mdentry under[Unreleased]for anything a consumer noticespackages/registry/base/instead)