Skip to content

ADR: The version comes from the changelog

ADR: The version comes from the changelog

Status
accepted
Date
2026-09-03
Shipped as
1.0.0.41

This supersedes the version formula in ADR: Version in the footer, ADR: The deploy pipeline and ADR: The changelog. Those records keep their reasoning; the number is computed differently now.

In plain words

This page makes the top line of the changelog the site's version number. The deploy reads the number from that line, which means the footer cannot disagree with the changelog. A deploy whose line is missing or not above the line below it fails instead of shipping.

What that is worth: a developer never has to remember a number or an offset, and the organization's live footer always matches the file that documents it.

Context

The displayed version was 1.0.0.(11 + deploy run number). The changelog's top line named the number the next deploy would produce, written by hand, one past whatever the footer showed.

ADR: The changelog already knew the weakness and wrote it down:

The deploy's changelog check would not have caught it. It asks whether a line exists for the version being shipped, which was true; it cannot know that a line further up describes a version that never will. The cheap guard is procedural.

The procedural guard lasted about a day.

On 2026-09-03 the style job's first CI run went red. Deploy fires on workflow_run and is gated by a conditional, so the run started, skipped, and consumed run number 28. The fix went out on the next green CI as run 29, which made it 1.0.0.40, while the changelog line written with that commit said 1.0.0.39. The live footer and the file that documents the live footer disagreed, in a project whose stated selling point is that they cannot.

Nothing was broken. A visitor comparing the footer to the changelog would have found a portfolio site contradicting itself, which is worse than broken.

Decision

The changelog's top line is the version. The deploy reads it, and there is no offset and no run counter in it any more.

- **1.0.0.41** (2026-09-03): one sentence.
   ^^^^^^^^^^ this is what the footer shows and what tags the image

Two things follow immediately, and both are the point:

  • A skipped or repeated run number cannot move the version, because the run number no longer appears in it.
  • A ship that forgets its changelog line fails the deploy instead of shipping a number nothing describes. The check that used to warn now decides.

The validation is a hard failure, in two parts. No parseable line at the top stops the deploy. A top line that is not strictly above the line below it stops the deploy, which is the "forgot to bump" case: the second line is by definition the last thing that shipped.

The API test keeps the same file honest from the other side. It already asserted the shape, the descending order, no repeats and no em dash. It now also asserts the top line is above the second, which is the same rule the workflow enforces, so a mistake is caught in CI a minute before it would be caught by a failed deploy.

Numbers may still skip, and 1.0.0.39 is the first one that did. That gap is kept rather than renumbered. A version that never ran is not a version, and rewriting history to hide a red build is the opposite of what this file is for.

In the code

The version step (.github/workflows/deploy.yml):

# Pin to the exact commit the gate tested and pushed, not wherever main has moved since.
- uses: actions/checkout@v7
  with:
    ref: ${{ inputs.sha || github.sha }}
# A re-run of an older run never rolls production back: the commit must still be main's head.
- name: The commit is main's head
  env:
    SHA: ${{ inputs.sha || github.sha }}
  run: |
    git fetch -q --depth=1 origin +refs/heads/main:refs/remotes/origin/main
    [ "$(git rev-parse origin/main)" = "$SHA" ] || { echo "::error::$SHA is no longer main's head"; exit 1; }

- name: Compute version
  env:
    HEAD_SHA: ${{ inputs.sha || github.sha }}
  run: |
    # The changelog's top line is the version (ADR-031). Not a run
    # counter: a counter ticks on runs that are gated off and never ship,
    # which is how 1.0.0.39 became a number the changelog named and
    # nothing ever displayed.
    # Four numbers since 1.0.1.0, compared as a version (sort -V), not as
    # the one counter it was while every version began 1.0.0.
    VERSIONS=$(sed -n 's/^- \*\*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)\*\*.*/\1/p' docs/CHANGELOG.md)
    N=$(echo "$VERSIONS" | sed -n 1p)
    PREV=$(echo "$VERSIONS" | sed -n 2p)
    # #region changelog-check
    # Both of these used to be a warning nobody reads. They stop the
    # deploy now, because the file they check is where the version comes
    # from: shipping past either one means shipping a number with no
    # sentence attached to it (ADR-031).
    if [ -z "$N" ]; then
      echo "::error file=docs/CHANGELOG.md::No version line at the top of the changelog, so there is no version to ship"
      exit 1
    fi
    if [ -n "$PREV" ] && { [ "$N" = "$PREV" ] || [ "$(printf '%s\n%s\n' "$PREV" "$N" | sort -V | tail -1)" != "$N" ]; }; then
      echo "::error file=docs/CHANGELOG.md::The top line is $N and $PREV is already below it, so this ship has no changelog line of its own"
      exit 1
    fi
    # #endregion changelog-check
    {
      echo "N=$N"
      echo "APP_VERSION=$N"
      echo "APP_COMMIT=${HEAD_SHA:0:7}"
      echo "GHCR_IMAGE=ghcr.io/stevestout/theyard:v$N"
    } >> "$GITHUB_ENV"
    echo "Deploying $N from ${HEAD_SHA:0:7} as ghcr.io/stevestout/theyard:v$N"

