Wiki
猫Table of Contents
- Semver and Releases
- Sources of truth
- What counts as public API
- What is a breaking change
- How version numbers are chosen
- Release candidates
- Changelog mapping
- Latest published tag versus next version
- Breaking-change policy during normal development
- What usually belongs in a changelog entry
- Maintainer checklist before release-related edits
- Related pages
Semver and Releases
Russian version: Semver-and-Releases-RU
This page is for maintainers and contributors who need the project's release rules in one place. It complements SEMVER.md, the changelog, and the repository workflow rules in AGENTS.md.
Sources of truth
For release and compatibility work, keep these files aligned:
SEMVER.mdfor the project's semantic-versioning policy;CHANGELOG.mdfor user-visible changes grouped by target version;utils/version.gofor the version constants currently declared in code;AGENTS.mdfor repository workflow rules around changelog updates and breaking changes.
What counts as public API
The public API includes:
- exported identifiers in package
laniakea; - exported identifiers in package
tgapi; - documented behavior in
README.md,README_RU.md, and package godoc.
That means compatibility is not only about function names. Behavioral guarantees documented for callers also count.
Examples of public API surface:
- handler signatures;
- exported helper methods such as
AnswerLong(...); - exported request and response DTOs in
tgapi; - callback payload behavior when documented as stable.
What is a breaking change
A change requires a major version bump when it breaks existing callers or documented expectations.
Typical breaking changes include:
- renaming or removing exported identifiers;
- changing exported function or method signatures;
- changing struct field names or JSON wire compatibility in
tgapi; - changing documented behavior in a way that breaks existing bots.
Examples from the current release-candidate history:
- changing
CommandExecutorto returnerror; - changing
NewBot(...)to return(*Bot[T], error); - renaming
BaseMenuButtontoMenuButton; - changing shutdown methods such as
Bot.Close(ctx)toBot.Close().
How version numbers are chosen
The project follows semantic versioning with prerelease builds.
In broad terms:
- major version: required for breaking public API changes;
- minor version: backward-compatible additions;
- patch version: backward-compatible fixes and clarifications;
-rc.N: prerelease iteration before the stable release line.
The current code declares its version in utils/version.go:
VersionStringVersionMajorVersionMinorVersionPatchVersionBeta
Release candidates
The project is currently in the 1.0.0-rc.N phase.
This means:
- API adjustments can still happen before
v1.0.0; - changelog sections should still be written carefully and explicitly;
- once
v1.0.0is released, breaking changes should require a new major version under the documented policy.
Even during RCs, treating compatibility seriously is still useful because users may already be building real bots against these versions.
Changelog mapping
Each user-visible code or documentation change in the main repository should be recorded in CHANGELOG.md under the next target version section.
Repository rules currently require:
- changes in the main repository update
CHANGELOG.md; - wiki-only changes in
.wiki/do not require main changelog updates; - changelog entries must go into the section for the next version after the latest published tag;
- the target changelog version must match
utils/version.go.
This keeps three things synchronized:
- the last published version in git tags;
- the declared next version in
CHANGELOG.md; - the version constants in code.
Latest published tag versus next version
The repository workflow distinguishes between:
- the latest published git tag;
- the next unreleased version section in
CHANGELOG.md; - the version currently declared in
utils/version.go.
The intended rule is:
- if the latest published tag is
vX.Y.Z, new work should land in the next version section, not the already published one; utils/version.goshould declare that same unreleased target version.
If these drift apart, the version story becomes ambiguous for users and maintainers.
Breaking-change policy during normal development
Repository workflow currently forbids unapproved breaking changes unless the target version is a new major version.
In practice, when a breaking change is requested, the preferred options are:
- avoid the breaking change;
- add a backward-compatible alternative;
- bump the major version first, then make the break.
This is especially relevant for:
- handler signatures;
- bot and plugin lifecycle APIs;
tgapiDTO and wire-format compatibility;- callback payload defaults and semantics.
What usually belongs in a changelog entry
Good changelog entries describe user-visible effects such as:
- new helpers or methods;
- fixed runtime behavior;
- changed defaults;
- renamed or removed APIs;
- newly enforced validation or decoding behavior.
Low-level internal refactors without user-visible effects usually do not need prominent changelog language unless they affect documented guarantees.
Maintainer checklist before release-related edits
Before editing version or changelog data:
- inspect the latest published git tag;
- inspect the target section in
CHANGELOG.md; - inspect
utils/version.go; - decide whether the change is additive, fixing, or breaking;
- confirm that the chosen version level matches that impact.
Related pages
- Migration for upgrade guidance across release candidates
- Bot-Lifecycle for runtime and single-use guarantees
Navigation
Start here
Runtime and Architecture
- Bot-Lifecycle
- Webhook-Runtime
- Middleware
- Runners
- Error-Handling
- Logging
- Update-Routing-Model
- Policies
- Scenes
Interaction and Telegram API
- Inline-Keyboards-and-Payloads
- Auto-Generated-Commands
- Drafts
- Rich-Messages
- Localization
- Rate-Limiting
- tgapi-Overview