Skip to content

docs(adr): compress to 2 records in the domain-modeling format - #60

Merged
lesnik512 merged 1 commit into
mainfrom
docs/compress-adrs
Sep 19, 2026
Merged

lesnik512 merged 1 commit into
mainfrom
docs/compress-adrs

Conversation

@lesnik512

Copy link
Copy Markdown
Member

Rewrites docs/adr/ from 2 records (841 words) to 2 (317 words), one paragraph each, in the shape
/domain-modeling's ADR-FORMAT asks for. Both records pass the admission test, so nothing is
dropped or merged and the numbering is unchanged. Same treatment as modern-python/compose2pod#102.

Evaluation

Each record was tested against the admission test: hard to reverse, surprising without context, the
result of a real trade-off.

Old Outcome New Reason
0001 keep _DIMiddlewareFactory kept 0001 A deliberate deviation from the obvious path: the class reads as a foldable pass-through, and the ten lines were measured against functools.partial before being kept. Deleting it silently removes the only check on the registration contract.
0002 install the middleware on startup kept 0002 Boundary decision with a user-visible ordering consequence, surprising because setup_di deliberately does not call add_middleware, and the rejected alternative (iterate app.brokers in setup_di) is the one a reader would reach for.

Cut from both: the **Decision:** line, ## Why it keeps coming up / ## Why / ## What changes for a reader headings, and the **Revisit trigger:** blocks. Where a trigger was the real boundary
of the decision it survives as a clause: 0001 ends on FastStream accepting a pre-bound middleware
instance, and 0001's whole argument already rests on functools.partial typing as
(*args: Any, **kwargs: Any). 0002's triggers were dropped as speculative upstream changes.

Also cut as history rather than decision: 0001's 2026-06-25 complexity moves, not concentrates
narrative and the two ty suppressions it turned on, kept only as the clause that says typing the
factory to FastStream's real contract removed them; 0002's note that nothing inspects a broker
between setup_di and startup.

Citations

No citation moves. modern_di_faststream/main.py cites docs/adr/0002-install-middleware-on-startup.md
and docs/agents/domain.md mentions ADR-0001; both numbers and both filenames are unchanged. The
repo-wide sweep finds no reference to an old or dropped number.

Stale claims

Nothing stale was found. Every concrete claim was checked against modern_di_faststream/main.py:
the __slots__-ed factory and its __call__(msg, /, *, context: ContextRepo) signature, the absence
of any ty: ignore in the package, the on_startup install hook, the membership check against
broker.config.broker_middlewares, and the replacement of the old if not app.broker guard by the
if not app.brokers raise. The #39, #42 and #56 references were left as they were.

Gates

Green: pytest -q tests/test_adr_citations.py (7 passed), the full suite (pytest -q, 20 passed,
no directory needs external services), ruff format --check, ruff check --no-fix,
eof-fixer . --check, and lychee --offline over both ADRs plus CONTEXT.md and AGENTS.md
(0 errors). ruff was run although no Python is touched by this change. ty check was not run; it
is not part of the requested gate set.

Both records pass the admission test, so nothing is dropped or merged and the
numbering is unchanged. Each is now a single paragraph: the section headings,
the standalone Decision line and the revisit triggers are gone, with the part
of each trigger that is the real boundary of the decision folded into the
prose. 841 words to 317.
@lesnik512
lesnik512 merged commit 45854bb into main Sep 19, 2026
8 checks passed
@lesnik512
lesnik512 deleted the docs/compress-adrs branch September 19, 2026 11:28
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