docs(adr): compress to 2 records in the domain-modeling format - #60
Merged
Merged
Conversation
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.
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.
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 isdropped 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.
_DIMiddlewareFactoryfunctools.partialbefore being kept. Deleting it silently removes the only check on the registration contract.setup_dideliberately does not calladd_middleware, and the rejected alternative (iterateapp.brokersinsetup_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 readerheadings, and the**Revisit trigger:**blocks. Where a trigger was the real boundaryof 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.partialtyping 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
tysuppressions it turned on, kept only as the clause that says typing thefactory to FastStream's real contract removed them; 0002's note that nothing inspects a broker
between
setup_diand startup.Citations
No citation moves.
modern_di_faststream/main.pycitesdocs/adr/0002-install-middleware-on-startup.mdand
docs/agents/domain.mdmentionsADR-0001; both numbers and both filenames are unchanged. Therepo-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 absenceof any
ty: ignorein the package, theon_startupinstall hook, the membership check againstbroker.config.broker_middlewares, and the replacement of the oldif not app.brokerguard by theif not app.brokersraise. The#39,#42and#56references 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, andlychee --offlineover both ADRs plusCONTEXT.mdandAGENTS.md(0 errors).
ruffwas run although no Python is touched by this change.ty checkwas not run; itis not part of the requested gate set.