Live from .github/workflows/deploy.yml, region compute-version, read from this build at 99df7a8.

The refusal (.github/workflows/deploy.yml):

# Both of these used to be a warning nobody reads. They stop the
# deploy now, because the file they check is where the version comes
# from: shipping past either one means shipping a number with no
# sentence attached to it (ADR-031).
if [ -z "$N" ]; then
  echo "::error file=docs/CHANGELOG.md::No version line at the top of the changelog, so there is no version to ship"
  exit 1
fi
if [ -n "$PREV" ] && { [ "$N" = "$PREV" ] || [ "$(printf '%s\n%s\n' "$PREV" "$N" | sort -V | tail -1)" != "$N" ]; }; then
  echo "::error file=docs/CHANGELOG.md::The top line is $N and $PREV is already below it, so this ship has no changelog line of its own"
  exit 1
fi

Live from .github/workflows/deploy.yml, region changelog-check, read from this build at 99df7a8.

The same rule from the other side (api/TheYard.Tests/ChangelogTests.cs):

/// <summary>
/// The same rule the deploy enforces (ADR: The version comes from the
/// changelog). The top line is the version about to ship, so it has to sit
/// above the one below it. A commit that forgets its own line leaves the
/// last shipped version on top, and this notices a minute before the
/// deploy would.
/// </summary>
[Fact]
public async Task The_top_line_is_above_the_one_below_it()
{
    string markdown = await _client.GetStringAsync("/api/docs/changelog");

    var versions = markdown.Split('\n')
        .Select(line => EntryLine.Match(line.TrimEnd('\r')))
        .Where(match => match.Success)
        .Select(match => Version.Parse(match.Groups[1].Value))
        .ToList();

    Assert.True(versions.Count >= 2, "two versions are needed before this rule means anything");
    Assert.True(
        versions[0] > versions[1],
        $"the top line is {versions[0]} and the line below it is {versions[1]}, "
        + "so this ship has no changelog line of its own and the deploy will refuse it");
}

Live from api/TheYard.Tests/ChangelogTests.cs, region version-order, read from this build at 99df7a8.

Consequences

  • The footer and the changelog cannot disagree. Not "should not": the string in the footer is read from the file that documents it, so a disagreement would require the deploy to have used a different file.
  • Writing the changelog line stops being a convention and becomes a step of the build. Skipping it is a red deploy, not a warning nobody reads.
  • The image tag follows the same number, so v41 in the registry is the image that says 1.0.0.41, and no run of the workflow can produce a tag that already exists without also failing its version check.
  • The OFFSET: 11 environment variable is gone. It was the last thing in the pipeline that had to be remembered rather than derived.
  • One thing this deliberately does not do is derive the version from a git tag. That would be the right answer for a library with releases. Here the changelog is already mandatory, already tested, and already served to the reader, so it is the artefact with the fewest ways to be wrong.

Where it sits

No ring: this is a deployment decision about where the version number comes from, so the onion and SOLID do not apply to it.

Files

Addendum, 2026-09-22 (1.0.1.0): four numbers, compared as a version

Steve set the first release at 1.0.1.0, the first version he considered polished. Until then every version began 1.0.0, so the deploy read only the last number and compared it with -le. From 1.0.1.0 the deploy reads all four numbers off the changelog's top line and compares it with the line below using sort -V, so 1.0.1.0 ships over 1.0.0.187, and a repeated or lower version is refused as before. APP_VERSION is the version itself, and the image is tagged v<version> (v1.0.1.0), which the second site's deploy waits for by the same name. ChangelogTests parses each line with System.Version, so the test and the workflow still enforce one rule. The Consequences above describe the tags as they were through 1.0.0.187 (v41 for 1.0.0.41) and are kept as the record.

