Skip to content

ADR: The room needs an account too

ADR: The room needs an account too

Status
accepted
Date
2026-09-03

POST /api/market/tick was anonymous, and it drove shared state from everybody's bids. A stranger with curl could outbid every signed-in visitor on the site.

In plain words

The simulated bidders that compete with visitors are moved forward by a request from the page (the market tick endpoint), and anyone could send it without an account, raising prices on every auction a signed-in visitor was winning. That request now needs an account, and what the bidders bid against is unchanged.

What that is worth: a developer sees that who may trigger an action is its own question, separate from what the action does, and the organization no longer has an endpoint a stranger can use to change what everybody else sees.

Context

The simulated room (ADR: Competing bidders) is driven by the page rather than by a timer on the server. That decision has two good reasons behind it, both still true: the browser's midnight is what decides which auctions are live, and a server-side timer on a free tier is a background job this project does not want to pay for.

So the page posts a tick every eight seconds and the room bids. The endpoint took no user, and the state it advanced came from every account:

// Everybody's high-water marks, not one account's. The room answers a
// price rather than a person, and a room that only responded to whoever
// happened to be looking would stop being a room the moment there were two
// of them.
var buyerBids = bids.StandingAsBids();

That comment is right about what the room should bid against, and it is not an argument about who may advance it. Nobody wrote the second half down, because when it was written there was one visitor and no accounts.

What it allowed

curl -X POST https://theyard.stevenstout.biz/api/market/tick \
  -H 'Content-Type: application/json' -d '{"anchor_ms": 0}'

No account. No cookie. Each call raises up to three vehicles, and the contested ones go first, which means the vehicles a real person is currently winning. In a loop, every auction any signed-in visitor holds gets counter-bid up to the ceiling, and the raised prices show on the public listing for everyone until the container rolls. Nothing attributes it to anybody: the request ring records a method and a path.

The damage is invented bids on a demo. The shape is an unauthenticated write to shared state, and it is the same shape as the reset that deleted everybody's bids, one step worse, because that one at least needed an account.

Decision

The tick requires an account. What it bids against does not change.

}).RequireAuthorization();

The room still answers the standing price rather than a person, which is the part the original comment got right and which keeps the room a room when two people are in it. What changed is that moving it costs the same as bidding, which is a sign-in, and every advance now belongs to somebody.

The page stops asking when signed out:

if (!accountKey) return;

Without that, a signed-out tab would poll for a 401 every eight seconds forever. A visitor who has not signed in has nothing bidding against them, which is the honest state rather than a missing feature.

What this costs

The grid no longer moves for a signed-out visitor. That was a real thing the old behaviour bought: a page with prices ticking up looks alive, and a first-time visitor now sees a still one until they make an account.

It is the right trade anyway. The alternative is an endpoint anybody can use to change what everybody else sees, defended by the observation that the data is not worth anything, and that defence stops working the first time the data is.

Rejected

Rate limiting it and leaving it open. It reduces the rate of the problem and keeps the property that an anonymous stranger can move other people's auctions. Rate limits are worth adding here for other reasons, and they are not a substitute for knowing who is asking.

Scoping the tick to the caller's own bids. This sounds tighter and makes the room worse: two people bidding on the same car would each see a different competitor, and the room would stop being a shared room, which the original comment predicted correctly.

Consequences

  • Every advance of shared auction state belongs to an account.
  • Signed-out visitors see a still grid. Signing in starts the room.
  • One fewer anonymous write endpoint. What remains is POST /api/errors/client, which is deliberate and bounded, and which should get a rate limit.

Where it sits

The gate itself sits in the Api host, where POST /api/market/tick in Endpoints/BidEndpoints.cs carries RequireAuthorization(), while what the room bids against stays in Application's Auction.RoomRound, and the front end's useBids hook stops asking when no account is signed in. Single responsibility, one reason to change per class, explains why the fix touched only the endpoint: who may advance the room is a host question, and what the room bids against is a use case that did not need to move. The price is a still grid for anyone signed out, which used to look alive with prices ticking up. If the room ever ran on a server timer instead of the page's tick, there would be no public endpoint to guard and this record would fall away.

Files

Addendum, 2026-10-03: the round moved into Application

The quoted bids.StandingAsBids() line and the candidate selection around it moved out of the tick endpoint into Auction.RoomRound (api/TheYard.Application/Shared/Auction/StandingReader.cs). The endpoint (api/TheYard.Api/Features/Bids/BidEndpoints.cs) requires a signed-in caller exactly as this record decided and calls one method. The room still answers everybody's standing.

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