Skip to content

ADR: The second manifest

ADR: The second manifest

Status
accepted
Date
2026-09-03

A deploy shipped an image missing three files that were in the repository, in the build output, and in every green check.

In plain words

A deploy shipped without the files that let crawlers and link previews read the site, because the container's build recipe (the Dockerfile) keeps its own hand-written list of inputs and that list missed the public/ folder. A test now compares that list with the folders that actually exist.

What that is worth: a developer who adds a build input and forgets the Dockerfile gets a failing test in about a millisecond, and the organization finds the mistake in the test suite instead of on the live site after a deploy.

What happened

1.0.0.58 added public/robots.txt, public/sitemap.xml and public/og.png, so that a crawler could read this site and a link to it would unfurl with a picture.

Locally, everything agreed. npm run build put all three at the root of dist/. A test asserted the files existed. Another asserted the built page carried the Open Graph tags. The browser suite passed, CI passed, the deploy went green.

Then, on the live domain:

/robots.txt   404
/sitemap.xml  404
/og.png       404

while the same page, from the same request, carried the meta tags that point at them.

The diagnosis, in the order it was actually done

The 404 could come from two places, and guessing which is how an hour gets spent. There is an edge in front of the origin, so the first question is whether the request reaches the container at all.

edge/_redirects answers it:

