LESSON 8

Version Management

Number and track software consistently: semantic versioning, commit conventions, tagging, artifact and API versions, dependency versions, changelogs, and automated release notes.

Introduction

“Which version is running in production?” should have a one-line answer. “What changed between the version before and this one?” should have another. “Which commit produced this image?” a third.

Version management is the discipline that makes those questions answerable. Without it, incident response, rollbacks, support, and audits all become detective work.

Learning Objectives

  • Choose and apply a versioning scheme, including semantic versioning.
  • Version artifacts, APIs, database schemas, and documentation consistently.
  • Link versions to commits, builds, and deployments for traceability.
  • Use commit conventions and tags to automate version and changelog generation.
  • Manage dependency versions deliberately.
  • Support more than one version when necessary.
  • Use AI to draft release notes and detect versioning mistakes.

1. What Needs a Version

Thing Why it needs one Typical scheme
Application release What users and teams talk about Semantic version (0.1.0)
Build artifact (image) Exactly what is deployed Release version plus commit and digest
Public API Compatibility promises to clients Major version in the path or header (v1)
Database schema Order of migrations Migration sequence or timestamp
Configuration schema Compatibility between code and config Schema version
Message formats Queue compatibility across versions Version field in the message
Infrastructure modules Reproducibility Module version tags
Documentation Matching docs to releases Same version as the application
Dependencies Reproducible builds and security Locked exact versions

Keep them related but not identical. The API major version changes rarely; the application version changes every release; migrations number independently.

2. Semantic Versioning

Semantic versioning uses MAJOR.MINOR.PATCH:

Part Increment when Example
MAJOR You make an incompatible change to the public interface 1.4.2 to 2.0.0
MINOR You add functionality in a backward-compatible way 1.4.2 to 1.5.0
PATCH You make backward-compatible bug fixes 1.4.2 to 1.4.3

Details:

  • Pre-1.0 versions (0.y.z) signal that anything may change. SignalDesk’s pilot is 0.x.
  • Pre-release and build metadata: 0.2.0-rc.1 for a release candidate; 0.2.0+build.57 for metadata that does not affect precedence.
  • Define the public interface that the version describes. For a web service, it is mainly the API contract and documented behavior. Internal code changes do not change it.
  • Be honest about breaking changes. Tightening validation, removing a field, or changing an error code can break clients (lesson 4 of the documentation course); treat them as major changes after 1.0, or as clearly announced changes before.

Some products use calendar versioning (for example 2026.12) when releases are time-based and compatibility is not the main signal. Either scheme works if applied consistently and documented. Do not mix schemes.

3. Conventional Commits and Automation

If commit messages follow a convention, the next version and the changelog can be derived automatically.

1
2
3
4
5
6
7
feat(import): reject rows with future dates
fix(api): return 404 for imports in other workspaces
docs: update the CSV format reference
refactor(worker): extract retry policy
feat(api)!: remove the deprecated /v0 import endpoint

BREAKING CHANGE: clients must use /v1/workspaces/{id}/imports
Prefix Meaning Version effect
fix Bug fix PATCH
feat New capability MINOR
! or BREAKING CHANGE Incompatible change MAJOR
docs, refactor, test, chore, ci No user-visible change None

Enforce the convention with a commit or pull-request-title check, so that the data is reliable. Where automation derives the version, a human still reviews it before release.

4. Tags, Releases, and Traceability

A tag marks the exact commit of a release, and it is the link that holds everything together.

1
2
git tag -a v0.1.0 -m "SignalDesk 0.1.0 (pilot)"
git push origin v0.1.0

Rules:

  • Tag the commit that produced the released artifact, and never move or reuse a tag. If it was wrong, release a new version.
  • Sign tags where your process requires verification.
  • Pipeline-created releases: pushing a tag triggers the release stages, which build or select the tested artifact, publish it, and create the release record.
  • Embed the version in the artifact and expose it: an endpoint such as /version returning the version, commit, and build time; a log line at startup; an image label.
  • Record deployment events: which version went to which environment, when, and who approved.

With these, you can answer: which commit is in production, what changed since the previous release, and which image to roll back to.

1
2
3
4
5
6
{
  "version": "0.1.0",
  "commit": "abc1234",
  "built_at": "2026-12-04T09:15:00Z",
  "image_digest": "sha256:..."
}

5. Branching and Versions

  • Trunk-based with release tags is simplest: main is always releasable; tags mark releases.
  • Release branches (release/0.1) are needed only to support older versions while main moves on. A hotfix is made on the release branch, tagged as a patch, and merged back to main.
  • Do not let long-lived branches diverge; each one multiplies testing and documentation work.
  • Support policy: state which versions receive fixes, and for how long. Supporting many versions is expensive, so choose deliberately. For a pilot, support only the latest.

6. API Versioning

Version the API separately from the application, and decide how.

Approach Example Notes
Path /v1/imports Visible, simple, cache-friendly
Header API-Version: 2026-12-01 Cleaner URLs, less visible
Date-based A dated version per client Flexible, more complex

