Skip to content

ADR: The gate runs where the memory is

ADR: The gate runs where the memory is

Status: accepted, 2026-10-13 (1.0.3.123). The ship's gate runs on a GitHub runner instead of the laptop that ships. The laptop builds the commit and pushes it to a branch named gate/<version>; .github/workflows/gate.yml runs every check the laptop's gate ran; the laptop reads the run and, only when it is green, fast-forwards main, which deploys as before. From 1.0.4.101 the run promotes itself: see the addendum of that date.

In plain words

Every version of this site goes through one gate before it rolls: every suite, on both stores, once (ADR: The five-minute gate). Until this record the gate ran on the laptop that ships, which has 8 GB and not much of it free with an editor open. The gate now runs on a GitHub runner with 16 GB, and the laptop only builds the commit and reads the answer.

What that is worth: a change is tested on the day it is made instead of when the laptop happens to have memory to spare, and the organization keeps one gate with every check in it, on a machine sized for it, at no cost on a public repository.

Context

The laptop's gate waits for memory before it starts, because starting short of it is how gates went red on specs the change never touched: takes one to three of 1.0.0.187 started with 807 to 1,402 MB free and timed out, and take four waited three hours for memory and never started. On 13 October the gate for 1.0.3.121 waited from 10:42 to 12:03 with between 323 and 1,189 MB free, and the laptop restarted under it. The same day, with VS Code, the API under the debugger, Vite and Chrome open, the laptop had 429 MB free. Steve, that morning: "think around this memory bottleneck, this laptop is small and that constraint can't change."

Three ways were weighed. Make the laptop's gate fit (one browser worker, no parallel test collections, a lower start threshold): it starts sooner and runs slower, and the next suite added pushes it back over. Close what holds the memory during a ship (the C# language server, Docker Desktop): cheapest, and manual every time. Move the gate to where the memory is: GitHub's standard runner for a public repository has 16 GB and four cores and costs nothing, and CI already runs this repository's suites there on every push to main (ADR: The five-minute gate, the addendum of 5 October).

Decision

The checks move; none is dropped. The workflow runs, in the laptop's order: the build of every project with any warning red, the bundle and the rendering service's bundle, dotnet format, the SQL project, xUnit on SQLite, the seven live Cosmos DB tests, the whole xUnit suite booted on Cosmos DB, Prettier, oxlint, the type check, Vitest, the browser suite against the bundle just built, the three store specs on Cosmos DB, and the em dash scan. The two cuts stay as they were: dotnet format runs when a C# or project file changed, and the two Cosmos DB passes run when api/, infra/cosmos/ or a store spec changed and are carried forward otherwise. The Shed's two suites run beside it on a Windows runner, because its path rules are written for the system they run on and one of its cases (a drive letter makes a path rooted) only means something on Windows.

if grep -qE '\.(cs|csproj|slnx|editorconfig)$' "$raw/touched.txt"; then echo "FORMAT_NEEDED=1" >> "$env"; else echo "FORMAT_NEEDED=0" >> "$env"; fi
if grep -qE '^(api/|infra/cosmos/|tests/e2e/(store-toggle|account|admin)\.spec\.ts$)' "$raw/touched.txt"; then echo "COSMOS_NEEDED=1" >> "$env"; else echo "COSMOS_NEEDED=0" >> "$env"; fi

Live from scripts/gate_cuts.sh, region two-cuts, read from this build at 99df7a8.

The run cannot push. The workflow reads the code and signs in to Azure for the Cosmos DB passes; it has no permission to write to the repository. Its reports leave as one artifact, gate-raw, in the layout scripts/test_results.mjs already reads. The laptop downloads it, writes data/test-results.json and the README lines from it into the same commit, and pushes that commit to main as a fast-forward. A red run leaves main exactly where it was and the commit on its gate branch for reading. Because the push to main is the laptop's own, the deploys start on it as they always have; a push made by a workflow's token would not start them.

