Versioning & Releases
Versioning & Releases
Section titled “Versioning & Releases”Kazma uses a fixed public base plus a live git commit id.
Format
Section titled “Format”| Piece | Example | Meaning |
|---|---|---|
| Public base (files) | 0.11.0 | Root pyproject.toml / kazma.yaml / package versions |
| Display version | 0.11.0+g4d37b2c | What CLI, banner, FastAPI, and UI show |
+g…… | PEP 440 local segment | Short git SHA (g = git) |
Why not bump 0.10.0 → 0.10.1 on every merge? That turned into
0.10 → 0.11 → 0.12 noise in one day. The SHA is the accurate
build identity; the base is a human milestone.
Source of truth
Section titled “Source of truth”| Location | Role |
|---|---|
Root pyproject.toml → project.version | Public base only (0.11.0) |
kazma.yaml → agent.version | Same public base |
kazma_core.version.get_version() | Runtime display: base+gSHA |
Git tag v0.11.0 | Optional milestone marker (no +) |
from kazma_core.version import get_version, get_base_version
get_base_version() # "0.11.0"get_version() # "0.11.0+g4d37b2c" (when git / CI SHA available)SHA resolution order
Section titled “SHA resolution order”KAZMA_GIT_SHA(optional override)GITHUB_SHA(Actions)git rev-parse --short=7 HEAD- No SHA → show base alone (installed wheel without
.git)
What is NOT automated
Section titled “What is NOT automated”| Former behaviour | Now |
|---|---|
Push to main → auto patch bump | Disabled (.github/workflows/version-bump.yml is a no-op) |
feat: → minor leap | Gone |
CI rewrites pyproject.toml | Never |
When to change the base (0.10.0 → 0.10.1 / 0.11.0)
Section titled “When to change the base (0.10.0 → 0.10.1 / 0.11.0)”Only for a deliberate product milestone:
- Edit all base sites to the new public version (no
+g…in files):pyproject.tomlkazma.yaml→agent.versionkazma-gateway/pyproject.tomlkazma-tuifalls through tokazma_core.version(no hardcode needed)
- Commit:
chore(version): base 0.10.0 → 0.10.1 - Optionally run Actions → Release to create tag
v0.10.1+ GitHub Release
Do not put +gSHA into committed version files. Display code adds it.
Manual Release workflow
Section titled “Manual Release workflow”.github/workflows/release.yml (workflow_dispatch only):
- Resolves
basefrompyproject.toml+ short SHA fromHEAD - Optionally creates annotated tag
v{base}if missing - Creates/updates a GitHub Release noting the full
base+gSHA - Does not edit version files
Local check
Section titled “Local check”python -c "from kazma_core.version import get_version; print(get_version())"# → 0.10.0+g4d37b2cWhat not to do
Section titled “What not to do”- Do not re-enable auto bump on push to
main - Do not store
0.10.0+g…inpyproject.toml(packaging noise; SHA goes stale)