Skip to content

[AAASM-4918] 👷 (ci): Gate README version drift against the SoT#286

Merged
Chisanan232 merged 3 commits into
masterfrom
v0.0.1/AAASM-4918/ci/version_drift_gate
Jul 20, 2026
Merged

[AAASM-4918] 👷 (ci): Gate README version drift against the SoT#286
Chisanan232 merged 3 commits into
masterfrom
v0.0.1/AAASM-4918/ci/version_drift_gate

Conversation

@Chisanan232

@Chisanan232 Chisanan232 commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Description

Brings the python-sdk README aasm --version sample-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 --check gate 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. The pyproject.toml [project].version anchor 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 --check reads the pyproject.toml anchor and fails if any aasm <version> sample literal in the README drifts from it (stdlib only: tomllib + re).
  • .github/workflows/readme-version-check.yml wires it as a blocking PR job (modeled on quickstart-tabs-check.yml), triggered by README.md / pyproject.toml / the script / the workflow.
  • Documented in CONTRIBUTING.md (new subsection + PR-checklist item) and .claude/CLAUDE.md.

Type of Change

  • ✨ New feature (CI drift gate)

Breaking Changes

  • No

Related Issues

Testing

Validated locally with Python 3.12:

  • Clean tree → check_readme_version.py --check exits 0.

  • Staling the sample line (rc6rc5) → 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 / mypy clean on the new script; actionlint clean 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

  • Code follows project style guidelines
  • Self-review completed
  • Comments added for complex logic
  • Documentation updated if needed
  • All tests passing

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.
@Chisanan232

Copy link
Copy Markdown
Contributor Author

Review — ✅ ready

CI: 4/4 green, MERGEABLE (BLOCKED = required approval only). Scope (AAASM-4918): the README aasm --version sample literal had no drift protection; adds check_readme_version.py (reads pyproject version SoT, fails on drift) + blocking readme-version-check.yml + docs. Side-effects: none — new script + workflow + doc lines only, no product code (pytest unaffected). ruff/mypy/actionlint/pre-commit clean; validated green-red-green. Ready pending approval.

— Claude Code (automated review)

@Chisanan232
Chisanan232 merged commit a64f59c into master Jul 20, 2026
4 checks passed
@Chisanan232
Chisanan232 deleted the v0.0.1/AAASM-4918/ci/version_drift_gate branch July 20, 2026 05:51
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