Skip to content

fix(version): resolve __version__ from importlib.metadata#1

Merged
sunjin12 merged 1 commit intomainfrom
fix/version-importlib-metadata
Apr 19, 2026
Merged

fix(version): resolve __version__ from importlib.metadata#1
sunjin12 merged 1 commit intomainfrom
fix/version-importlib-metadata

Conversation

@sunjin12
Copy link
Copy Markdown
Owner

Caught day after v0.1.0 shipped. Invariant test prevents regression.

Both cli/ossmate and mcp/ossmate_mcp had `__version__ = "0.0.1"` literals
in their __init__.py — bump_version.py never touched these so `ossmate
version` printed "0.0.1" while pip showed 0.1.0. Now both read from
importlib.metadata.version() and agree with the installed wheel.

Adds invariant test test_init_modules_dont_hardcode_versions to forbid
the hardcoded form. Caught one day after v0.1.0 shipped — will roll into
the next release rather than burning a 0.1.1 cycle.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@sunjin12 sunjin12 merged commit a6787ea into main Apr 19, 2026
2 of 10 checks passed
@sunjin12 sunjin12 deleted the fix/version-importlib-metadata branch April 19, 2026 15:04
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