Skip to content

ADR: A byte budget for the first load

ADR: A byte budget for the first load

Status: accepted, 2026-11-16, at 1.0.5.63. What a reader's first load costs is held to the bytes it cost when the budget was set: the drawn index.html, the entry script, the entry stylesheet and, for a document, the markdown chunk each have a number in .github/byte-budgets.json, and a version that spends more fails the gate's node job until it raises the number in its own commit and says why.

Reading list

  1. ADR: Quality you can watch: the ratchet whose rule this follows, that a number moves only on purpose.
  2. ADR: A hook on every page: the first screen these bytes draw.
  3. ADR: The gate runs where the memory is: the gate whose node job runs the check.

In plain words

Every page a reader is sent to arrives as a few files. This record says how big those files may be, and a test fails the build when one grows past its number. Growing on purpose is allowed: the number is raised in the same change, with the reason in the changelog. Growing by accident is not.

What that is worth: a visitor's first load cannot quietly get slower version after version, a developer sees the cost of a change the day it is made, and the organization gets a speed that is held rather than hoped for.

Context

The gate already measured the whole built script, dist_js_bytes in data/test-results.json, and reported it without holding it. That number counts the Admin tab's chunks too, which no reader of a public page downloads, so a change to Admin moved it and a change to the first load hid inside it. The public pages all draw from the entry bundle; the markdown chunk loads when a document opens, and Admin's chunks load only on Admin.

Decision

  • Four parts, each with its own number: index_html (the page as built, with the landing drawn into it), entry_js and entry_css (the two files index.html names), markdown_js (what a document adds).
  • The numbers were the bytes measured when the budget was set, on this build, uncompressed: 176,223, 579,915, 121,934 and 149,135.
  • tests/budgets/byteBudgets.test.ts reads the built site in the gate's node job, which builds before Vitest runs, and fails a part over its number. On a machine that has not built it is skipped and says so; on the gate it requires the build.
  • A number is raised only in the commit that needs it, never to fit after the fact, and the changelog line says why.

What holds it

tests/budgets/byteBudgets.test.ts, seen red against a budget of zero for every part before the numbers were set.

Consequences

  • A version that adds to the first load raises a number on purpose, in view.
  • The two pages the API draws in C# (/about and the resume door) are not in the build's output and are not counted here.
  • The Lighthouse report (ladder 8b) is the reading of the whole page in a browser; this is the cheap check that runs on every version.

Where it sits

Outside the rings: a test over the build's output, beside the quality ratchet's file.

Files

Addendum, 2026-11-16 (1.0.5.64): the build is asked for only on the gate, and the history may grow

What stopped being true: that every GitHub Actions run of Vitest has a built site to read. The gate's node job builds before Vitest, but ci.yml's frontend job runs npm test before npm run build, so after 1.0.5.63 CI on main was red on the check that a build exists. The check now holds only on a gate branch (GITHUB_REF under refs/heads/gate/); elsewhere a missing build skips the budget, as on a machine that has not built. And the first gate after that, 1.0.5.64's own, was red on 18 bytes: the landing draws every reading in data/quality-history.json (the hook's chart, ADR-132), and the gate's promote adds a row after each version, so main itself had grown past a number measured one row earlier, the drawn index.html by 18 bytes and the entry script by 1,032, with no code change. A number fixed to the bytes would fail every lane's next version. So .github/byte-budgets.json also names the history's rows when it was measured (141) and an allowance per row past them for the two parts that carry the history: 64 bytes for index.html and 1,200 for the entry script (a row is about 1,100 bytes). The stylesheet and the markdown chunk get none, and any growth beyond a row's allowance still fails.

Addendum, 2026-11-17 (1.0.5.74): the Lighthouse reading beside the budget

What stopped being true: that the gate says nothing about how the page performs in a browser. A job of its own, lighthouse in gate.yml, builds the site, serves it inside the job and reads the landing with Lighthouse 12.8.2 five times, never the live site, and keeps the median score, largest contentful paint, total blocking time, layout shift and speed index as the lighthouse-raw artifact (scripts/lighthouse_median.mjs). It reports and never blocks: nothing needs it, so promote and the verdict do not wait for it, it is continue-on-error, and it is capped at 25 minutes, because the gate's concurrency group holds the next gate until every job of a run has ended. GateWorkflowTests holds all of that. Ten of these readings set the blocking line in a later version, as the owner answered the ladder's question 4. This version changes a workflow, so it is promoted by hand (the repository has no PROMOTE_TOKEN), and a hand promote skips after-roll, whose steps are then done by hand.

Enforced by

Not machine-checked. Held by review.

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