Skip to content

docs(adr): reword ADR-0007's contract to cover Litestar's application_config - #355

Merged
lesnik512 merged 1 commit into
mainfrom
docs/adr-0007-build-or-accept
Oct 28, 2026
Merged

lesnik512 merged 1 commit into
mainfrom
docs/adr-0007-build-or-accept

Conversation

@lesnik512

Copy link
Copy Markdown
Member

Closes #329.

ADR-0007 said every bootstrapper takes the user's application and returns the same object. Litestar never did: it takes application_config and builds the app with Litestar.from_config. FastAPI, FastStream and FastMCP only do it when the user passes an app, and build a default one otherwise.

Per the decision on #329, this rewords ADR-0007's first sentence to describe what the bootstrappers actually do instead of adding an exception ADR. A bootstrapper takes the user's application or builds one from config, instruments it, and returns it. The ADR now names Litestar's reason: its plugins and middleware have to be in the AppConfig before the app exists. The Django argument still holds under the wider contract, because settings.py runs before any object a bootstrapper could be handed or build.

docs/integrations/litestar.md gains a sentence after the first example explaining application_config, linking the ADR by absolute URL since docs/adr/ is not published on the docs site.

No code changes. Verified: just adr-check, just docs-build (strict), and lychee in the CI job's offline mode pass.

@lesnik512
lesnik512 merged commit 98b283f into main Oct 28, 2026
35 checks passed
@lesnik512
lesnik512 deleted the docs/adr-0007-build-or-accept branch October 28, 2026 15:18
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.

Record why Litestar takes application_config (ADR-0007)

1 participant