You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feat]: Keep all components aligned on the same version at any commit #830
Today the MemMachine mono-repo produces many artefacts (server, Python-client SDK, integration plugins, etc.).
When we cut a release, the tag is used as the single source of truth and everything is consistent.
However, if a developer builds directly from main (e.g. uv build --project packages/client) the produced wheel still carries the hard-coded version 0.1.0, which is confusing and makes it impossible to know whether two locally-built artefacts are actually compatible with each other.
Describe the solution you'd like
Provide a mechanism that guarantees every component built from any commit reports the same version string that would be used if that commit were released.
I think we can derive the version from the latest reachable tag and then use it in all components build.
Thank you for raising this important issue. You’re absolutely right: having a hard-coded version (e.g., 0.1.0 in pyproject.toml) leads to confusion, especially when building artifacts directly from the main branch, as those artifacts may not match an actual released version. Although your current CI setup uses sed to update the version during builds, this doesn’t help when building locally or guarantee that static version files in the repo stay in sync.
Recommended Solution: SCM-Based Versioning
The industry best practice for synchronizing versions across all builds (CI or local, tagged or main) is to derive the version directly from your source control tags and commits using an SCM-based versioning tool.
What to Change – uv Build System with SCM Versioning
uv has built-in support for SCM versioning via the scm-version field.
Replace the hard-coded version field in your Python packages’ pyproject.toml with:
[project]
name = "memmachine-client"scm-version = true
Remove any version = "..." field in [project].
This tells uv to derive the version from the nearest Git tag at build/install time, just like setuptools_scm.
This will yield versions like 0.1.0 (on a tag) or 0.1.0.dev34+gabcdef1 (if 34 commits after the tag).
Hi @Kevin-K-W@sscargal, thanks for opening this and for the detailed versioning solution! One quick question: once the memmachine-server is up and running, is there a way to retrieve this SCM-derived version? I think having that visibility would be really helpful for us to quickly identify exactly which version is active.
Activity
sscargal commentedon Dec 18, 2025
Thank you for raising this important issue. You’re absolutely right: having a hard-coded version (e.g., 0.1.0 in pyproject.toml) leads to confusion, especially when building artifacts directly from the main branch, as those artifacts may not match an actual released version. Although your current CI setup uses sed to update the version during builds, this doesn’t help when building locally or guarantee that static version files in the repo stay in sync.
Recommended Solution: SCM-Based Versioning
The industry best practice for synchronizing versions across all builds (CI or local, tagged or main) is to derive the version directly from your source control tags and commits using an SCM-based versioning tool.
What to Change – uv Build System with SCM Versioning
1. Use
scm-versioninpyproject.tomluv has built-in support for SCM versioning via the
scm-versionfield.Replace the hard-coded version field in your Python packages’
pyproject.tomlwith:version = "..."field in[project].setuptools_scm.0.1.0(on a tag) or0.1.0.dev34+gabcdef1(if 34 commits after the tag).Documentation: https://docs.astral.sh/uv/guides/versioning/#scm-version
2. Remove All Static
__version__StringsWhere Python code expects a version string, use dynamic lookup based on the built package:
__version__in source files.3. Remove All sed/patching Steps From Workflows
.github/workflows/build-python.yml, remove the “Patch version in pyproject.toml” step and any sed-based version injections.patch-versioninputs in workflows such aspypi-publish.ymlandinstallation-test.yml, as SCM versioning makes these unnecessary.pyproject.toml—it should always be derived from git.4. Build Commands Stay the Same
uv build --project packages/clientwill now always yield a wheel with the correct SCM-derived version, both locally and in CI.5. Test
jgong commentedon Jan 7, 2026
Hi @Kevin-K-W @sscargal, thanks for opening this and for the detailed versioning solution! One quick question: once the memmachine-server is up and running, is there a way to retrieve this SCM-derived version? I think having that visibility would be really helpful for us to quickly identify exactly which version is active.
sscargal commentedon Jan 7, 2026
We should definitely do that. I'll create a new feature request as there are a few things we can do to improve identification using versioning.