Addendum, 2026-11-16 (1.0.5.57): a taken number is refused before the claim, not after the gate

In plain words: before a lane pushes a version, the preflight now says whether its number is free. If the changelog's top line is not exactly one above main's, or another push already holds a gate branch of that number, it refuses in one sentence and prints the next free version, so the lane finds out in a minute instead of at the end of a half-hour gate.

Why: the number has only ever been checked by scripts/promote.sh, after the whole gate has run. On 20 October two lanes took 1.0.4.1 within minutes of each other; one shipped it, and the other's three versions were renumbered twice, with two rebases through conflicts in the changelog and the README and about seventy minutes of waiting. On 12 November a red gate run kept gate/1.0.5.50 on origin, and from then until 16 November every lane's next number was that one: pushing over the branch takes a force-push, and on 15 November the force-push was refused to the lane that ran it, even with Steve's go-ahead in chat. Nothing told a lane any of this until it had pushed.

What the check does (scripts/versions.sh, run first by scripts/preflight.sh, which turns red on a refusal):

  1. The changelog's top line must be filled: a line still holding the placeholder the ship fills is refused with "fill the version first". The script and its test spell the placeholder in two parts, because the fill replaces every whole one in the tree, their own files included; the first fill of this very version did exactly that and the check refused a filled line.
  2. It must be origin/main's top line plus one in the fourth number. The owner's move of the third number (a.b.(c+1).0) passes only with OWNER_YES naming it, exactly as promote.sh allows. Anything else is refused with the next free version.
  3. git ls-remote origin refs/heads/gate/<top line>: no branch passes; a branch at this very commit passes as the lane's own (the re-run after its own push); a branch at any other commit is refused whatever its age, with its commit, age and subject, and says that pushing over it needs a force-push with lease, which is Steve's to run or allow. Age never turns that refusal into a pass, because the push after a pass would be refused.
  4. An origin that cannot be read is a refusal, never a pass.
  5. Leftover gate branches at or below main are named and never block: only gate/<top line> is ever pushed. Nothing here deletes a branch.

promote.sh keeps every check it had, as the backstop after the gate, and now reads the changelog's version lines through the same file (versions, next_version) instead of a copy of its own. No version field was added anywhere and no versioning tool was adopted: the changelog is still the one source of the number. VersionClaimScriptTests runs the script against a bare repository for each case: a taken number, a number not one above main, the lane's own branch at HEAD, a leftover branch below main, a stacked one-commit branch filled to main plus one, an unfilled top line, an origin that cannot be read, and the owner's move with and without OWNER_YES.

Addendum, 2026-11-18 (1.0.5.87): the number is filled at the claim, under the lock

In plain words: a lane no longer writes its version number into its commit before it claims. It builds its one commit with placeholders, takes the gate lock (scripts/gate_lock.sh claim), and only then fills the number from main's top line plus one with scripts/fill_version.sh, along with the date and the next free record number. Its gate branch is named gate/<version>-<lane>-<sha8>, for example gate/1.0.5.76-coding1112-13c45731. A number is taken only when it is on main or named in the held lock by another lane, never because a branch exists. A red gate releases the lock, and with it its number: the next claim takes main plus one again, and nothing waits on a branch being deleted.

Why: under the addendum above, a red gate left gate/<number> on origin, and that branch held the number for every lane until someone deleted or force-pushed it, which lanes are not allowed to do. Five numbers were held this way in a week. 1.0.5.50 was held from 12 November to 16 November. 1.0.5.62 went red on 16 November and was freed only because that lane's delete of its own branch happened to be allowed. 1.0.5.64 went red the same day, the delete was refused, and Steve force-pushed it. 1.0.5.74 went red at 23:04 on 16 November and held every lane for about 8 hours until the morning. 1.0.5.75 went red at 07:36 on 17 November and was freed at 07:41 only because its lane's delete went through. Each hold parked every lane behind one branch nobody could move. Filling at promote instead would be wrong: promote.sh refuses any change beyond the results files and the version card, so the number has to be in the commit the gate tests.

