Docs: move legacy FastAPI notes out of CLAUDE.md into docs/legacy-fastapi-notes.md

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
davideandClaude Sonnet 5.5 committed 2026-11-16 14:53:45 +01:00
1 parent 58d1a38ac0
commit 3d1e820564
9 files changed
+525 -488

No files matched your search

+6 -4
View File
@@ -18,6 +18,8 @@ import pytest
_ROOT = Path(__file__).resolve().parents[2]
CLAUDE_MD = (_ROOT / "CLAUDE.md").read_text(encoding="utf-8")
# The old stack's reference notes were moved out of CLAUDE.md to keep it short; they are checked like it.
LEGACY_NOTES = (_ROOT / "docs" / "legacy-fastapi-notes.md").read_text(encoding="utf-8")
README = (_ROOT / "README.md").read_text(encoding="utf-8")
@@ -36,7 +38,7 @@ def _collected_test_count() -> int:
def test_documented_test_counts_match_reality():
actual = _collected_test_count()
documented = [int(n) for n in re.findall(r"(\d+) tests\b", CLAUDE_MD)]
documented = [int(n) for n in re.findall(r"(\d+) tests\b", CLAUDE_MD + LEGACY_NOTES)]
documented += [int(n) for n in re.findall(r"(\d+) unit tests\b", README)]
assert documented, "no test count found in CLAUDE.md or README — did the wording change?"
for count in documented:
@@ -54,7 +56,7 @@ def test_documented_test_counts_match_reality():
],
)
def test_claude_md_has_no_stale_claims(stale):
assert stale not in CLAUDE_MD
assert stale not in CLAUDE_MD and stale not in LEGACY_NOTES
@pytest.mark.parametrize(
@@ -62,7 +64,7 @@ def test_claude_md_has_no_stale_claims(stale):
["rate_limit.py", "client_ip.py", "bug_reports"],
)
def test_code_map_covers_every_package_member(module):
code_map = CLAUDE_MD.split("## Code map", 1)[1].split("## Background tasks", 1)[0]
code_map = LEGACY_NOTES.split("## Code map", 1)[1].split("## Background tasks", 1)[0]
assert module in code_map
@@ -87,5 +89,5 @@ def test_claude_md_anchors_into_itself_resolve():
for line in CLAUDE_MD.splitlines()
if line.startswith("#")
}
for anchor in re.findall(r"\(CLAUDE\.md#([a-z0-9-]+)\)", README + CLAUDE_MD):
for anchor in re.findall(r"\(CLAUDE\.md#([a-z0-9-]+)\)", README + CLAUDE_MD + LEGACY_NOTES):
assert anchor in headings, f"anchor #{anchor} matches no CLAUDE.md heading"