Skip to content

ci: guard docs drift — mkdocs --strict as a PR check + link/anchor validation#126

Merged
lesnik512 merged 6 commits into
mainfrom
chore/docs-ci-drift-guard
Jul 5, 2026
Merged

ci: guard docs drift — mkdocs --strict as a PR check + link/anchor validation#126
lesnik512 merged 6 commits into
mainfrom
chore/docs-ci-drift-guard

Conversation

@lesnik512

Copy link
Copy Markdown
Member

Adds a PR-time guard against the documentation-drift class that the 2026-07-05 docs audit (#125) surfaced. Spec + rationale in planning/changes/2026-07-05.01-docs-ci-drift-guard/.

Problem

mkdocs build --strict runs only in docs.yml on push to main (for deploy), so a PR that breaks an internal link or orphans a page isn't caught until after merge. Broken #anchor fragments aren't caught at all, and docs/requirements.txt is unpinned (CI already warned about a breaking MkDocs 2.0).

Change

  • mkdocs.yml — add a validation: block (omitted_files/absolute_links/unrecognized_links/anchors: warn); under --strict these become errors, so broken links and #anchor fragments now fail the build. (mkdocs 1.6.1.) Verified with a negative test: a bad anchor aborts the build; the clean tree passes.
  • .github/workflows/_checks.yml — new parallel docs job running just docs-build, the same command as the deploy build, so PR-time and deploy-time can't diverge.
  • docs/requirements.txt — pin mkdocs>=1.6,<2, mkdocs-material>=9,<10 for a reproducible, MkDocs-2.0-proof build.
  • faststream_outbox/schema.py — fix the make_outbox_table docstring: the 63-byte guard binds on the longest derived identifier (an index name like <table>_pending_idx), not the shorter NOTIFY channel. Closes at the source the same wording the audit fixed in checklist.md.

Deliberately out of scope

No validation of Python inside docs/ code fences (syntax/type/execute) — the cost and false-positive noise on intentional fragments outweigh the value. Recorded with a revisit trigger in planning/decisions/2026-07-05-no-doc-code-fence-validation.md.

README audit (#3)

Audited README.md (outside docs_dir, so not covered by the guard) against source + docs: all code samples, symbols, kwargs, extras, and links verified — no drift found. One non-blocking note: README says idle latency "sub-100ms" where the docs give the tighter "~10ms"; left as a conservative claim.

🤖 Generated with Claude Code

lesnik512 and others added 6 commits July 5, 2026 11:24
Full-lane spec (design.md + plan.md) plus a decision recording why doc
code-fence validation is deliberately out of scope.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The guard binds on the longest derived identifier (an index/constraint name
like <table>_pending_idx), not the shorter NOTIFY channel outbox_<table>. Same
wording fixed in docs/operations/checklist.md by the 2026-07-05 docs audit.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@lesnik512 lesnik512 merged commit 1943ebb into main Jul 5, 2026
6 checks passed
@lesnik512 lesnik512 deleted the chore/docs-ci-drift-guard branch July 5, 2026 08:37
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