038. Run the dev branch on dev, and every release on staging
Status
Accepted 2026-10-09
Context
ADR 035 had dev follow every release, so the only way to show someone an idea running was to merge it. An idea that may never ship should not need a version, and a release should still be tried somewhere before prod.
Decision
We give each of three environments its own source, each signaled by a tag on the web image.
:devfollows thedevbranch. Every push to it, force-pushes included, builds the image and publishes it as:dev, recorded as a deployment in thedevenvironment. The branch never merges intomain, and it is recreated frommainwhenever it has drifted too far.- A dev build is not a release. It earns no version and creates no tag, so its image says
0.0.0, and it never touches:stagingor:prod. :stagingfollows releases, the role ADR 035 gave:dev, recorded as a deployment in thestagingenvironment linking tostaging.campfire.wsj27.se.- Each shell has a staging build beside its dev and prod builds, loading
staging.campfire.wsj27.se, so a release is tried in the apps before prod as well as in a browser. :prodstill moves only by promotion, now of an image staging ran.preview_*is a workflow kind beside those of ADR 009 – it publishes a build from a branch other thanmain, and a newer push cancels the one in flight, because only the newest build is worth publishing.
This amends ADR 034 and ADR 035: :staging replaces :dev as the tag a release moves, and the rest of both stands.
Consequences
- Anyone can put work on dev without a pull request, a version, or a merge.
- What dev runs is whatever was pushed last, so two people showing work at once overwrite each other.
- Staging needs a site of its own on the cluster (ADR 027), and a sign-in that returns to its host name (ADR 019), both agreed with the people who run them.
- Nothing reaches dev from
mainuntil the branch is recreated, so dev can run code older than staging's.
Alternatives considered
- Building every pull request into a preview site of its own – a site per branch on a cluster this repository does not operate.
- Merging
devintomainas the services do – unreleasable work would ride into a release.