docs(adr): compress to 2 records in the domain-modeling format - #26
Merged
Merged
Conversation
Drop 0002 (per-update context stays a literal): the context dict is internal and swapping it for two `bind` calls costs nothing, so the record fails the hard-to-reverse and real-trade-off halves of the admission test. Renumber 0003 (no auto_inject for dialogs) to 0002, keeping the original relative order. No merges. Both survivors become one paragraph each, and the `_inject_router` description is corrected to what the code does now.
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 3 records (~740 words) to 2 (~300 words), one paragraph each, in the shapeADR-FORMAT.mdasks for. Survivors are renumbered 0001-0002 in their original order and every citation moves with them.Evaluation
Each record was tested against the admission test: hard to reverse, surprising without context, the result of a real trade-off.
modern-di-aiogram-dialogdistribution, matching every other integration) is the obvious one._DiMiddleware; routing it throughintegrations.bindis a three-line, zero-risk change, so the decision is not hard to reverse, and the alternative was rejected on length rather than on a constraint. No survivor relies on a rule it states, so nothing needed folding.auto_injectfor dialogsauto_inject=Trueand finds dialog getters untouched will ask why; the answer is the structural constraint 0001 protects, so it is a real scope decision with a real alternative.No merges: 0001 answers where dialog support lives, 0002 answers how far the sweep reaches. They share a constraint but not a question.
Citations moved
The only ADR citation in the repo is
docs/agents/domain.md, which namesADR-0001as its worked example of flagging a conflict; 0001 keeps its number, so the reference is unchanged. The file-structure block in the same file listed0002-per-update-context-stays-a-literal.mdand now lists0002-no-auto-inject-for-dialogs.md. No Python, TOML or workflow file cites an ADR. The repo-wide sweep after editing finds no old or dropped number.Stale claims corrected
HandlerObjectit finds"._inject_routerskips theupdateobserver and skips any callbackintegrations.is_injectedalready marks; 0002 now says so.modern-di's kit "records aiogram as the documented Layer-1 outlier". The installedmodern_di3.4.0integrations.pymodule docstring describes Layer 1 and Layer 2 but names no framework, andaiogramappears nowhere in that package. The record also dated the kit tomodern-di2.28 while this package now pinsmodern-di>=3,<4. Both go away with the record.dialog.pyimportsFromDIand the private helper_fetch_child_container, not the key constant; 0001 now says "its private container lookup".Gates
pytest -q tests/test_adr_citations.pypytest -q(full suite)ruff format --checkruff check --no-fixeof-fixer . --checklychee --offline --no-progressover both ADRs,docs/agents/domain.md,CONTEXT.md,AGENTS.mdNo Python changed, so the two Python gates only confirm the tree is still clean.