
# Understanding what a version number promises

A version number answers two questions: "which version am I on?" and "is the fix in it?". Here you learn what each number promises before you upgrade, and what needs an action from you. The upgrade procedure is in [Upgrade to a new version](mettre-a-jour.md); making a release and patching an old line, for whoever publishes, is in [Publish a release and patch the previous one](publier-une-version.md). We started at `1.0.0`, at the public opening: no `0.x`, which would say "I commit to nothing" while the product runs on a real event.

## What counts as "the API"

The public surface is not the Java code, it is what you or a client handle. Changing it incompatibly is a MAJOR bump:

- the YAML scenario format (`festival:` and `festival.dateDebut` keys, shape of stands and timeslots);
- environment variables (`BRANDING_*`, `LEGAL_*`, `PLANNING_MCP_*`, `FLYWAY_REPAIR_AT_START`…): removing one, or changing a default in a way that changes behaviour;
- stable URLs, first of all the staff espace links printed on distributed PDFs: breaking them invalidates paper already in circulation;
- the REST API consumed by anything other than the product's frontend, MCP server included;
- a Flyway migration that is irreversible in operational terms (column dropped or renamed, constraint that rejects existing data). The schema is *forward-only*: going back to the previous image is not enough, a dump must be restored ([back up and restore](sauvegarde-et-restauration.md)).

An older image **refuses to start** on a newer database; the two ways out are in [A database ahead of the image](mettre-a-jour.md#une-base-en-avance-sur-limage).

## What the other two numbers promise

MINOR: added feature, new environment variable with a default that preserves behaviour, additive migration (new table, nullable column), new solver constraint that can be *switched off*. PATCH: bug fix, security, dependencies, documentation; no destructive migration, no removed variable.

## Upgrades that require an action on your part

A new or tightened legal constraint can make a schedule that used to pass unsatisfiable: technically additive, it is practically an operational break. Verdict: MINOR, with a mandatory "⚠️ Attention" entry in the release notes (MAJOR would change major every time the Labour Code moves). Its marker is the reserved scope `contraintes-legales` (`feat(contraintes-legales): …`), not the `!`, which remains the sign of a MAJOR break and what `git cliff --bumped-version` reads to compute the bump; both lead to the same "⚠️ Attention" section (`cliff.toml`).

Other non-major operational breaks (a setting whose scale changes, a value to convert by hand, an environment variable or a dump from before the upgrade) follow the same rule: MINOR, with an "⚠️ Attention" entry, marked by the reserved scope `attention` (`feat(attention): …`), the commit body saying what you must do. So read that entry before each upgrade; real examples are in [the upgrades that need an action](mettre-a-jour.md#4-les-montées-qui-demandent-un-geste).

## How long a line is fixed

Only the current line is fixed: today `5.x`, on `main`. **No earlier version receives a fix, not even a security one**: the answer is "move up". The project is run by one person, with no maintenance commitment for now; [the mechanism of a maintenance branch](publier-une-version.md#3-patcher-une-version-antérieure) exists, it is promised to nobody.

## What the release expects for a major

Between two tags, `release.yml` reads the commit subjects: a `!` after the type (`feat(scenario)!: …`) asks for a MAJOR bump, a `feat` at least a MINOR. The check fails if the number placed is **lower** than what the subjects ask for (a `4.0.1` on commits with `!`, a `3.5.1` that would contain a `feat`). It does not refuse the opposite, but it is the `!` that files the change under "⚠️ Attention" in the notes and in the *What's new* screen, and lets 4.0.0 be proposed: every break PR therefore carries a `!` in its subject, and its paragraph in the migration guide of its major ([4.0](passer-a-la-4-0.md), [5.0](passer-a-la-5-0.md)).

## Pre-releases (release candidates)

Before a major, a pre-release `vX.Y.Z-rc.N` (for example `v4.0.0-rc.1`) lets an operator try the version on a copy of their data. It follows the rules of a release, with its suffix:

- `release.yml` compares it with the last **stable** tag (a `v4.0.0-rc.2` with `v3.5.0`, not with `rc.1`), refuses a number lower than what the subjects ask for, a pre-release placed after its final version, or whose `N` does not exceed that of a pre-release of the same number;
- its notes list everything that entered since that last stable tag, and those of the final version take the same range, pre-releases included;
- its image is published as `:X.Y.Z-rc.N` **and nothing else**: neither `:X.Y` nor `:latest`, so whoever pulls `latest` or follows an `X.Y` line never gets a pre-release. No moving `:X.Y-rc` tag: a pre-release is pulled by its whole number;
- its GitHub release is marked *pre-release* by `release.yml`, box ticked or not: it is never the “Latest” release, the one the interface of an instance announces as an update.

A pre-release promises nothing more than a trial: it may migrate the schema, and the schema does not go back down ([back up first](sauvegarde-et-restauration.md)).

## Reading an instance's version

The version shows in the footer, on the *Debug* page, in the startup line and in `GET /api/config` (`version` field, public: the interface code already carries it): `X.Y.Z` (or `X.Y.Z-rc.N`) on a release image, the short SHA on an acceptance image, `999-SNAPSHOT` in a local build, which deliberately looks like no published version. The git tag it comes from: [Publish a release](publier-une-version.md#1-la-source-de-vérité--un-tag-git).
