docs(adr): compress to 2 records in the domain-modeling format - #24
Merged
Merged
Conversation
Both records survive the admission test on separate boundaries, so nothing is dropped, merged or renumbered. Each is now a single paragraph without the Decision/Revisit-trigger scaffolding. Corrects a stale claim in 0002: modern-di no longer raises ContainerClosedError on a closed container (3.1 reopens implicitly with ContainerClosedWarning), so the unconditional open() now avoids that warning rather than an error.
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 (681 words) to 2 (297 words), one paragraph each, in the shape the domain-modeling ADR format asks for. Both records pass the admission test on separate boundaries, so nothing is dropped or merged, the numbering is already contiguous from 0001 in the original order, and no file is renamed.Evaluation
Each record was tested against the admission test: hard to reverse, surprising without context, the result of a real trade-off.
CLIENT_STARTUP/CLIENT_SHUTDOWNpair is an explicit no that a reader would otherwise read as an omission, and it trades a client-side container's lifetime against holding app-scoped resources in a process that resolves nothing.The
**Decision:**lines and both**Revisit trigger:**blocks are gone. 0001's trigger was a restatement of the taskiq contract the paragraph already gives, and 0002's was the client-resolves case the paragraph already names, so neither was the real boundary of the decision. 0002's sub-rule about the unconditionalcontainer.open()is a rule the record relies on and survives as one sentence.Citations
None moved. The repo-wide sweep finds one reference,
ADR-0001indocs/agents/domain.md, whose number and slug are unchanged; the file tree in that same document still lists both filenames correctly.tests/test_adr_citations.pypasses.Stale claims corrected
0002 said that on a second worker cycle, resolving without reopening "would raise
ContainerClosedError". That is no longer true on the pinnedmodern-di>=3,<4(3.4.0 is installed): as of 3.1 a container is open from construction, andContainer._preparereopens a closed one implicitly, emittingContainerClosedWarning.ContainerClosedErroris kept importable for back-compat, documents itself as no longer raised, and is scheduled for removal in 4.0. The record now says the unconditionalopen()reopens deliberately instead of leaving modern-di to reopen implicitly with that warning.Everything else was verified against the code:
build_di_containeris the async generatorTaskiqDepends, noTaskiqMiddlewareexists,setup_diregisters only the two worker events and callscontainer.open()unconditionally,taskiq_dependenciesdefaultsuse_cache=Trueand callsdep.athrowon the error path,InMemoryBroker.startupfires both lifecycle pairs whileAsyncBroker.startuppicks one byis_worker_process, and the in-process caveat is documented inREADME.md.Gates
pytest -q tests/test_adr_citations.py: 7 passed.pytest -q(full suite): 17 passed, 1 warning (a pre-existingDeprecationWarningfromtaskiq_dependencieson the three-argathrowsignature, unrelated to this change). No directories were skipped; this repo's suite needs no external services.ruff format --checkandruff check --no-fix: skipped, no Python file is touched by this change.eof-fixer . --check: clean, exit 0.lychee --offline --no-progressover both touched Markdown files plusCONTEXT.mdandAGENTS.md: 4 unique links, 2 OK, 0 errors, 3 excluded.