What changed:

  1. scripts/fill_version.sh runs on the one commit on origin/main once the lane holds the lock. It refuses unless HEAD is exactly one commit on origin/main and the tree is clean, fills the version (main's top line plus one in its fourth number, or the owner's move of the third only when OWNER_YES names it), today's date in America/Chicago and the record number (one above the highest docs/decisions/ADR-NNN-*.md on origin/main, renaming a file whose name holds that placeholder) in every tracked file and in the commit message, redraws the version card, tightens .github/quality-ratchet.json to what .github/quality.py measures (a number only ever moves the good way), amends the commit and prints VERSION= ADR= HEAD=. It spells each placeholder in two parts, so it never fills its own source, and a second run changes nothing. A commit already filled for another number is refused rather than renumbered. Two lanes no longer collide on record numbers either, because the record number is filled at the same moment.
  2. scripts/gate_lock.sh holds the lock. claim takes flock on a local file for the seconds it reads, writes and reads back the share's lock, because the share's mount caches what it lists for 30 seconds and every lane runs on one machine; it creates the lock with set -o noclobber, so a second writer fails instead of overwriting, and reads its own line back after two seconds. annotate adds run= and branch= once the run exists, since the run id exists only after the push. release renames the lock to theyard-gate.released-<unix time>. A peer may release another lane's lock only when its run concluded failure or cancelled, or concluded success with main's top line already its version; a line with no run is judged by the run gh lists for its commit. A green run that has not promoted, such as a version that changes a workflow and is promoted by hand, is released by its holder or by Steve, never by a peer, because a peer that claimed main plus one would take the number that promote is about to ship.
  3. scripts/versions.sh's claim check reads the held lock (GATE_LOCK, the share's theyard-gate.lock by default) instead of origin's branches. Absent, the number is free by the lock; another lane's lock naming the number is refused in one sentence naming the holder; the lane's own lock (GATE_LANE) passes; a lock folder that cannot be reached is said and not judged. Gate branches on origin are only named. Every other refusal and the next free version are kept.
  4. Every reader of a gate branch's name takes the version as the text after gate/ up to the first hyphen (branch_version in versions.sh, and the same cut in scripts/coderabbit_review.py): promote.sh, gate.yml, scripts/gate_pr.sh (which takes the branch, and still takes a bare version for an older gate/<version> branch) and the preflight's printed commands. The older name with no hyphen still reads whole.
  5. gate.yml's concurrency group keeps queue: max, so a third push never cancels a pending gate in silence, and the cancel-in-progress: false line is gone: false is the default, and GitHub forbids queue: max beside cancel-in-progress: true and says nothing about false, so the pairing is never tried on the shared gate. A first job, number, runs versions.sh gate on the branch and turns the run away within seconds when its version is no longer main's top line plus one; every job that costs minutes waits on it, so two lanes that claimed one number lose under a minute, not a gate. promote.sh keeps every version check it had, as the backstop.

What holds it: FillVersionScriptTests (the fill of the version, the date and the record number in content, a file name and the message; the ratchet only tightened; a second run changes nothing; each refusal; the owner's move), VersionClaimScriptTests (a gate branch never takes a number; the held lock takes it only for its holder; a lock folder out of reach is not judged; the branch name read in both forms by the shell and by Python; the gate's first check; next), GateLockScriptTests (the peer release rule with a stand-in gh; the claim, a second claim refused, the annotation, a red run's release), GateReviewWaitTests and CodeRabbitRuleTests (the pull request and the review row on the new name and the old), PromoteScriptTests (promote reads the version off the branch up to its first hyphen), and GateWorkflowTests and PromoteWorkflowTests (queue: max with no cancel-in-progress, the number job every costly job waits on, the version read off the branch for promote, and the branch passed whole to the pull request's close).

Enforced by

2 rules in the rulebook cite this record, each held by a test on every release.

The rule What holds it In the last gate
One changelog line per shipped version, newest first, and the deploy reads the version from it ChangelogTests 6 of 6 passed
Before a ship, preflight refuses an unfilled top line, a number that is not main's plus one (save the owner's move with OWNER_YES), and a number whose gate branch sits on origin at another commit, at any age, printing the next free version; a gate branch at the lane's own commit passes and a leftover below main never blocks VersionClaimScriptTests 54 of 54 passed
Store

The Yard, home

Steven StoutStaff .NET engineerRemote

Production .NET that stays up. Built with AI, measured on every version.

Steven Stout

Hi, I'm Steve. I build the systems that make delivery boring in the best way, then coach people inside them.

  • 200+

    production releases, none took the platform down

    Conway Investment Research, 2019 to 2024. Sole engineer for the first three years on a live financial advisory platform.

    See how
  • 50%

    shorter release cycle

    Storee Construction, 2024 to 2026. Four ASP.NET applications onto one .NET 10 platform on Azure, with a four-person team I hired and mentored.

    See how

