Web frontend and supporting services for lance.blue
headquarters plan match-lifecycle.md
11 kB


id: match-lifecycle title: A match starts, survives, and ends properly status: open repos: [headquarters, arena, infra] dependsOn: [] exitCriterion: > No match needs an operator to end it, and one that dies is noticed without anybody thinking to look. #

match-lifecycle #

Everything between a match being launched and its row being something nobody has to think about again. It spans all three repos because the failure modes do: a match can die in the container, in the control plane's idea of it, or in ECS, and only the three together cover it.

The common case is handled. arena enforces limits.idleTimeoutSeconds in-container — no sign of play for the limit shuts the task down, where "idle" means no join, return, round, phase or unit turn — and a list load of a ready match now re-checks it against ECS. What is left is everything that falls outside those two.

A match that dies quietly #

A match that ends badly #

A human's view of a live match #

The bar says when there is one: account.ts asks for the matches after it has read the session, and the filled link says Resume instead of Play when any of them is not over or failed. It is the same address either way — Play is the screen that lists the live ones — so this is a signpost, not a route. Signed out, and on the blog's pages, nothing is asked and nothing changes; an unreachable API leaves the label alone.

That makes the list's own idea of "still going" visible on every page of the site, which raises the cost of the stale rows above: a match the registry thinks is ready because nobody loaded it puts Resume on the bar for good.

And Play leads with them: "Matches in progress" is the first section on that screen, above "Start a match", so following Resume off the bar lands on the live match rather than on the way to open another one. The section takes itself away when the list comes back with nothing live, so a player with none is not made to read an empty box to reach the Modes. A failed read keeps the section and says so, because removing it would claim there is nothing going when nothing is known.

A player cannot tell whether it is us #

A human's view of an ended match #

Not part of this #

Whether a match produces a durable record is match-records. This epic is only about the row, the task and the container agreeing on whether a match is still alive.

Done #