Whatever you choose:

  • Define what counts as breaking and what is additive.
  • Prefer additive change within a version.
  • Publish a deprecation policy with timelines and migration guides (lesson 4 of the documentation course).
  • Run two versions in parallel during a migration window, and monitor remaining usage of the old one before removal.
  • Detect breaking changes automatically by diffing the contract between releases in the pipeline.

7. Managing Dependency Versions

Third-party dependencies are part of your versioning story.

  • Lock exact versions (lock files) so that builds are reproducible, and commit the lock file.
  • Pin base images, tools, and pipeline plugins (lessons 2 and 3).
  • Update regularly in small steps, using automated update proposals, and let the pipeline test each. Large, rare upgrades are risky; small, frequent ones are routine.
  • Read the changelog for major upgrades, and check for breaking changes and security fixes.
  • Track vulnerabilities in the versions you use (the security course covers this in depth).
  • Record why a dependency is pinned to an old version, with an expiry for reconsidering.
  • Generate a bill of materials for each release, listing the exact components.

8. Changelogs and Release Notes

Two related documents with different readers:

Document Reader Content
Changelog Developers, integrators All notable changes by version, grouped: added, changed, deprecated, removed, fixed, security
Release notes Users, support, stakeholders What changed for them, in plain language; known issues; required actions

Keep both in the repository, update them as part of each pull request or generate drafts from commit messages and merged pull requests, then edit by a person.

Rules:

  • Write for the reader, not as a list of commit messages.
  • Highlight breaking changes, deprecations, and required actions at the top.
  • Link to the relevant documentation for each change.
  • Never claim a fix that was not verified.
  • Date each release and keep old entries.
  • Include security fixes with appropriate care about disclosure.

9. Common Mistakes

  • Reusing or moving tags.
  • Deploying latest or untagged images.
  • Versions defined in several files that drift apart.
  • Calling a breaking change a minor release.
  • No way to ask a running system what version it is.
  • A changelog written from memory after the release.
  • Many supported versions with no support policy.
  • Lock files not committed, so builds change without a commit.

10. Using AI for Version Management

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Act as a release engineer preparing release notes and a version
decision.

Inputs:
- Commits and merged pull requests since the last tag: [paste]
- The API contract diff between the last release and this one:
  [paste]
- Database migrations and configuration changes: [paste]
- The versioning policy and the changelog and release notes
  templates: [paste]

Tasks:
1. Propose the next version, with reasons. List every change that
   could be a breaking change to the API or documented behavior.
2. Draft the changelog entry grouped by type, using only the inputs.
3. Draft user-facing release notes in plain language, including
   required actions and deprecations.
4. List commits that lack a clear type, or that do not match their
   description, as questions.
5. List changes in the contract diff that have no matching entry,
   and entries with no matching change.

Do not claim a fix is verified. Mark uncertainty.

Models are good at turning a long commit list into readable notes and bad at knowing what is breaking. Have an engineer verify every item marked as breaking or not breaking against the contract diff and tests. A contract diff tool, rather than the model, should be the source of truth for API compatibility.

11. Practical Exercise

For SignalDesk (or your project):

  1. Write the versioning policy: scheme, public interface, what counts as breaking, pre-release naming, and the support policy.
  2. Adopt a commit convention, and add a check to the pipeline.
  3. Automate the version computation and tag creation, with a human approval step.
  4. Embed the version, commit, and build time in the image and expose it through an endpoint and logs.
  5. Version the API and set up a contract diff check that flags breaking changes.
  6. Ensure all dependencies and tools are locked or pinned, and set up automated update proposals.
  7. Generate a changelog and release notes drafts, and edit them for the release candidate.
  8. Produce a software bill of materials for the artifact.
  9. Run the AI prompt, verify the breaking-change claims against the contract diff, and correct the notes.
  10. Answer the three traceability questions (which version is running, what changed, which image to roll back to) for staging, using only the pipeline’s records.

Verification

You are ready to continue when:

  • A written policy defines the scheme, breaking changes, and the support policy.
  • The running system reports its version and commit.
  • Tags are created by the pipeline for the exact tested artifact, and are never moved.
  • The pipeline flags breaking API changes automatically.
  • Dependencies are locked, and updates arrive in small, tested steps.
  • Changelog and release notes exist, are accurate, and highlight actions and deprecations.
  • You can trace any deployment from the running version to its commit and back to its changes.

Key Takeaways

  • Versions make “what is running” and “what changed” answerable.
  • Semantic versioning communicates compatibility; apply it to a defined public interface.
  • Tag the exact released commit, embed the version in the artifact, and never move tags.
  • Version APIs, schemas, and message formats deliberately, and detect breaking changes automatically.
  • AI drafts release notes from changes; people and tools verify compatibility claims.

What’s Next?

With a versioned, traceable release path in place, the next problem is inevitable: something fails. Next, we learn to troubleshoot pipelines and deployments systematically, with and without AI help.