01Verified

Steven Stout

A real person, and the work is mine.

  • Identity

    Checked by LinkedIn, not by me.

    LinkedIn verified my government ID.

  • Running system

    You are looking at it.

    Version 1.0.5.273 is live. Nothing ships unless it passes the automated gates first.

That's who I am. Here's how I work.

02Strengths

Ten strengths, each with the proof beside it. The numbers match my resume and LinkedIn, and the live ones are read from this site as you look.

  • 01

    Keeps production alive

    200+ releases on a live financial platform, and none took it down. Sole engineer for the first three years.

    See the Conway work

  • 02

    Simplifies messy systems

    Four ASP.NET applications onto one .NET 10 platform on Azure, and a release cycle 50% shorter.

    See the Storee work

  • 03

    Marries dev and infrastructure

    Blue-green releases at Storee that flipped in about 5 seconds with nobody signed out, and Azure Front Door at two employers.

    See this site's cloud

  • 04

    Designs data that holds up

    White-label clients on one shared database, the isolation built into the data, and no cross-client issues.

    See the Conway work

  • 05

    Keeps AI-written code honest

    15 quality numbers that may only improve: 273 releases in a row with none worse.

    See the quality numbers

  • 06

    Resourceful

    $30,000+ cut from Azure and vendor spend at Conway. This site's Azure bill is public, resource by resource.

    See the bill

  • 07

    Builds people up

    Hired and mentored a four-person team. 13 colleagues recommend me by name.

    Read the recommendations

  • 08

    Takes ideas to production

    This site: designed, built and run solo, with 352 versions measured through one gate.

    How it was built

  • 09

    Writes clearly

    Posts on real engineering problems, in plain words.

    Read the blog

  • 10

    Owns decisions

    153 decision records, each with its tradeoff and the call I made.

    See the decision records

Built with AI. Gated so quality never slides.

Steven Stout’s showcase: a used-vehicle auction on .NET and React, built and run by one engineer, live on Azure, with its decisions written down.

No quality number has gotten worse at any release since 1.0.5.1 on 10 November: 273 releases in a row.

One engineer, an AI agent and a gate that checks 15 quality numbers on every release. 352 versions measured, with every result public, the worst days included.

82 releases in the last 7 days, each through the same gate.

Async methods with no CancellationToken, may only fall

11091.0.3.1391.0.5.2731.0.4.115, the ratchet
Every number, on the Quality page

TheYard, right nowLive

Answering in

unread

02505007501,000

server time at p95, the usual five minutes of the last day.

Azure this month

unread

the bill, by resource, read from Azure. The Admin tab shows every line.

Since the last roll

unread

 

rolled in place by the pipeline, behind one gate.

People who have visited

unread

30 days agotoday

Scanners, my own tools' and my own reads left out.

03Start here

04Where teams are heading

How I see engineering with AI, and the setup on this site that backs it.

AI-augmented teams · Architecture and ownership

AI writes more of the code. Someone still has to own what ships.

Teams are going to be heavily AI-augmented. That moves the senior job toward architecture and technical ownership: deciding what to build in pieces small enough to verify, and owning what ships.

  • Task tracking will get automated too. Judgment stays human: seeing a design fail at scale before it does.
  • On this site the AI's first design held the whole catalogue in memory. I caught it when the App Service plan hit 82 per cent and moved the work to the store.

What the AI wrote, what I decided

07Tech stack

  •    
  •    
  •    

Read from the build, never typed by hand

What TheYard runs on

What we use, where it runs, its AWS twin, the version as built, and the file that proves it.

Cloud patterns, not one vendor: every Azure piece in this stack has a named AWS twin. Mapped, not yet run on AWS.

  • .NET 1114 projects
  • React 19.3TypeScript 7.0
  • Azure9 Bicep files
  • 11GitHub Actions workflows
The whole stack, with the file that proves each line

The last release the gate stopped was 1.0.5.258 on 2 December, at its browser 1 of 2 job.

08How it is built

09How it is run

10Who and why

Next step

11What has to work, where is it today, and what does success look like?

Book 20 minutes opens an email to me with those three questions in it, and I answer with a time.

Book 20 minutes

Your email app should have opened with this message. If it did not, copy it and send it from any mailbox.

Or message me on LinkedIn