Skip to content

Releases and versioning

Taflor has one product version for everything it publishes. The interfaces inside it (the wire protocol, the plugin API, the server API, the manifest format) carry versions of their own, which change only when that interface changes. This page explains both, how a release is made, and what a host that pins one release (PhaseSix, for example) can rely on.

Taflor is maintained alongside PhaseSix, without a support promise: issues are triaged when time allows, and security reports go to the contact in SECURITY.md (§13.5).

The product version

  • One version, semantic versioning MAJOR.MINOR.PATCH, for the whole repository: the Python package taflor-server and the npm packages @taflor/protocol, @taflor/client and @taflor/testkit always carry the same number.
  • The file VERSION in the repository root is the single source. scripts/version.py copies it into taflor_server.__version__ (which the wheel reads) and into every package.json, and the checks fail when a copy disagrees.
  • Between releases, main carries the next version as a development version: 0.2.0.dev0 in Python (PEP 440), 0.2.0-dev.0 for npm. Only a release commit carries a plain X.Y.Z.
  • Releases are tagged with an annotated tag of the plain number, 0.1.0, without a v.

Until 1.0, the first standalone release (§14.5), versions are 0.x:

release content
PATCH (0.3.1) bug fixes only; never breaks anything
MINOR (0.4.0) a finished step or milestone; may contain breaking changes, which its changelog marks as such
1.0.0 the first standalone release (milestones M1-M4 done)

From 1.0 on, the usual semver rules hold: MINOR adds and deprecates, only MAJOR removes or breaks.

Versions inside the product

The product version says which release you run. The interface versions say whether two pieces built against different releases still fit together. They are independent of the product version and of each other (§3.7):

interface version who reads it when it changes
wire protocol PROTOCOL_VERSION, an integer (§6.2) the client and the server, at every socket connection when an old client and a new server (or the reverse) no longer work together: removed or renamed fields or messages, changed meaning. Optional additions don't raise it. Plugins never raise it
plugin API (ctx, @taflor/api) API_VERSION, semver client plugins, in api: "^1.2" of their manifest MINOR adds, MAJOR breaks; deprecations warn with since/until for at least one minor
server API (taflor_server.api) semver (§9.4) server extensions and hosts, as a PEP 440 range the same rules; anything not exported there is private
manifest format manifestVersion, an integer the plugin installer when table-plugin.json changes incompatibly; the server accepts the current and the previous one
sheet protocol v, an integer in the handshake (§7.14) sheets and the table both sides announce the versions they support

How they relate to the product version:

  • A release carries exactly one value of each. @taflor/protocol exports PROTOCOL_VERSION and API_VERSION for that release.
  • The client and the server ship in the same taflor-server release, so within one deployment they always agree on PROTOCOL_VERSION (§3.1). A browser tab still open on an older client is closed with code 4426 and reloads once (§6.2).
  • When a release changes an interface version, its changelog says so and names the new value. A change to the protocol or an API is never hidden in a PATCH release.
  • After 1.0, a MAJOR of the server or plugin API needs a MAJOR of the product. Raising PROTOCOL_VERSION or manifestVersion does not by itself: clients come with the server, and the previous manifest format stays accepted.

Pinning a release

A host that embeds Taflor pins one exact release, as PhaseSix does in its uv.lock, from PyPI with hashes or from the tag on lorebase (§14.4). With such a pin it can rely on this:

  • The tag doesn't move. X.Y.Z always names the same commit. Its VERSION is X.Y.Z, and the release job builds the packages from that commit and publishes their sha256 sums.
  • Client and server match. The static files of the client are part of the wheel, so collectstatic installs the client of the same release, and the protocol versions agree.
  • The public surface is taflor_server.api (and the TableHost interface it implements). Imports from anywhere else in taflor_server may break in any release.
  • PATCH releases are safe to take: no change to an interface, no breaking change, no migration that changes existing data in a way the release before didn't expect.
  • Every other change is in the changelog, with breaking changes marked, deprecations with their since and until, and new interface versions named. Upgrading means reading the sections between the two releases, bumping the pin, manage.py migrate and collectstatic.
  • Migrations are append-only once released, from the release that freezes the initial migration (0001_taflor_initial, planned for 0.2.0) on. Before that, the initial migration may still be regenerated, and no host should run it on data it wants to keep.
  • Development is table-first: a change that needs both sides lands in Taflor first, backwards-compatible, in a release; the host then bumps its pin and adapts (§14.4).

What a pin doesn't give: before 1.0, a MINOR release may break the server API, with the changelog saying how. Hosts take MINOR releases deliberately, not automatically.

How a release is made

  1. Every merged change brings a changelog fragment in changes/ (see changes/README.md), or the pull request is labelled skip-changelog. CI checks that.
  2. When main is ready, its tree passes the full check (scripts/check.sh full, the same checks as CI).
  3. scripts/release.sh X.Y.Z on an up-to-date main sets VERSION to X.Y.Z, compiles the fragments into CHANGELOG.md, commits "Release X.Y.Z", creates the annotated tag X.Y.Z with the changelog section as its message, and starts the next development version (X.(Y+1).0.dev0, or a version given as the second argument). It never pushes.
  4. With the maintainer's OK, git push origin main X.Y.Z. The tag starts the release job (.forgejo/workflows/release.yml): all checks and tests, a check that the tag equals VERSION, then the bundled plugins' bundles and the sdist and wheel (scripts/build-packages.sh, which fails unless every code plugin in them has a fresh bundle), the npm tarballs, the release notes and SHA256SUMS. Publishing to PyPI and npm and the Forgejo release are part of the job but switched off until their tokens exist; the container image comes with milestone M1.
  5. Hosts that pin Taflor hear of the release with its number, date and a short summary.

Publishing and its secrets

The publish job of .forgejo/workflows/release.yml uploads what the build job made. It stays switched off (if: false) until these Forgejo secrets exist on the repository:

secret what it is scope
PYPI_TOKEN_PROTOCOL a PyPI API token the project taflor-protocol only
PYPI_TOKEN_SERVER a PyPI API token the project taflor-server only
NPM_TOKEN an npm granular access token read and write for the packages of the @taflor org
FORGEJO_RELEASE_TOKEN a Forgejo access token write access to this repository's releases

The PyPI names taflor, taflor-protocol and taflor-server are registered, so each token can be limited to one project: a leaked server token can't publish a protocol package. On npm, @taflor/protocol is published under the @taflor org. Before its first upload, the private flag in protocol/package.json has to go; while it is set, the job skips the package with a warning. @taflor/client and @taflor/testkit get the same treatment once they exist.

The job publishes in a fixed order, and every step can run again:

  1. PyPI: taflor-protocol first, because taflor-server requires it, then taflor-server. Both uploads use --check-url https://pypi.org/simple/, so uv skips files that are on PyPI already. When the server upload fails, re-running the job uploads only the server.
  2. npm: a tarball whose version is on npm already is skipped.
  3. Forgejo release: the release with the notes, the files and SHA256SUMS is created, or replaced on a re-run.

Re-run the publish job alone (not the whole workflow), so it uploads the files the first run built: a fresh build would make files with other hashes, which PyPI refuses under an existing version. That a single job can be re-run and reuses the first run's artifacts on Forgejo is still to be confirmed at the first real release.