Skip to content

ci: version-sync guard (package.json / pyproject / __init__) — Closes #102 - #570

Merged
wesleysimplicio merged 1 commit into
mainfrom
fix/issue-102-version-sync-guard
Aug 10, 2026
Merged

ci: version-sync guard (package.json / pyproject / __init__) — Closes #102#570
wesleysimplicio merged 1 commit into
mainfrom
fix/issue-102-version-sync-guard

Conversation

@wesleysimplicio

Copy link
Copy Markdown
Owner

Summary

Closes #102. Adds a Python version-sync guard and wires it into CI so a partial SemVer bump cannot merge or publish.

Changes

  • scripts/check-version-sync.py (preferred) — compares package.json, pyproject.toml, and simplicio_mapper/__init__.py; exit 1 on mismatch
  • .github/workflows/version-sync.yml — runs on PR/push to main
  • publish-pypi.yml — same guard before tag/version verification
  • __init__.pyimportlib.metadata.version("simplicio-mapper") with static fallback string (still the SoT for the file guard)
  • Docs.specs/workflow/RELEASE.md triple-file bump checklist; CONTRIBUTING/AGENTS/CLAUDE/scripts README
  • Teststests/python/test_check_version_sync.py (align + deliberate mismatch)

Legacy scripts/check-version-sync.js kept as a twin with the same contract.

Verification (MEASURED)

python scripts/check-version-sync.py          # exit 0 — version 0.26.18 aligned
python -m pytest tests/python/test_check_version_sync.py -q  # 6 passed
# deliberate mismatch fixture → exit 1 with per-file report

Acceptance criteria

  • Deliberate mismatch fails the checker (exit 1)
  • Check runs automatically on PR (version-sync.yml)
  • Static __version__ stays aligned with both manifests (importlib optional override at runtime)

Closes #102.

- scripts/check-version-sync.py (preferred) aligns npm, PyPI, and __version__
- CI workflow version-sync.yml runs on PR/push to main
- publish-pypi.yml runs the same guard before tag verification
- __version__ prefers importlib.metadata with static fallback for source trees
- RELEASE/CONTRIBUTING docs: single-commit triple-file bump checklist
- unit tests for align/mismatch paths; deliberate mismatch exits 1
@wesleysimplicio
wesleysimplicio merged commit df59ea3 into main Aug 10, 2026
1 check failed
@wesleysimplicio
wesleysimplicio deleted the fix/issue-102-version-sync-guard branch August 10, 2026 21:02
@github-project-automation github-project-automation Bot moved this from Backlog to Done in Simplicio - Mapper Aug 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Add a version-sync guard across package.json, pyproject.toml, and __init__.py

1 participant