[AAASM-4918] 👷 (ci): Gate README version drift against the SoT#286
Merged
Conversation
The README `aasm --version` sample output is a hand-typed version literal (ADR 0013 tag [B], Appendix B item 4) sitting outside the pyproject.toml version anchor. Add a scoped orphan-literal audit that reads the anchor (the SoT) and exits non-zero when any `aasm <version>` sample in the README drifts from it, so a stale sample output fails the build. Refs AAASM-4918.
Wire scripts/check_readme_version.py --check as a blocking PR job, modeled on quickstart-tabs-check.yml. Triggers on README.md / pyproject.toml / the script / the workflow so a stale sample-output version can never merge. Refs AAASM-4918.
Record the SoT rule (pyproject anchor) and the blocking check in CONTRIBUTING.md (new subsection + PR checklist item) and .claude/CLAUDE.md gotchas, per ADR 0013 and the AAASM-4918 acceptance criteria. Refs AAASM-4918.
Contributor
Author
Review — ✅ readyCI: 4/4 green, MERGEABLE (BLOCKED = required approval only). Scope (AAASM-4918): the README — Claude Code (automated review) |
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.
Description
Brings the
python-sdkREADMEaasm --versionsample-output line under a blocking version-drift gate, per ADR 0013 (version-metadata SoT & drift gate) and its Appendix B item 4. Subtask of AAASM-4911 (rollout of the--checkgate to version-bearing repos).The README sample output (
# e.g. aasm 0.0.1rc6, README.md:96) was a hand-typed version literal (ADR tag[B]) sitting outside any generator. Thepyproject.toml[project].versionanchor is this repo's single source of truth. Rather than stand up a full generator pipeline for one line, this adds the ADR's alternative — a scoped orphan-literal audit:scripts/check_readme_version.py --checkreads thepyproject.tomlanchor and fails if anyaasm <version>sample literal in the README drifts from it (stdlib only:tomllib+re)..github/workflows/readme-version-check.ymlwires it as a blocking PR job (modeled onquickstart-tabs-check.yml), triggered byREADME.md/pyproject.toml/ the script / the workflow.CONTRIBUTING.md(new subsection + PR-checklist item) and.claude/CLAUDE.md.Type of Change
Breaking Changes
Related Issues
Testing
Validated locally with Python 3.12:
Clean tree →
check_readme_version.py --checkexits 0.Staling the sample line (
rc6→rc5) → exits 1 with a drift message; restoring → 0 again (satisfies the AC "staling makes CI red; fixing makes CI green").ruff check/ruff format --check/mypyclean on the new script;actionlintclean on the workflow; pre-commit green on every commit.No product code touched — pytest is unaffected.
Unit tests added/updated
Integration tests added/updated
Manual testing performed
No tests required (CI-gate script; behavior verified via the red/green drift check above)
Checklist