Skip to content

test: adopt the stricter ADR citation check from lite-bootstrap - #120

Merged
lesnik512 merged 1 commit into
mainfrom
stricter-adr-check
Sep 27, 2026
Merged

lesnik512 merged 1 commit into
mainfrom
stricter-adr-check

Conversation

@lesnik512

Copy link
Copy Markdown
Member

What

Replaces tests/test_adr_citations.py with lite-bootstrap's version, ported onto the pytestconfig.rootpath root from #119. This is the file consumers fetch from main (eof-fixer today; 23 open PRs for the rest).

Behavioural changes for every consumer:

  • Bare ADR-NNNN citations are checked (existence only: docs/adr/NNNN-*.md must exist). Previously only the docs/adr/NNNN-slug.md path form was.
  • .md and .toml are scanned as well as .py.
  • site/ (mkdocs output) is skipped.

The invariant test is renamed test_every_adr_citation_in_the_repo_resolves. Two tests added for the new forms.

Dry run

The new file was run with pytest --rootdir=. against origin/main of every repo:

  • This repo: 134 passed, 29 skipped.
  • 24 of 25 consumers pass.
  • that-depends fails: docs/agents/domain.md cites ADR-0007. That line is an illustrative example in agent guidance ("Contradicts ADR-0007 (event-sourced orders), but worth reopening because…"); the repo has no docs/adr/ at all. The same text is in fastapi-sqlalchemy-template and litestar-sqlalchemy-template, which are outside the mechanism (no copy of the test) but fail the same way.

So merging this turns that-depends red on its next adr-check run until that example line is reworded (for example ADR-NNNN), or the rule learns to ignore it. That is the intended pilot signal, not a reason to hold the PR, but the order of merges matters.

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