Skip to content

feat: add version management and release workflow#82

Merged
RichardAtCT merged 9 commits intomainfrom
feat/version-management
Feb 21, 2026
Merged

feat: add version management and release workflow#82
RichardAtCT merged 9 commits intomainfrom
feat/version-management

Conversation

@RichardAtCT
Copy link
Copy Markdown
Owner

@RichardAtCT RichardAtCT commented Feb 21, 2026

Summary

  • Add GitHub Actions release workflow triggered by v* tags — runs lint + tests, creates GitHub Release with auto-generated notes, maintains rolling latest git tag
  • Add Makefile targets for version bumping (bump-patch, bump-minor, bump-major) that commit, tag, and push atomically
  • Switch src/__init__.py to read version from pyproject.toml via tomllib/importlib.metadata (single source of truth)
  • Update documentation (README, setup guide, development guide, CHANGELOG, CONTRIBUTING) with install-from-release instructions and version management workflow
  • Fix: guard against empty message text causing Telegram 400 errors

Test plan

  • git diff --stat main..HEAD shows no Docker files (Dockerfile, docker-compose.yml, .dockerignore, docker-entrypoint.sh)
  • git diff main..HEAD | grep -i docker returns zero matches
  • make test — 375 tests pass
  • make lint — mypy errors are pre-existing (461 errors on both main and this branch)
  • make version prints 1.2.0
  • python -c "from src import __version__; print(__version__)" prints 1.2.0
  • Test pre-release tag v1.2.1-rc1 triggered release workflow successfully
  • Release marked as pre-release (correct for -rc tag)
  • Rolling latest tag not updated for pre-release (correct behavior)
  • Test release cleaned up

RichardAtCT and others added 9 commits February 21, 2026 11:25
Add release.yml CI workflow for automated GitHub releases on version tags.
Add Makefile targets for version bumping (bump-patch, bump-minor, bump-major)
and release publishing. Update src/__init__.py with version reading.
Pre-release tags (-rc, -beta, -alpha) now only push a versioned image
tag (e.g. :1.3.0-rc1) without updating :latest, matching the existing
behavior for the rolling git latest tag.

https://claude.ai/code/session_0123DikMoukrLNDZnCiX2KEt
importlib.metadata reads from installed package metadata, which goes
stale when pyproject.toml changes without a `poetry install`. Switch
to reading pyproject.toml directly with tomllib (stdlib in 3.11+) as
the primary source, falling back to importlib.metadata for pip installs
where pyproject.toml isn't on disk.

https://claude.ai/code/session_0123DikMoukrLNDZnCiX2KEt
- README: add Docker/pip/source install options, version management section
- docs/setup.md: add Docker deployment section, multiple install methods
- docs/development.md: add version management section, updated make commands
- CONTRIBUTING.md: fix Python version requirement to 3.11+
- CHANGELOG.md: add version management & distribution entry
- SYSTEMD_SETUP.md: add Docker alternative callout

https://claude.ai/code/session_0123DikMoukrLNDZnCiX2KEt
On each stable release (non-prerelease), the release workflow now
force-updates a `latest` git tag so users can install with:
  pip install git+https://...@latest

https://claude.ai/code/session_0123DikMoukrLNDZnCiX2KEt
When Claude SDK returns empty/whitespace content, the formatting pipeline
produced FormattedMessage("") that passed through all guards and hit
Telegram's API, causing "Message text is empty" 400 errors.

Added defense-in-depth: _split_message() rejects empty input,
format_claude_response() filters empty messages, and agentic_text()
skips empty messages at send time.
Strip Docker-specific content (Docker install option, docker-compose
commands, GHCR image references, docker-build targets) from README,
docs/setup.md, docs/development.md, CHANGELOG.md, and release.yml
to keep this PR focused on version management only.
The PEP 621 migration moved version from [tool.poetry] to [project],
but __init__.py still read from the old path, causing it to fall back
to stale importlib.metadata returning 0.1.0 instead of 1.2.0.
- Replace $(eval)/$(shell) with shell variables in bump-* and release
  targets — $(eval) evaluates at parse time, causing the pre-bump
  version to be used for commit messages and tags
- Merge push into bump-* targets so commit + tag reach the remote
  atomically (prevents orphan tags)
- Change CI from `poetry lock && poetry install` to
  `poetry install --no-interaction` for reproducible builds
- Remove unused "Generate release notes" step (softprops action
  handles this via generate_release_notes: true)
- Update docs to reflect single-step bump+push workflow
@RichardAtCT RichardAtCT merged commit 4906655 into main Feb 21, 2026
3 checks passed
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.

2 participants