Skip to content

docs(adr): compress to 1 record in the domain-modeling format - #52

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 1 record (301 words) to 1 (151 words), a single paragraph, in the shape
ADR-FORMAT.md asks for. The record survives the admission test, so nothing is dropped, merged or
renumbered. Same treatment as modern-python/compose2pod#102.

Evaluation

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

Old Outcome New Reason
0001 expose installs into modules only; no FixtureSet install seam kept, compressed 0001 A standing "no" on a public-surface seam: a reader who sees the bare setattr loop will propose extracting it, which is exactly the surprise an ADR exists to pre-empt, and the two-adapters rule is the real trade-off.

The rewrite drops the **Decision:** line, the **Revisit trigger:** block and the
"the test suite collapsed accordingly" narrative. The revisit trigger folds into the closing clause,
because the arrival of a second install target is the actual boundary of the decision, not an
afterthought.

Citations

None moved. The only citation in the repo is the ADR-0001 example in docs/agents/domain.md, and
both its number and its parenthetical title are still accurate. The repo-wide sweep for
adr/NNNN… / ADR-NNNN finds no old or dropped number.

Stale claims corrected

  • The old record credited _collect_fixtures with "discovery, the skip-non-Provider rule,
    cross-group collision detection". Only the collision check is its own: discovery and the
    skip-non-Provider filter live in modern_di.Group.get_named_providers(). The rewrite says what
    _collect_fixtures actually does, which also includes the TypeError on an empty call that the
    old record never mentioned.
  • "the public surface stays at two symbols" is now named concretely, expose and
    modern_di_fixture, matching modern_di_pytest/__init__.__all__.

Everything else verified against modern_di_pytest/factory.py: _collect_fixtures is private and
pure, the install targets are the inspect.stack() caller module and module=, both
types.ModuleType, and the install step is a setattr loop over the returned mapping.

Gates

  • pytest -q tests/test_adr_citations.py: 7 passed.
  • pytest -q (whole suite, 25 tests): passed. No directory needs external services.
  • eof-fixer . --check: clean.
  • lychee --offline over the touched ADR plus CONTEXT.md and AGENTS.md: 2 OK, 0 errors.
  • ruff format --check / ruff check --no-fix: skipped, no Python touched.

0001 kept and rewritten as a single paragraph, 301 words to 151. No
records dropped or merged; the numbering and slug are unchanged, so no
citation moved. Corrected a stale claim: the skip-non-Provider rule
lives in modern_di.Group.get_named_providers, not in _collect_fixtures.
@lesnik512
lesnik512 merged commit 240f922 into main Sep 19, 2026
8 checks passed
@lesnik512
lesnik512 deleted the docs/compress-adrs branch September 19, 2026 11:29
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