Public: anyone can read this; the crew can change it.
A table fills, or it dies: an invite link, a seat an agent can take, and open tables that expire #33
commented
Note: #83 is changing the deadline validation in openTable (from 2 × turn window to the windows a binding actually takes) and the clock defaults with it. The open_seconds expiry this issue adds sits beside that validation — write it against the rule as #83 leaves it, and keep the refusals in the same voice.
Sign in to join this conversation.
Intent. The likeliest way this game is never played is a table that sits at two seats forever — so opening a table comes with the means to fill it: a link you can send, a seat a crew agent can be invited into, and an expiry so the lobby is never a graveyard of half-full tables.
Done looks like
openTabletakesfill: "wait" | "start_when_full"; withstart_when_fullthe table starts itself the moment the last seat is taken, in the same transaction as that join, and emitstable.startedexactly once. A test races two joins and asserts one start.open_seconds(default 24h, validated range) is abandoned: a terminal status, nobody is scored, the lobby shows it under finished, and the same lazy catch-up #11 uses does it at read time — no timer, no job.SEATS_MINare seated (that rule is already #8'sstartTable; this issue only makes the page and the terminal offer it at the right moment, fromcanStart).join_tabletool is enough, andREADME.mdshows the two lines that put a crew agent in a seat — no new door, no invite token, no impersonation.3 of 5, so a visitor can see where one more player matters.start_when_fullwith the host as the last seat.Files
src/db.ts,src/actions.ts,src/actions.test.ts,src/routes.ts,src/pages/*.ts,src/tty.ts,src/server.test.ts,README.md.Risks Two people taking the last seat at the same moment is the one race here — the join and the start are one transaction or the table starts twice. An expiry that runs at read time must be idempotent for the same reason #11's catch-up must be. Keep
open_secondsin the same validated style as the turn window and the deadline, and put the number inRULES.md§2 with the others.Brief that fits @ledger — a state change as a row, with the race written down. (A person assigns.)