# Red is any pass that is not 0, except the two that the cuts above may skip, and a fold that is missing a job.
- name: The verdict
  id: verdict
  if: always()
  run: |
    red=""
    val() { { grep -E "^$2=" "$RAW/$1" 2>/dev/null || true; } | head -n 1 | cut -d= -f2; }
    for k in prettier lint tsc vitest browser; do [ "$(val node.result $k)" = 0 ] || red="$red $k"; done
    v=$(val node.result browser_cosmos); [ "$v" = 0 ] || [ "$v" = skipped ] || red="$red browser_cosmos"
    for k in sqlproj functions server xunit live; do [ "$(val dotnet.result $k)" = 0 ] || red="$red $k"; done
    for k in format oncosmos; do v=$(val dotnet.result $k); [ "$v" = 0 ] || [ "$v" = skipped ] || red="$red $k"; done
    [ "$(val rest.result emdash)" = 0 ] || red="$red emdash"
    [ "$(val rest.result quality)" = 0 ] || red="$red quality"
    [ "$(val rest.result healoutside)" = 0 ] || red="$red healoutside"
    [ "$(val rest.result image)" = 0 ] || red="$red image"
    [ "$(val rest.result fold)" = 0 ] || red="$red fold"
    [ "$(val build.result warnings)" = 0 ] || red="$red warnings"
    # A log's tail is printed only when that log's OWN check is red. Every red run used to print the
    # last twelve lines of all seven text logs, so "All matched files use Prettier code style!" landed
    # as an ::error:: annotation, and the failure email named six checks when one had failed: a reader
    # who has to find the real failure among the green ones stops reading the email. The build's
    # warnings are red with no log of their own until here; they get their lines too.
    is_red() { case " $red " in *" $1 "*) return 0;; *) return 1;; esac; }
    lines() { while IFS= read -r line; do printf '::error::%s: %s\n' "$1" "$(printf '%s' "$line" | cut -c1-300)" | tee -a "$RAW/red.txt"; done; }
    # Written on the way out, red or green: the status job names the checks and the first failing line. A failing
    # test's line comes first when there is one, xUnit's "Failed <test>" or the browser's "1) <spec>": the fold's
    # note on the job that died prints before the test logs and names no test (ADR-137, the fail proof of 1.0.5.99).
    said() {
      local out=${GITHUB_OUTPUT:-/dev/null} first
      first=$({ grep -m1 -E 'Failed [A-Za-z]|[0-9]+\) ' "$RAW/red.txt" || sed -n 1p "$RAW/red.txt"; } 2> /dev/null | sed 's/^::error:://' | tr -s ' ' | cut -c1-90)
      echo "red=${red# }" >> "$out"
      echo "first=$first" >> "$out"
    }
    trap said EXIT
    if [ -n "$red" ]; then
      echo "::error::red:$red"
      for pair in prettier:prettier.txt lint:lint.txt tsc:tsc.txt format:format.txt sqlproj:sqlproj.txt emdash:emdash.txt quality:quality.txt healoutside:heal-outside.txt image:image.txt fold:fold.txt; do
        f=${pair#*:}; is_red "${pair%%:*}" || continue
        if [ -s "$RAW/$f" ]; then tail -n 12 "$RAW/$f" | lines "$f"; fi
      done
      if is_red warnings && [ -s "$RAW/build.txt" ]; then
        { grep -E ': warning ' "$RAW/build.txt" || true; } | head -n 8 | lines build.txt
      fi
      for pair in functions:functions.txt server:server.txt xunit:xunit-sqlite.txt live:xunit-live.txt oncosmos:xunit-cosmos.txt; do
        f=${pair#*:}; is_red "${pair%%:*}" || continue
        [ -f "$RAW/$f" ] || continue; { grep -E '^\s*Failed |Error Message' "$RAW/$f" || true; } | head -n 8 | lines "$f"
      done
      for pair in browser:browser-sqlite.txt browser_cosmos:browser-cosmos.txt; do
        f=${pair#*:}; is_red "${pair%%:*}" || continue
        [ -f "$RAW/$f" ] || continue; { grep -E '^\s+[0-9]+\) ' "$RAW/$f" || true; } | head -n 8 | lines "$f"
      done
      exit 1
    fi
    echo "red: nothing"

Live from .github/workflows/gate.yml, region verdict, read from this build at 99df7a8.

Signing in without a secret. The Cosmos DB account has no keys, so the passes sign in as an identity. The workflow runs in a GitHub environment named gate, and the deploy identity carries a federated credential for that environment and a data role on the one Cosmos DB account, so no branch name is registered in Azure and no secret is stored in GitHub. The token GitHub presents names the owner and the repository by their ids as well as their names, and the credential's subject has to match that spelling.

The workflow is held to the gate it replaced. GateWorkflowTests names every check with the command that runs it, reads scripts/test_results.mjs for the reports it expects and fails when the workflow writes one fewer, requires every result the workflow records to feed the verdict, holds The Shed's job to Windows, and holds the workflow to gate/ branches and to read-only access.

/// <summary>
/// Each check the laptop's gate ran, by the command that runs it. Every one of these is a check
/// a version has failed on at least once; none is decoration.
/// </summary>
public static TheoryData<string, string> Checks => new()
{
    { "the build, every project", "dotnet build api/TheYard.slnx -c Debug" },
    { "the bundle", "npx vite build" },
    { "the rendering service's bundle", "npx vite build --config render/vite.config.ts" },
    { "dotnet format", "dotnet format api/TheYard.slnx --verify-no-changes" },
    { "the SQL project", "dotnet build api/TheYard.Database/TheYard.Database.sqlproj" },
    { "xUnit on SQLite", "--filter \"Store!=cosmos\" --logger \"trx;LogFileName=xunit-sqlite.trx\"" },
    { "the live Cosmos DB tests", "--filter \"Store=cosmos\" --logger \"trx;LogFileName=xunit-live.trx\"" },
    { "xUnit booted on Cosmos DB", "--logger \"trx;LogFileName=xunit-cosmos.trx\"" },
    { "Prettier", "npm run format:check" },
    { "oxlint", "npm run lint" },
    { "the type check", "npx tsc -b" },
    { "Vitest", "npx vitest run" },
    { "the browser suite on SQLite", "npx playwright test --shard=\"$SHARD/2\" --workers=2 --retries=1" },
    { "the store specs on Cosmos DB", "tests/e2e/store-toggle.spec.ts tests/e2e/account.spec.ts tests/e2e/admin.spec.ts" },
    { "the em dash scan", "bash scripts/emdash_scan.sh" },
    { "the quality ratchet", "bash scripts/quality_ratchet.sh" },
};

[Theory]
[MemberData(nameof(Checks))]
public void The_workflow_runs_every_check_the_laptop_gate_ran(string check, string command)
{
    Assert.True(Workflow().Contains(command, StringComparison.Ordinal), $"gate.yml should run {check}: {command}");
}

Live from api/TheYard.Tests/GateWorkflowTests.cs, region every-check, read from this build at 99df7a8.

Measured on the first trial run (run 38470810828, 13 October, no Cosmos DB sign-in yet): the browser suite on SQLite 189 seconds against 329 to 390 on the laptop that day; Vitest 4 against 10 to 11; xUnit on SQLite 17 against 25 to 31; the whole run 23 minutes, ten of them the Cosmos DB passes waiting on a sign-in that failed. The laptop's part is the patch, the drawings and the push: light work, in memory any laptop has free.

Where it sits

Outside the rings: the build machinery, read by nothing at run time. Single responsibility on both sides: the workflow answers whether a commit is green, and the laptop's script answers what ships and when. It costs a wait on GitHub's queue and a run that is slower to start than a local one; what would change it is a laptop with the memory to run the suites beside an editor, or a check that needs something only the laptop has.

Files

Addendum, 2026-10-26 (1.0.4.101): the gate promotes its own green run

Until this version the step between a green gate and a roll ran on the laptop: ship-from-branch.ps1 on the job hunt share watched the run, downloaded gate-raw, wrote data/test-results.json and the README's figures from it, folded them into the gate's commit, fast-forwarded main, read the roll on both names and every workflow the push started, queued the reads after the roll and deleted the gate branch. A version shipped only while the laptop, or the Linux machine reading its queue, was on and signed in. On 26 October two lanes' versions waited three hours for a queue nobody was reading, and Steve asked that shipping depend on no machine.

From this version the run promotes itself, and the rule for every lane is a ship is a push of gate/<version>:

  • promote runs after the gate job and The Shed's are both green. It is the only job that may write to the repository, and only to fast-forward main: scripts/promote.sh checks the branch names the changelog's top version, that only the fourth number moved (the first three are Steve's, and a version that moves them is shipped from a machine with his yes), that the served resume is the locked one, that no live Cloud card on either name says the site's identity is missing a role (the share's preflight, moved), and that main is an ancestor of the gate's commit. It writes the results file with scripts/test_results.mjs and the README's figures with scripts/readme_results.py (moved into the repository from the share), refuses if they touched anything but those three files, folds them into the commit, and pushes it to main without force, four tries, each one checking main is still an ancestor. Nothing is ever force-pushed.
  • The roll. A push made with the workflow's own token starts no other workflow, so the gate calls Deploy and Deploy Render itself (workflow_call, beside their push trigger, which a push from a person still uses), each pinned to the promoted commit and in the deploy-production and deploy-render concurrency groups as before. Both deploys now sign in through the gate environment, on a push and on a call alike: its federated credential belongs to the same deploy identity and names no branch, so a call from a gate branch signs in as a push to main always did; no credential was added in Azure. A version that changes only the job hunt's files rolls nothing, as Deploy's path filter has always said. The edge branch, which moves on a Deploy run of its own, is started by hand on main after the called Deploy, so it still moves only after the origin is verified.
  • After the roll, scripts/admin_after_roll.py (moved from the share) reads both names for the version, health, the Admin routes and the page sweep, and the job starts CI on main by hand (the one kind of start the token may make) and waits for it green. Then the gate branch is deleted.
  • A version that changes a workflow cannot be promoted by the token, which GitHub never lets write to .github/workflows. The promote job says so and moves nothing; a person runs the same scripts/promote.sh against the run's gate-raw and pushes main, and the push trigger rolls it.

What the machine that pushes still does, as the laptop's script did before it pushed, because the gate checks these and does not write them: the drawings and the preview card, the stamp strip and Prettier's write (docs/ci-cd/CICD.md lists the commands). What stays with a machine, because it needs Steve's own sign-in: pruning the Azure registry to ten images (the deploy identity cannot delete there; Deploy's own prune step still tries and warns), and the live look and load proof that write their pictures to the share.

PromoteWorkflowTests holds the order, the permissions and the no-force rule, and CiTriggerTests and DeployWorkflowTests still hold the push triggers.

1.0.4.101 changed the workflows itself, so it was the first version promoted by hand under the new rule: its gate run (40424564652) went green in 870 seconds and its promote job refused with the sentence above, and scripts/promote.sh was run against that run's gate-raw from the Linux machine on 26 October, which wrote 4,060 test runs into the results file and fast-forwarded main to 9f22e420. 1.0.4.102, this line, is the first version that went from a push of its gate branch to the live footer with no machine involved.

Addendum, 2026-10-26 (1.0.4.105): nothing the site needs waits on a machine

After 1.0.4.101 four things still waited on the laptop or the Linux machine: drawing the version card before a push, deploying the job hunt's Function, saving a blog post's body, and reading Azure Monitor. Steve, 26 October: "I really want these workflows as independent and isolated and robust as possible." From this version each is a workflow of its own, signing in, where it signs in at all, as the deploy identity through the gate environment, and each fails on its own run with its own red:

  • The version card is the gate's. The gate job draws it (node docs/images/og.mjs) from the commit's own changelog before any test reads it, and puts it in gate-raw; promote folds it into the commit with the results. A session that pushes a gate branch no longer has to draw anything; the other drawings change only with what they draw.
  • The Function's suite is in the gate. Until this version only CI ran functions/jobhunt.Tests, after main had moved, so a version that broke the Function could be promoted; the gate now runs it, the verdict reads it, and the results file lists it as a check.
  • deploy-function.yml deploys the job hunt's Function with the laptop script's steps (publish, zip, config-zip, then the functions, the runtime and the health route read back, 200 or the 204 of a cancelled read). It never sets an app setting, so a deploy cannot turn the campaign on or off. The gate's after-roll starts it as a run of its own when a version touched functions/, so a Function that will not deploy never turns a site ship red; it also runs by hand.
  • blog-post.yml saves a post's body from data/blog/<slug>.md in the commit: it reads the post from the live API, changes only the body, saves it with the repository's ADMIN_KEY secret through a header file, and reads both names back until each serves the file's SHA-256.
  • azure-read.yml reads Azure Monitor by hand, read only, every metric with a start and an end, its raw answers as the run's artifact (the first read is the Cosmos DB throttling split).

What still needs Steve, once: the deploy identity has no role on func-jobhunt-ss or delete on the registry yet, so deploy-function.yml stays red until he grants the first, and Deploy's prune keeps warning until he grants the second (J:\mentor\BLOCKERS-FOR-STEVE-2026-10-27.md holds the two commands). The laptop's queue runner has nothing of TheYard's left to run.

MachineFreeWorkflowsTests holds each workflow to that shape, and GateWorkflowTests holds the Function's suite to the verdict.

Addendum, 2026-10-27 (1.0.4.107): the gate reads every commit it ships, and nothing rolls a commit main has left

The review of 27 October read every run of the night of 26 October and found the promote path sound but held by habit in five places. Every gate branch that night was one commit on main and every hand promotion was run on the right commit, but nothing made either so; a re-run of an older run could roll the site, or the Function, back to it; and deploy-function.yml, which had never yet run green, could pass a deploy it had not checked. From this version:

  • The two cuts read the whole branch. Whether dotnet format runs and whether the passes on Cosmos DB run are decided from the diff between git merge-base origin/main HEAD and HEAD, with the gate's checkout holding the full history, so a code change in the first of two commits is never carried forward on a changelog-only second.
  • promote.sh checks the commit before it writes anything. It takes the gate run's id (the gate passes its own; a person promoting by hand names the run they downloaded) and refuses unless that run tested HEAD, its gate and shed jobs are both green, and HEAD is exactly one commit on main. The version must go up under sort -V by exactly one in its fourth number.
  • Every promoted version rolls. The flag that skipped the roll for a version of the job hunt's files alone was always true, because the results file and the README are folded into every commit and the site serves the results file; it is gone, and Deploy and Deploy Render are called for every promoted version.
  • A re-run never rolls back. Deploy and Deploy Render refuse a commit that is not main's head. The after-roll dispatches the Function only while its commit is still main's head, and deploy-function.yml refuses a commit that is not on main.
  • The calls hand over what they use. Deploy declares its three secrets (YARD_AUTH_SIGNING_KEY, ADMIN_KEY, NETLIFY_TOKEN) and the gate passes them by name; Deploy Render is passed none, where both had every repository secret.
  • After-roll reads its own CI run. It records the time before it dispatches CI and reads only a run created after it, and it has seventy-five minutes for its reads, CI's start and CI itself.
  • The Function's deploy proves itself. Its steps run in bash with pipefail; an empty function list before the deploy is red and the list after it is tried five times; the records-run wait is read just before the zip deploy and also covers five to the hour before; the health route names the commit it was published from (MergerWatch.Commit, stamped by dotnet publish -p:SourceRevisionId), and the deploy is done only on a 200 that names the deployed commit, within five minutes. A 204, a read the host cancelled, never counts as healthy, and a run that saw only 204s is red. It has forty-five minutes.

What this version does not do: gate.yml stays at 377 lines; moving promote and after-roll into a reusable workflow is left for a version of its own. The gate environment still has no branch policy and main no ruleset; those are settings, and Steve's (J:\mentor\FIX1027-DONE-2026-10-27.md).

PromoteScriptTests runs promote.sh against a bare repository and holds each refusal to leaving main where it was; PromoteWorkflowTests and MachineFreeWorkflowsTests hold the workflows to these lines, and RunLineTests holds the commit the health route names.

Addendum, 2026-10-27 (1.0.4.108): a card read is JSON or refused, a read is kept a week, and a blog save cannot drop its slides

Three of the review of 27 October's smaller findings on the workflows of 1.0.4.105, from this version:

  • promote reads the Cloud cards as JSON. It asks for application/json, and a card that answers with anything but a JSON object (a page in front of the API, a sign-in) refuses the promotion, where it read as a card with no missing role. A card that does not answer at all is still said and not judged.
  • azure-read.yml keeps its raw answers seven days on this public repository, and runs one read at a time.
  • blog-post.yml will not save a post whose live read lost its slides or its tags, since the save writes back what the read gave and every post has both; and the read-back after the save tries a failed read again rather than failing a save that landed.

PromoteScriptTests holds the card refusal by running promote.sh against a card that answers a page; MachineFreeWorkflowsTests holds the other two.

Addendum, 2026-10-29 (1.0.4.119): a gate that passed never sends a failure email

Steve, 29 October: "I am getting a lot of these emails, any way for my deploy script to catch these errors?" The last thirty Gate runs, 26 to 29 October, were read: eleven failed, and seven of the eleven were a green gate refusing to promote itself (runs 40903343066, 40889845665, 40884853607, 40522513222, 40518359561, 40437977063, 40424564652). Each of those versions changed a file under .github/workflows, which the run's own token may never push, so the promote job said so with ::error:: and exited non-zero. Every check had passed. GitHub sends a failure email for a failed run, so each of those seven told the owner his code was broken when nothing was. The other four were real reds in the gate job's verdict, and each of those emails carried the tails of the logs of checks that had passed beside the one that had not, so "All matched files use Prettier code style!" arrived as an error annotation. An email that is wrong seven times in eleven is an email nobody opens, and then the four that matter are not read either.

Three things change from this version, and a fourth moves the catching earlier:

  • A workflow version promotes itself when it can. The secret PROMOTE_TOKEN is a fine-grained personal token scoped to this repository with Contents and Workflows write. The promote job checks out with secrets.PROMOTE_TOKEN || github.token, so where the secret exists the push scripts/promote.sh makes at the end carries the workflow, and where it does not the checkout is the run's own token as before. The script is told only whether the secret existed (HAS_PROMOTE_TOKEN, the result of secrets.PROMOTE_TOKEN != ''); it never reads, prints or passes the value, and the only two mentions of the secret in the workflow are the checkout's token and that one test. Nothing is ever force-pushed; the four tries and the ancestor check in front of each are unchanged.
  • A workflow version with no such secret ends GREEN. The promote job prints ::notice::this version changes a workflow: promote it by hand with scripts/promote.sh, writes promoted=false to its outputs and exits 0, and the deploy, deploy-render and after-roll jobs skip on that output. A person then promotes the run by hand exactly as before. The sentence is the same sentence; what changed is that it is a notice on a green run instead of an error on a red one, because a run that found nothing wrong must not say it did.
  • The push is the roll when a personal token made it. A push made with the run's own token starts no workflow, which is why the gate calls Deploy and Deploy Render itself. A push made with a personal token starts them, and CI, and through Deploy the edge's move. So when promote pushed with PROMOTE_TOKEN it reports by_push=true, the two deploy jobs skip rather than put a second run in the deploy-production and deploy-render concurrency groups for one commit, the edge is not started by hand because edge-branch.yml is already watching the push's own Deploy run, and after-roll waits for the push's two runs by their head commit before it reads the version on either name and reads the push's CI run instead of dispatching another. The Function's deploy is unchanged on both paths: deploy-function.yml has only a workflow_dispatch trigger, so no push ever starts it. Every promoted version still rolls exactly once, by one path or the other.
  • The verdict prints only what failed. Each log belongs to one check, and its tail reaches the annotations only when that check is in $red. A red run on the quality ratchet now names quality.txt and nothing else. The build's warnings, which were red with no evidence printed at all, get their : warning lines too.
  • scripts/preflight.sh catches what it can before the push. dotnet format api/TheYard.slnx --verify-no-changes, npm run format:check, npm run lint and npx tsc -b, the gate's own four commands, under three minutes and inside 8 GB, each named with the first twenty lines of its output when it is red, and then one line saying whether this version changes .github/workflows and whether PROMOTE_TOKEN will carry it, read from the repository's secret NAMES and never a value. It does not run the browser suite or the two passes on Cosmos DB: those need the 16 GB runner, which is the whole reason the gate moved here. A check this machine cannot run says UNKNOWN and is never assumed green. The ship rule in CLAUDE.md and docs/ci-cd/CICD.md is now: run it, and a red preflight is never pushed. dotnet format is in it because the before-the-push list never named that command and the first gate of 1.0.4.117 died on it.

What this version does not do. It does not create the secret: a credential is the owner's to make, and until he does, every workflow version takes the green notice path, which is the path this version itself took. So the token path ships held by tests and unexercised live, and the first version to change a workflow after the secret exists is the one that proves it. It does not touch Azure, any role or any setting.

PromoteScriptTests runs promote.sh against a bare repository on each of the three paths and holds all three to ending green, to whether main moved and to the outputs each writes; GateVerdictTests lifts the verdict's own script out of the workflow and runs it over a planted gate-raw where one check is red among green ones, and holds the annotations to naming only the red one's log; PromoteWorkflowTests holds the token, the notice, the skips and the preflight, and that the secret is never read, printed or put on a command line.

GateVerdictTests skips where bash is absent, not where Windows is, which is the older guard in PromoteScriptTests. The first push of this version proved why: two of its cases asserted the annotation with the log's line trimmed, the verdict emits it as the log holds it, and the gate's runner was the only machine that could see the difference, so the mistake cost a whole gate run instead of a minute. The laptop that ships has Git Bash, and a case only the runner can run is a case the push finds out about the expensive way.

Addendum, 2026-11-09 (1.0.4.163): the box's runner skips a suite the branch does not carry

yard-test, the command WickedAwsome runs to test a pushed branch before its gate, lived only on the box, in ~/.local/bin. It ran four suites, and the third, server, ran dotnet test server/JobHunt.Server.Tests whether or not the branch had a server/ folder. main has none yet, so every run on main printed a red server line, and every lane learned to read past it. A red that blocks nothing teaches every reader to look past red, and the next real one is read past with it.

From this version the runner is scripts/yard-test.sh, kept in the repository and installed on the box with install -m 755 scripts/yard-test.sh ~/.local/bin/yard-test. Each suite names its source folder (api, server, src, tests/e2e); a suite whose folder the checked-out commit does not carry prints SKIP server skipped: server/ not on this branch and does not touch the exit code. A folder that is there runs exactly as before, and a red suite beside a skipped one still fails the run. Once server/ reaches main, the suite runs for real with no change here.

YardTestScriptTests runs the script for real in a home of its own: a bare origin, a clone under repos/TheYard, and stand-ins for dotnet, npx and npm that write down what they were asked to run. It holds the skip, the control where the folder is there, and the red beside the skip. It skips on Windows, because the script takes its one-at-a-time lock with flock, which the laptop's Git Bash does not carry.

Addendum, 2026-11-10 (1.0.5.4): the checks run side by side

Until this version the gate was one job on one runner, every check one after another, so the run was the sum of its suites. Over the ten ships before this one (1.0.4.173 to 1.0.5.3, read from each run's jobs with gh run view --json jobs on 10 November), that one job ran a median 882 seconds, from 723 to 1,158; the whole run, from the push to the after-roll's green, a median 2,124 seconds (35.4 minutes), from 1,842 to 2,338, over the seven of them that rolled on their own. One run is not a measurement: the same gate took 1,116 seconds at 1.0.5.2 and 741 at 1.0.5.3, two hours apart. ADR-068's addendum of 1.0.3.183 had already worked out the cure, two jobs, one per store, near 520 seconds, and left it unbuilt. Steve's yes to building it came on 10 November.

Five jobs where there was one. dotnet builds the API with any warning red and runs dotnet format, the SQL projects, the Function's suite, the machine lanes' suite and xUnit on SQLite. cosmos runs everything that reads the Cosmos DB account: the live Cosmos DB tests on every run, and, when the two cuts say so, the whole xUnit suite booted on Cosmos DB and the three store specs in the browser, one after another, because those passes share the tests- containers on the one account. node builds the two bundles, takes the code's own numbers and runs Prettier, oxlint, the type check, Vitest, the em dash scan and the quality ratchet. browser runs the browser suite on SQLite against the built bundle in two shards split by spec file, each with two workers and one retry as before. They start together. The fifth, gate, waits for all four whatever they did, folds their reports into the one gate-raw folder in the shape promote.sh, the after-roll and the Admin tab already read, and runs the verdict it always ran, so every check still runs, on the same cuts, and turns the run red the same way.

How it differs from the design of 10/19: that design split by store, and this one cannot. The browser suite on SQLite is the longest single pass, and the Cosmos DB passes cannot be split across jobs without separate containers, which is Steve's question and not this version's. So the Cosmos DB side is one job, and the SQLite side is three, with its browser suite in two halves.

The fold (scripts/gate_fold.py, held by GateFoldTests). Each check job uploads raw-<job>-<attempt>. For each job the fold takes the newest attempt at or below the one it runs in, so a job re-run green replaces its red attempt and a job that was not re-run keeps the attempt it ran in; the reports of 1.0.4.122, where a re-run went green and the first attempt's reports shipped, cannot come back. A result file written by more than one job is merged by key, a red value winning and a time being the longest; the two shards' Playwright reports become one, so the site still reads one Browser on SQLite suite and a pass that needed its retry is still written r. A job that left no reports turns the fold red by name, so half the browser suite can never read as the whole of it, and so does a check job that did not succeed in the attempt, whatever it left. Each check job also ends with its own verdict, scripts/gate_job.sh, over exactly the keys it records, red on a failing one or one it never wrote, so the run's email names the job and a re-run of the failed jobs runs that job again. gate-raw is uploaded with overwrite, so the one a person downloads to promote by hand is the newest attempt's. The house practice stands: a red gate is retried by pushing the branch again, not by re-running a job.

The two cuts move into scripts/gate_cuts.sh, which the dotnet and cosmos jobs each run, so no job waits on another to learn what the branch changed. The block shown under Decision above reads from it now.

One sign-in. Only cosmos runs in the gate environment and signs in to Azure. The first gate of 1.0.5.3 went red when GitHub's token request for that sign-in timed out; now such a timeout reddens the Cosmos DB passes and nothing else, and the retry is still a push of the branch.

promote.sh trusts the jobs by name: gate, shed, dotnet, cosmos, node, browser 1 of 2 and browser 2 of 2, all seven green, or nothing is promoted.

A second number beside gateSeconds. gateSeconds keeps its meaning: the seconds from the run's start to the promote step, which needs the gate, The Shed and CodeRabbit's review. With the checks faster than the review, promote waits on the review, and gateSeconds counts that wait. So the gate job now writes checks.result, the seconds from the run's start to its own fold, and the results file carries it as checksSeconds. The tests card's "start to verdict" row, its trend and its headline read checksSeconds where the file has it and gateSeconds before this version, when the promote step came straight after the verdict; the headline also names the seconds to the promotion. Whether promote keeps waiting on the review is ADR-129's first decision and Steve's.

No self-hosted runner. A runner on WickedAwsome, the box beside the laptop, was weighed and is not used. GitHub's secure-use reference says self-hosted runners "should almost never be used for public repositories" (docs.github.com, Actions, secure use), TheYard is public, and the box holds an Azure sign-in and the key to the job hunt's share. This is written here so no later version proposes it.

What it costs: five runners' setup where there was one, each checking out, installing .NET and building what it needs, which on a public repository costs no money. The numbers after it are measured on the ships after it, job by job, and written in the record of the version that reads them.

Addendum, 2026-11-10 (1.0.5.8): yard-test's lock is never held by a child that outlives it

scripts/yard-test.sh takes its one-at-a-time lock as its own descriptor 9. Every command it ran inherited that descriptor, and a dotnet build leaves the Roslyn compile server running after the build, holding it: on 9 November a run waited 13 minutes behind a server 28 minutes old until dotnet build-server shutdown --vbcscompiler freed it (the failure log's entry of that day). Each command that starts a child now closes descriptor 9 for it (9>&-), the suites and npm ci alike, and the lock stays the script's own. Before its checkout the script also restores the build output a branch tracked, so a checkout to a branch that ignores it is not refused, as one was the same evening. YardTestScriptTests leaves a child running from a stand-in suite and takes the lock the moment the run ends; on the script before this version that case is red. The box's copy is installed from the repository with install -m 755 scripts/yard-test.sh ~/.local/bin/yard-test and read back with cmp.

The review wait and the request script are held too: GateReviewWaitTests runs scripts/coderabbit_review.py's wait and scripts/gate_pr.sh against a stand-in gh, for a completed review, no request, a review that never completes inside the ceiling and a skipped check, and for opening, reusing and closing the request, which the cold review of 1.0.4.176 and 1.0.4.177 asked for.

Correction, 1.0.5.8: the addendum of 1.0.5.4 gives the one gate job's duration as its measure (882 seconds median), and then 1,116 seconds at 1.0.5.2 and 741 at 1.0.5.3, which are gateSeconds, the run's start to the promote step. Those two ships' gate jobs ran 1,083 and 723 seconds.

From CodeRabbit on #19, in 1.0.5.10: the restore runs once for obj and once for bin, so a branch that tracks only one of them still has it restored.

Addendum, 2026-11-11 (1.0.5.19): the suite runs on the runner's own Chrome when Ubuntu's mirror is out of reach

What stopped being true: that a browser job installs its Chrome or fails. On 11 November, from before 09:04 to past 10:49 CST, GitHub's runners could not resolve azure.archive.ubuntu.com, so npx playwright install --with-deps chrome failed on nine font packages before any test ran, and four gate runs of this version went red with every check otherwise unreached. The install now runs as before, and only when it fails and the runner already carries Google Chrome (GitHub's Ubuntu image does) does the job go on with that Chrome, saying so in a warning on the run. A day the mirror answers changes nothing. The three places it runs: the two browser jobs and the cosmos job in gate.yml, and the browser job in ci.yml. The owner approved the change the same morning.

Addendum, 2026-11-12 (1.0.5.47): the SDK is the one global.json names

What stopped being true: that asking for .NET 10.0.x gives every job the same SDK. On 11/12 at 04:54 CST the second browser shard of gate run 43204324874 (1.0.5.47, ladder v6) ran on runner image ubuntu24/20261111.370, the first to carry SDK 11.0.100 beside 10.0.404. With no global.json, dotnet takes the newest SDK on the machine, so that one job built with 11.0.100, whose analyzers add CA1877 (consecutive Path.Combine calls), and the warnings-as-errors build of api/TheYard.Api stopped on samples/theshed/Domain/HomePath.cs:88. The other jobs ran on the image before it and built green with 10.0.404, which has no CA1877 (its analyzers end at CA1875); so did this box, on 10.0.113. Read on 11/12 on WickedAwsome: 1.0.5.46 builds green on 10.0.404 and red on 11.0.100 at HomePath.cs:88; this version builds green on both.

From this version global.json at the root names SDK 10.0.404 with rollForward latestPatch, Steve's call on 11/12, and .github/actions/dotnet installs from it (global-json-file), so the gate, CI and this box build with the same analyzers, and a new SDK arrives only as a version of its own that changes global.json. The action's last step names the SDK each job builds with and fails in one line when nothing on the runner satisfies global.json. The box runs 10.0.404 first on its PATH; its 10.0.113 from apt stays and refuses commands inside a checkout that carries the pin. The four nested calls (HomePath and the Source/Read helpers of three tests) also join once with Path.Combine([first, .. rest]), which keeps the same result for an empty rest, so the code is ready for the SDK after this one. Not in this version: the deploy image's SDK tag (Dockerfile, sdk:10.0), whose build copies no global.json and so builds as 1.0.5.46's did; it is pinned in a later version.

Addendum, 2026-11-16 (1.0.5.53): the deploy image builds with the pinned SDK too

What stopped being true: that the pin of 1.0.5.47 reached every build. The deploy image's build stage took mcr.microsoft.com/dotnet/sdk:10.0, whatever SDK that tag held on the day, and copies no global.json, so the image could build the API with a different SDK and its analyzers than the gate had passed. From this version that stage is sdk:10.0.404 (the tag read with docker manifest inspect on 12 November), and DotnetInstallTests fails when global.json's version, that tag and the action's two global-json-file lines disagree, so a new SDK is one version that moves all three. The Shed's own Dockerfile (samples/theshed) is the starter as its brief sent it and keeps its tag.

Addendum, 2026-11-18 (1.0.5.88): the catch list, and the gate's numbers for each version

In plain words: before a lane claims the gate, preflight now runs a short catch list, the checks behind the reds the gate has actually thrown, so a version that would go red on one of them finds out in seconds on the lane's own machine instead of half an hour into the gate. And the promote now writes down, for every version, the run that tested it, how many lines it changed, the gate's red runs since the last version, and, one version later, how long it took from the push to the live site.

Why: in the week to 17 November five gates went red on a check outside the suite the lane had run: a browser spec's row count on the Cosmos DB card (1.0.5.74), a template's budget default (1.0.5.62), the byte budget (1.0.5.64), em dashes (1.0.5.75) and the version card (1.0.5.4). Each red cost about half an hour of every lane's queue and, until the number could be freed, held it. The owner's rule of 10 November stays: one full run, the gate's. The catch list is not a second full run: it is store-free, it runs on the filled commit, and it prints its own seconds against a two-minute cap; a check that would take it past the cap does not join.

  • scripts/catch_list.sh, run by preflight: the em dash scan (scripts/emdash_scan.sh) and the quality ratchet (scripts/quality_ratchet.sh), each the very command the gate runs, so the two cannot drift; the version's size against its band (scripts/pr_size.sh); the og card checked as drawn from this commit; and the specs and suites the change touches, named by path, so the lane runs them through yard-test (the Admin Cloud cards name tests/e2e/cloud.spec.ts, the Function's folder its suite, src/ the byte budget).
  • scripts/gate_feed.sh, run by promote.sh before the results are written: the run's id and push time, the version's changed lines, every gate run that ended red or cancelled since the last promote with the version and lane its branch names and the jobs that failed, and when the version below went live. data/test-results.json carries them, and its history row for the version below gains liveSeconds, push to live. A red gate never promotes, so this is the only place main records one.
  • The gate's own em dash step and ratchet step call the same two scripts once the version that rewrites gate.yml lands; until then GateWorkflowTests holds the gate's pattern and the script's to the same text.

GateWorkflowTests and PrSizeScriptTests hold the catch list's parts.

Addendum, 2026-11-18 (1.0.5.94): the Cosmos DB passes run on the emulator

In plain words: the gate no longer tests against the Cosmos DB account the live site reads. Its cosmos job starts Microsoft's Azure Cosmos DB emulator beside it, makes the tests- containers there from infra/cosmos/*.json, and runs every Cosmos DB pass against it: the store tests, xUnit booted on Cosmos DB and the three store specs in the browser. Measured on WickedAwsome before the gate: xUnit booted on the emulator 2,458 of 2,459 in 2 min 34 s (the one red the unfilled changelog line), the store tests 12 of 12. The emulator is thrown away with the runner, so nothing a test writes outlives the run. One test still reads the account, and only reads.

Why: the owner's rule of 18 November, that automated tests should never make permanent changes to data and should use a mock database where they can. The passes had been writing into tests- containers on the free-tier account, whose 1,000 RU/s its 25 containers share. On 18 November each gate's pass spent about 950 RU/s on tests-logs alone, in transactional batches of the collector's warnings, and five of the six gates that touched api/ that afternoon went red on 500s and timeouts under the throttling it caused, on different tests each time, while the live site's plan container was throttled in the same windows. tests-logs had grown to 1.98 million documents, because the kept ring's entries carry their own 35-day time to live over the copy's one-day default.

Why the emulator and not a hand-written fake: the SQLite pass already runs the whole suite through the application's own seams, so a fake store behind those seams would test nothing new. What the Cosmos DB pass exists to prove is the document store's own code, its queries, partition keys, transactional batches and times to live, and the emulator runs the same API for NoSQL in gateway mode. What it does not do: it enforces no sign-in and reports no request units, so the passes connect with its published key (Cosmos:Credential set to emulator, refused for any address that is not the runner itself, CosmosConnection.EmulatorClient), and the identity and the account's RBAC are proven where they always were, by the deployed sites themselves and the after-roll proof on both names. The image is pinned by digest, so a new emulator release reaches the gate only as a change to this file.

What stays on the account: one read. CosmosKeysetTests asks the live catalogue what a deep page costs in request units, which is the account's answer and not the emulator's, so the cosmos job still signs in as the gate identity and hands that one pass the account's address (Cosmos__CatalogueAccountEndpoint); it writes nothing. The 1.98 million documents already in tests-logs are left as they are; purging or recreating that container is the owner's call.

  • .github/workflows/gate.yml, the cosmos job: the emulator as a service container, scripts/cosmos_emulator.mjs for the eight tests- containers the suite was written against (no catalogue, which the experiment card's empty state reads), and the sign-in kept for the keyset test's read alone.
  • scripts/cosmos_emulator.mjs: waits for the emulator, then makes the database and one container per infra/cosmos file with its partition key, time to live and indexing policy.
  • GateWorkflowTests.Every_pass_on_cosmos_db_runs_in_the_one_job_and_on_the_emulator_beside_it holds it, including that the account's address appears once in gate.yml and reaches only the store tests' pass.

Addendum, 2026-11-18 (1.0.5.97): the gate frees at live, and main is proven before the next promote

In plain words: a version's Gate run now ends when its two deploys end, so the next version's gate starts the moment this one is live. The reads that used to fill the run's last quarter hour, both names read back and CI on main watched to its end, are a run of their own, .github/workflows/after-roll.yml, which the Gate run's end starts. Nothing stops being checked: the next promote checks it instead. Before it moves main, scripts/promote.sh needs main's own commit to be proven green by CI on main and by its after-roll, and it waits for them, up to twenty minutes, when they have not finished.

Why: the gate's concurrency group holds the next gate until every job of the run has ended, and the after-roll was the run's longest job. From promote to the lock's release took a median of 19.6 minutes over 38 versions. Gate run 44095326965 (1.0.5.75) took 31 min 23 s, and its after-roll was 15 min 50 s of that, most of it CI on main, which takes 9 m 53 s to 15 m 5 s. That time was spent after the version was already on main and live, holding nothing up but the next version. Moved out, it runs beside the next gate's checks, and the next promote waits only for what is left of it: a gate reaches its promote a median of 516.5 s after it starts (30 versions of data/test-results.json), so the wait is a few minutes at most, and the plan's estimate is 16 to 20 minutes a version instead of about 32. The next version measures it.

  • The Gate run: the promote job leaves one small artifact, promoted (the commit, the version, whether the Function changed, whether the push was the roll), only when it moved main, because a run started by workflow_run reads no job's outputs and the promoted commit is not the gate branch's. Right after the promote it starts CI on main for that commit, in a step that warns and never fails the job, since main has moved and the deploys need it green. Its cap is thirty minutes, to hold the line-stop's wait. The em dash scan and the ratchet call scripts/emdash_scan.sh and scripts/quality_ratchet.sh, the catch list's own two scripts.
  • The after-roll: started by a Gate run that succeeded, or by hand with the commit and the version, which is how a version promoted by hand gets its after-roll (promote.sh starts it after its push). It ends green doing nothing when the artifact is absent, and has its own concurrency group. Lighthouse moved with it and still only reports.
  • Names, not head commits: a run started with --ref main carries main's head at its start, not the commit it was told to test, so a re-run of an older version's CI was filed under the newer one. ci.yml now takes the commit as an input, checks it out in every job and names its run CI <commit>; the after-roll's run carries the version and the commit. The line-stop and the after-roll find runs by those names, and the after-roll starts CI only when no run names the commit.
  • The line-stop passes only on proof, never on absence: a run that is missing or still running is waited on, and in the gate a wait that runs out ends green with nothing promoted and a notice, as a workflow change does, so a slow main costs no second gate. A red run refuses, unless the version's commit message carries Fixes-main: <main's sha>, because a red main must not refuse its own fix. A main commit from before after-roll.yml existed has no after-roll run, and its CI runs carry no name with the commit in it, so for such a commit CI on main alone is the proof, found by its head commit; this holds only for the commits before this version.

PromoteScriptTests runs the line-stop for real (a red main refused and passed with Fixes-main, a missing or running run waited on to a green end with nothing promoted, the refusal by hand that names the command, the transition), and PromoteWorkflowTests and GateWorkflowTests hold the two workflows, the artifact, the names, the cap and the dispatch that never fails.

Addendum, 2026-11-26 (1.0.5.164): the after-roll's starts call again on a GitHub 5xx

In plain words: the after-roll starts three workflows of its own, the edge, the job hunt's Function and, when no run names the commit, CI on main. Each start is now made through scripts/dispatch.sh, which calls gh workflow run again when GitHub answers 5xx or the call never reaches it, with a pause that grows thirty seconds each time, eight calls in all (about fourteen minutes). A 4xx is still red at once, because a wrong input stays wrong.

What stopped being true: that one refused dispatch fails the after-roll. On 25 November, during a GitHub Actions partial outage, the after-roll for 1.0.5.162 failed at "The Function, by a run of its own" on one HTTP 504, so the reads after the roll never ran and no Function deploy started; the hand starts after it met 502, then 500, and the run went green only on a re-run twenty minutes later. A red after-roll for main stops the next version's promote (the line-stop above), so one 5xx held every lane behind it.

Why a second start is safe: a 5xx does not say whether GitHub made the run, and the script does not look. Every workflow it starts reads the commit it is handed, so a second run repeats the first: the Function's deploy sends the same zip, the edge moves to the same main, and CI on main is found by its name, "CI ".

  • scripts/dispatch.sh: the start, its calls and its pauses (DISPATCH_TRIES, DISPATCH_PAUSE).
  • .github/workflows/after-roll.yml: the edge, the Function and CI on main start through it.
  • DispatchScriptTests runs the script against a stand-in gh (504, no answer and 502, then a start; a 422 at once; a 5xx on every call), and holds that after-roll.yml makes no bare gh workflow run.

Addendum, 2026-12-01 (1.0.5.233): main only moves to a commit tested as it lands

In plain words: the gate tests the exact commit the cop filled, and then scripts/promote.sh writes the run's results into that commit and amends it before main moves to it. Eight files change in that fold: data/test-results.json, data/coderabbit-findings.json, data/quality-history.json, data/gate-reds.json, README.md, docs/built-with-ai/BUILT-WITH-AI.md, docs/images/og.svg and public/og.png. Until this version nothing ran on the amended commit before main moved: a node one-liner refused a results file holding a failed or skipped suite, the allow-list refused any other file, and the tests that read those eight ran only after the roll, in CI on main. Now the tests that read a folded file run on the amended commit, in promote.sh, after the amend and before the push. A red one refuses the promote with main where it was. This is the landing check.

What stopped being true: that the commit on main is always the commit the gate tested. A merge queue's promise is that the commit that lands is the commit that was tested (the "not rocket science" rule, Graydon Hoare's, as Graphite's "Not Rocket Science: How Bors and Google's TAP inspired modern merge queues" tells it, July 2024; GitHub's merge queue and GitLab's merge trains keep the same promise). The fold broke it by eight files, all data or documents, so the check tests what reads those eight, on the exact commit about to land.

Why: main went red through this gap twice.

  • 1.0.4.122: a re-run job's first attempt was folded into data/test-results.json, a suite recorded as failed, and CI on main went red on the test that reads it. The node one-liner was added after it.
  • 1.0.5.100, 19 November: the fail proof's red run was folded into data/gate-reds.json under its branch name, ready/cop1118-failproof-4de7ed19. GateRedsTests holds every row's version to four numbers, so CI on main went red at 17701ea1 and every ready run behind it failed that one test until 1.0.5.101 (c807f400) fixed the row (ADR-137, the addendum of 2026-11-20, "The red main").

What runs, in order, under one bound of five minutes for the whole check (scripts/landing_check.sh):

  1. bash scripts/emdash_scan.sh: every .md, .json and .svg in the tree, seven of the eight folded files, in about a second.
  2. The xUnit classes that read a folded file, on the gate's SQLite cut (Store!=cosmos), as dotnet test api/TheYard.Tests -c Debug with a filter on their names. A class is a reader when one of its tests can change its verdict because a folded file's bytes changed: it opens the file (14 classes, AppServiceTemplateTests among them, which reads README.md for the plan's size); it walks the tree for a kind that covers one (HouseVoiceTests, LibraryDocsTests); or it draws a page or document the host builds from one (10 classes, from PageStatusTests' sweep to EnforcedByTests, whose sections QualityCounts counts from the results file). Never --no-build: the folded files are read from the repository root at run time, so a build from before the fold is sound today, and an incremental build keeps it sound if a folded file ever becomes a build input.
  3. All of Vitest, npx vitest run: 954 tests in about 13 s, so no list is kept for it.

A red part runs once more before it counts. Red twice refuses; red then green lands, with a warning naming the test and both results, and the check's last line says so. A folded file that breaks a reader breaks it every time, so the second run costs nothing then and saves a whole gate when a test flickers; a test that needed it is fixed at its cause in a lane of its own (ADR-075, the addendum of 1.0.4.169). After a green check promote.sh confirms HEAD is still the folded commit and the tree is clean, and refuses "the landing check changed the tree" otherwise.

What is left out, and why: a class that only names a folded path reads none of its bytes. ActivityTests, CloudReadersTests and CloudThresholdTests name the address /og.png; AuthorPageTests and DiagramPageTests name test-results.json as a link's text; ChangelogQualityTests, QualityReadoutsTests, RuleGroupCountsTests and TestResultsWriterTests plant their own files; DockerBuildInputsTests reads the Dockerfile's list; FillVersionScriptTests, PrSizeScriptTests and PromoteScriptTests run scripts in throwaway repositories; HealOutsideTests names README.md in a planted list; MachineFreeWorkflowsTests and PromoteWorkflowTests read a script's text; StyleRulesTests' .json walk keeps to src/; and Repo finds the root by README.md being there. Each passed with all eight files broken at once. The script keeps both lists, one name a line, and LandingCheckListTests holds them to the test tree.

In a gate run: the promote job now sets up the SDK through .github/actions/dotnet, runs npm ci with the npm cache, and builds the test project in a step of its own, so the check's dotnet test only confirms the build. Its cap moves from thirty minutes to forty: the line-stop's wait of just under twenty, the check's five and the push's three no longer fit in thirty. A red check writes landing=<test>: <first line> to the job's outputs, and the said job posts "red gate as : landing; : " on the lane's commit: ADR-137's red gate status with landing as the check's name, so the feed of what the gate caught keeps it under its version and Steve gets the red Gate email a red check sends. A lane whose commit reads that fixes its own change when it touched a reader or a script the fold runs; otherwise the fold is broken for every lane, a retry would fail the same way, and the fix is a lane of its own (CLAUDE.md, Shipping).

The proof, by breaking the inputs once on a scratch worktree that was never pushed: on main's own tree the check was green in 82 s (the em dash scan 0 s, xUnit 68 s, Vitest 14 s). Each of the eight folded files, broken in turn (a JSON file as {}, a markdown file as one line, og.svg as an empty drawing, og.png as zero bytes), turned it red, twice each: test-results.json on TestResultsTests, coderabbit-findings.json on QualityPageTilesTests, quality-history.json on QualityPageTilesTests, gate-reds.json on GateRedsTests, README.md on AppServiceTemplateTests, BUILT-WITH-AI.md, og.svg and og.png on PublicFaceTests. The two incidents replayed for real: the 1.0.5.100 row (a version of ready/cop1118-failproof-4de7ed19) went red on GateRedsTests ("1 out of 98 items in the collection did not pass"), and a suite with one failed test went red on TestResultsTests. With all eight broken at once, the whole SQLite pass (3058 tests, 0 failing before) failed 46 tests in 23 classes, every one of them in the readers list; the host started, and its classes failed on the documents it builds from the folded files. LandingCheckListTests went red when GateRedsTests was taken out of the list, and green when it was put back.

Considered and not taken:

  1. Move the run records off main, to a data branch, Blob storage or the database. It removes the fold and with it this check's cost. It also changes how the site serves the files and how the image is built (the Dockerfile copies them), a larger change with its own risk. It is the next step if the check costs too much.
  2. Fold earlier, in the cop's fill, so the whole gate tests it. Two of the eight could move: gate-reds.json (the reds since the last promote are finished runs when the cop starts) and the quality history's row. The other six cannot: test-results.json and the two figures documents are made from the checks' own reports, and CodeRabbit's row arrives while the checks run. That shrinks the gap and leaves the 1.0.4.122 case open.
  3. Run the whole suite again on the folded commit. xUnit on SQLite alone took 116 s on 1.0.5.231 and 138 s on 1.0.5.230 before its build, for a change of eight data files. The readers are enough, and CI on main still runs everything after the roll.

What this does not claim: that the landing check is the whole suite. It leaves out the browser specs (tests/e2e/quality.spec.ts reads quality-history.json, and they need a running site), the type check, the two bundles and the deploy image (the node job runs them before the fold), and the byte budget (tests/budgets/byteBudgets.test.ts is not judged on a tree with no build, the same as CI on main; the check runs Vitest with GITHUB_REF cleared, because on a gate ref the budget's own case asks for the node job's build. The check's first run in a gate found that: Gate run 46699160251 refused on that case and main stayed where it was). It cannot see a reader added later that reaches a folded file only through the host without naming it: LandingCheckListTests sees only a test that names a folded file or walks for its kind. For all of those the backstop is the one main had before: CI on main, the after-roll, and the next promote's line-stop.

  • scripts/landing_check.sh: the three parts, the bound (LANDING_CHECK_SECONDS), the second run, the readers and the left-out list.
  • scripts/promote.sh, the region the-landing-check: the call, the output under $raw, the refusal and the clean-tree check.
  • .github/workflows/gate.yml: the promote job's setup, its output landing, its forty-minute cap, and the said job's branch.
  • LandingCheckListTests holds the two lists to the test tree and to promote.sh's allow-list; PromoteScriptTests replays both incidents, a check that dirties the tree, a reader red once and a reader red twice, with origin's main where it was; PromoteWorkflowTests holds the check's place between the amend and the push and the job's setup; GateWorkflowTests holds the said job's branch.

Measured in 1.0.5.236, on the first three Gate runs that landed with the check. A version cannot record its own run, so the numbers come one version later. Added seconds are the three steps the promote job gained (the dotnet action, npm ci, the test build), from each step's start and end, plus the check's own seconds from its last line:

Gate run Version Setup s Check s Total s
46702942533 1.0.5.233 55 54 109
46707837279 1.0.5.234 54 65 119
46717824160 1.0.5.235 82 90 172

Two of the three are under the 120 s target; the third is 52 s over it on a slower runner (the test build 74 s against 49 and 50, xUnit 76 s against 45 and 50). The check stays: it is the only test of the commit that lands, and a red main costs a whole gate run for every lane behind it. The levers, in order: first, the dotnet job leaves its test build as an artifact for the promote job, so the build, most of the setup, is not paid twice; second, the run records move off main, which removes the fold and this check with it. The first push of 1.0.5.233 (Gate run 46699160251) is not in the table: its check refused it on the byte budget's gate case, before the fix above.

Addendum, 2026-12-01 (1.0.5.237): the Function deploy sets the runtime the project targets, and still no app setting

What stopped being true: that deploy-function.yml only zips. A zip built for one .NET on a Flex Consumption app set to another does not start, and the app's runtime lived only in infra/jobhunt.bicep, which no workflow runs. From this version the deploy, signed in and before the zip, reads the TargetFramework of functions/jobhunt/JobHunt.Functions.csproj, compares it with the app's functionAppConfig.runtime.version, sets it with az functionapp runtime config set when the two differ, reads it back, and stops before the zip if it does not match. A redeploy of an older commit therefore takes that commit's runtime back with it, which is the Function's rollback (ADR: Moving to .NET 11 in four ships). The deploy identity holds Website Contributor on the app, whose Microsoft.Web/sites/* covers the call; the same call with the app's own value was made by hand on 1 December before any of this shipped, and answered with the value unchanged.

The rule above stands: the runtime is the app's configuration, not an app setting, and the deploy still writes no app setting, so it can no more turn the campaign on or off than before. FunctionShapeTests holds the step before the zip and holds that it names no app setting.

Addendum, 2026-12-01 (1.0.5.239): the runtime is written on the site itself

What stopped being true: the call named above. The first deploy of the .NET 11 Function (run 46733102204, 1 December, 14:03 CST) stopped at the runtime step, before the zip, as the step is built to: az functionapp runtime config set also reads the app's plan, and the deploy identity, Website Contributor on the site alone, was refused Microsoft.Web/serverfarms/read on plan-jobhunt-ss. Nothing was deployed and the Function kept answering on .NET 10. The write itself is the site's, which that role covers, so the step now reads the site's functionAppConfig with az rest, changes only runtime.version and patches it back on the same resource, then reads it again. The same PATCH, with the value the app already had, was made by hand first and the configuration read back identical. No new permission was asked for, and still no app setting is written.

Enforced by

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

The rule What holds it In the last gate
The gate on GitHub Actions runs every check the laptop's gate ran, writes every report the results writer reads, turns red when any check fails, runs The Shed's suites on Windows, and runs only on gate/ branches with no permission to write GateWorkflowTests 74 of 74 passed
A promotion moves main only for a run whose gate and Shed jobs are green on the commit it promotes, one commit on main, its version up by one in the fourth number; and no deploy rolls a commit main has left PromoteScriptTests, PromoteWorkflowTests, MachineFreeWorkflowsTests 184 of 184 passed
After the results are folded into the commit and before main moves, the tests that read a folded file run on that commit, and a red one refuses the promote with main where it was LandingCheckListTests, PromoteScriptTests, PromoteWorkflowTests, GateWorkflowTests 250 of 250 passed
The box's test runner skips a suite whose source folder the branch does not carry and says so, runs one that is there, and a red suite beside a skipped one still fails the run YardTestScriptTests 8 of 8 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