docs(adr): compress to 1 record in the domain-modeling format - #54
Merged
Merged
Conversation
No drops and no merges: the single record survives the admission test and keeps its number and slug. Rewritten as one paragraph, 299 words to 127, dropping the **Decision:** line, the bolded argument headings and the revisit trigger. Corrects a stale claim: `_merge_lifespan_context` yields `None` when both states are `None`, so the merge rebuilds the user's state as a fresh dict only when one of them is a mapping.
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 1 record (299 words) to 1 (127 words), one paragraph, in the shapeADR-FORMAT.mdasks for. The record survives the admission test, so nothing is dropped, merged orrenumbered: it keeps
0001-own-the-lifespan-composition.md, and every existing citation resolvesunchanged.
Evaluation
Tested against the admission test: hard to reverse, surprising without context, the result of a real
trade-off.
Removed from the prose: the
**Decision:**line, the three bolded argument headings, and the**Revisit trigger:**section. The trigger (a public passthrough helper appears upstream) is notthe boundary of the decision, only its natural expiry, and it follows from the two reasons the
paragraph already gives.
Citations
None moved.
CONTEXT.mdcites[ADR-0001](docs/adr/0001-own-the-lifespan-composition.md)anddocs/agents/domain.mdmentionsADR-0001; both still resolve, and the file structure sample indomain.mdstill names the right filename. The repo-wide sweep finds no reference to an old ordropped number.
Stale claims corrected
The old record said the merge path would replace the original lifespan's passthrough, "its
Noneorits mapping, verbatim", with a freshly built dict. Current
fastapi.routing._merge_lifespan_contextyields
Nonewhen both states areNone(an explicit old-ASGI branch), so the rebuild only happenswhen one of them is a mapping. The paragraph now says that.
Verified against the code and unchanged:
setup_diinstalls_compose_lifespanontoapp.router.lifespan_context;pyproject.tomlpinsfastapi>=0.100,<1; the private import wasdropped in 2.8.0 (#20, the first tag containing it);
_compose_lifespanenters the container withasync withso a second cycle reopens it. The named testtest_lifespan_reopens_container_across_cyclesstill exists intests/test_lifespan.py, but theparagraph no longer names it, since the test name is the kind of detail that goes stale silently.
Gates
pytest -q tests/test_adr_citations.pypytest -q(full suite)ruff format --checkruff check --no-fixeof-fixer . --checklychee --offlineover the touched ADR,CONTEXT.md,AGENTS.mdNo directory needed external services, so none was skipped. No Python changed, so the ruff gates only
confirm the tree was already clean.