Lesson 4 of 9 · 25m
Semver Discipline Under Pressure
Semantic versioning is a compatibility promise, not marketing. Learn how to classify changes, handle accidental breakage, and communicate deprecations.
Semantic versioning is simple to state and brutal to operate: MAJOR.MINOR.PATCH; breaking changes bump major, compatible features bump minor, compatible fixes bump patch. The hard part is that users do not experience intent, they experience behavior. If someone relied on it, breaking it is breaking it, even if the old behavior was undocumented, accidental, or stupid.
Compatibility is observed behavior
You can remove an internal helper from type definitions and break TypeScript consumers. You can tighten validation and break bad but deployed input. You can change an error message and break tests, log parsers, and incident runbooks. Hyrum's Law is not a joke; it is the ambient physics of public APIs.
New optional flag minor
Bug fix preserving public behavior patch
Renamed CLI flag major
Changed default timeout often major, sometimes severe minor
Dependency requirement increase depends on exposure and ecosystem normsThere is judgment involved. Dropping a Python version that users cannot reasonably deploy may justify a major even if your API surface did not change. Infrastructure projects often treat runtime support as part of compatibility because their users do.
Deprecation is a migration mechanism
A deprecation without time, detection, and documentation is just a threat. The pattern that respects users:
- Add the replacement.
- Emit warnings only in modes developers control, not noisy end-user production logs.
- Document migration with before/after examples.
- Wait a meaningful time window or minor-release cadence.
- Remove in a major with changelog and codemod if practical.
Zero versions are not a license for chaos
0.x semver says anything may change. That does not mean users enjoy arbitrary breakage. If your 0.18 line is widely deployed, use care anyway: incremental migration paths, release notes, feature flags. Projects sometimes stay on zero for years to avoid commitment. Users notice. Either the project is unstable, or the version numbers are lying.
Changelogs are operational artifacts
Keep a human-readable changelog keyed by version and date. Generated commit dumps are not changelogs. Users need risk assessment: security fixes, breaking changes, migration steps, deprecations, notable fixes.
## [2.4.0] - 2026-02-14
### Added
- `--json` output for `widgets inspect`.
### Deprecated
- `WIDGETS_LEGACY_CONFIG`; migrate to `widgets.toml`.
### Fixed
- Retry transient S3 upload failures instead of failing the release.Accidental breakage happens
If you ship a breaking change in a patch release, own it fast. Options include a corrective patch restoring behavior, yanking the release, documenting a workaround, or accelerating the next major if restoration is impossible. The worst response is arguing that downstream users were wrong to depend on reality.
Field notes
- Version numbers are cheap compared with user trust. When unsure whether it is breaking, treat it as breaking.
- Pre-release tags (
2.0.0-beta.1) are for integration feedback, not a way to trap users into unstable upgrades. - Conventional commits can help generate release notes, but humans still classify user-facing impact.
- API, CLI output, config schema, wire protocol, and database migrations all have compatibility surfaces.
- Your version policy is part of security posture. Users stuck behind painful majors stop receiving patches.
Was this lesson helpful?