From e78195fede7d83bc32804360c71e462de53253fb Mon Sep 17 00:00:00 2001 From: Artur Shiriev Date: Mon, 7 Sep 2026 07:34:30 +0300 Subject: [PATCH] docs(adr): reject a Django bootstrapper Django's observability is owned by settings.py, which runs before any object a bootstrapper could be handed, so the construct-and-hand-over contract has no natural expression there. --- docs/adr/0009-no-django-bootstrapper.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 docs/adr/0009-no-django-bootstrapper.md diff --git a/docs/adr/0009-no-django-bootstrapper.md b/docs/adr/0009-no-django-bootstrapper.md new file mode 100644 index 0000000..25b3b28 --- /dev/null +++ b/docs/adr/0009-no-django-bootstrapper.md @@ -0,0 +1,17 @@ +# No Django bootstrapper + +**Decision:** `lite-bootstrap` will not ship a Django bootstrapper. Django's size makes it the +framework most likely to be proposed by someone who has not hit the contract below. + +Every bootstrapper keeps one contract: the user constructs the application, passes it in, and gets +the same object back. Django's observability is conventionally owned by `settings.py` — `MIDDLEWARE` +ordering, installed apps — which runs before any object a bootstrapper could be handed, so the +contract has no natural expression there. ADR-0001 is the calibration: FastMCP was the hardest +framework to fit and still had an application object to attach to. + +Rejected: **attach to a constructed `ASGIHandler` instead.** This is the shape that would fit, and +today it means putting middleware outside `MIDDLEWARE`, diverging from every Django deployment guide +and from what a Django user would debug against. + +**Revisit trigger:** a released, maintained path that attaches instrumentation to a constructed +`ASGIHandler` (or equivalent) without going through `settings.py`.