/* http://theyard-ss-...azurecontainer.io:8080/:splat 200!

A catch-all proxy. Every path reaches the origin, including these three. So the edge is not it, and the origin is answering the 404 itself.

The origin serves static files out of wwwroot, and the image builds wwwroot by copying Vite's dist/. dist/ had the files. So the question narrows to whether the image's dist/ had them, which is a question about the build:

COPY index.html ./
COPY tsconfig.json ./
COPY tsconfig.app.json ./
COPY tsconfig.node.json ./
COPY vite.config.ts ./
COPY src ./src

RUN npm run build

There it is. The frontend stage copies an explicit list of inputs, and public/ is not on it, because public/ did not exist when the list was written. Vite inside the image had no public/ to copy, produced a dist/ without those three files, and did it without a warning, because a missing publicDir is not an error.

One line fixes it. The line is not the interesting part.

Why every check was green

This is the part worth keeping.

The Dockerfile is a second manifest of what the frontend consists of, written in a different file, in a different language, maintained by hand, and consulted by nothing until a deploy. The repository says the frontend is index.html, the tsconfigs, vite.config.ts, src/ and public/. The Dockerfile says it is the same list minus public/. Both are internally consistent. Nothing compares them.

And every gate is run in the place where the disagreement is invisible. Locally public/ exists, so Vite finds it, so dist/ is right, so the assertions about dist/ pass. The only environment where the two manifests differ is inside the image, and nothing in CI builds the image.

That is the shape to recognise: a duplicated list, where one copy is only ever evaluated somewhere the tests do not run. It is the same species as the stale DACPAC in ADR: Data first, where dotnet build on the solution reported success while leaving the previous package on disk, and the same species as the CI failure that could only be read by somebody signed in.

Decision

Copy public/, and hold the two manifests to each other with a test rather than with attention.

var missing = FrontendInputs
    .Where(input => Directory.Exists(Path.Combine(root, input)) || File.Exists(Path.Combine(root, input)))
    .Where(input => !Regex.IsMatch(stage, $@"^COPY\s+(?:[^\s]+\s+)*{Regex.Escape(input)}[\s/]", RegexOptions.Multiline))
    .ToArray();

It reads the frontend stage of the Dockerfile, up to RUN npm run build, and asserts that every input which exists in the repository is copied into it. The "which exists" clause matters: the list is what Vite reads, and an entry that has not been created yet is not a failure, so the test does not have to be edited in lockstep with the project.

It fails today, against the Dockerfile as it was, with the message "these exist in the repository and the frontend build stage never copies them".

What was rejected

Building the image in CI and asserting the files inside it. This is the answer that actually proves the thing, and it costs several minutes of runner time on every push to catch a class of defect that has occurred once. Worth revisiting if it happens again; not worth it for the first one.

Copying the whole tree instead of a list. It removes the second manifest entirely, and it also removes the layer caching that makes a source-only change cheap, and it puts node_modules, api/, docs/ and the test suites into the frontend build context. The explicit list is the right shape. It just needed something checking it.

Consequences

  • The image carries public/, so /robots.txt, /sitemap.xml and /og.png answer on the domain and the Open Graph tags point at something real.
  • Adding a new frontend build input and forgetting the Dockerfile now fails in the .NET suite, in about a millisecond, instead of on the live site after a deploy.
  • One more test that reads a file it does not own, which is a small ongoing cost and the reason this record explains itself.

The first manifest, read from this build: what Vite reads from the repository root, which DockerBuildInputsTests compares against the frontend stage's COPY lines:

/// <summary>
/// What Vite reads from the repository root when it builds. Anything here
/// that exists has to reach the image, or the built site is missing it.
/// </summary>
private static readonly string[] FrontendInputs =
[
    "index.html",
    "vite.config.ts",
    "tsconfig.json",
    "tsconfig.app.json",
    "tsconfig.node.json",
    "src",
    // Vite's publicDir: copied verbatim to the root of the built site.
    "public",
    // The data files the page reads at build time, each by name, because the image copies them one by one and
    // not the folder: the recommendations (one blank place per entry), the hooks and the quality history the
    // first screen draws from, and the Verified section's switches (1.0.5.200 shipped without them in the
    // image, and both deploys failed at the build).
    "data/recommendations.json",
    "data/hooks.json",
    "data/quality-history.json",
    "data/verified.json",
    // The release facts the landing and the gate badge are drawn with, read by vite.config.ts at build time:
    // 1.0.5.82 shipped without them in the image and both deploys failed at the build (ADR-132).
    "docs/CHANGELOG.md",
    "data/coderabbit-findings.json",
    // The badge's link to the gate run and the landing's last stopped release, read the same way (G5's data).
    "data/test-results.json",
    "data/gate-reds.json",
];

[Fact]
public void Everything_the_frontend_build_reads_is_copied_into_the_image()
{
    string root = Repo.Root();
    string dockerfile = File.ReadAllText(Path.Combine(root, "Dockerfile"));

    // Only the stage that runs `npm run build`. A COPY in the API stage
    // does not put a file where Vite can see it.
    int start = dockerfile.IndexOf("FROM mirror.gcr.io/library/node:", StringComparison.Ordinal);
    int end = dockerfile.IndexOf("RUN npm run build", StringComparison.Ordinal);
    Assert.True(start >= 0 && end > start, "the Dockerfile should have a node stage that runs the frontend build");
    string stage = dockerfile[start..end];

    var missing = FrontendInputs
        .Where(input => Directory.Exists(Path.Combine(root, input)) || File.Exists(Path.Combine(root, input)))
        .Where(input => !Regex.IsMatch(stage, $@"^COPY\s+(?:[^\s]+\s+)*{Regex.Escape(input)}[\s/]", RegexOptions.Multiline))
        .ToArray();

    Assert.True(
        missing.Length == 0,
        "these exist in the repository and the frontend build stage never copies them, so the built site will not have them: "
        + string.Join(", ", missing));
}

Live from api/TheYard.Tests/DockerBuildInputsTests.cs, region inputs, read from this build at 99df7a8.

Where it sits

No ring: this is a build decision about which folders the Dockerfile copies into the image, held in place by DockerBuildInputsTests, so the onion and SOLID do not apply to it.

Files

Addendum, 2026-09-09: the third instance

The same shape again, in the runtime stage this time. The records show code through live blocks that read files from the image, and the image copies an explicit list of sources for them; a record named a file under scripts/, which the list did not carry and the expander's roots did not allow, and both live sites rendered a note in its place for a day while every gate stayed green (ADR: Live code samples, the coverage addendum). LiveSampleCoverageTests now holds every path a live block names to the runtime stage's COPY lines, glob by glob, the way DockerBuildInputsTests holds the frontend's inputs to the node stage. Two manifests compared by a test each, and the rule behind both stands: an explicit list that describes another thing is a test waiting to be written.

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