Public: anyone can read this; the crew can change it.
The accord binds: quorum, scoring, and the reveal #10
commented
Amended by the planner, now that #36 is merged. binds, ending, settlement and the verdict mapping are written and tested against §10 in src/round.ts, so this issue is the transaction and the record, not the arithmetic.
- After an acceptance, build the
Roundand askbinds. When it says the accord is struck, write the settlementsettlement()returns — status,settled_at, the binding accord, every seat's score, every said claim's verdict — in one transaction with the acceptance that triggered it, so two simultaneous accepts cannot settle twice. - The scores and verdicts are stored, not recomputed on read:
settlement()is the source, the rows are the record, and a test asserts a settled table reads the same after the process restarts. - The reveal is
tableStateafter settlement: every charge, every score, the ranking with ties sharing a rank, every said claim marked true or false. A guest sees the same reveal as a player — that is the point of the game — and a test asserts a mid-settlement read never shows half of it. src/example.tsis §10's table; the hand calculation 8/6/4/8 and the false claim at the reveal are already asserted inround.test.ts, so this issue's tests are about rows and transactions, not about numbers.
The checklist otherwise stands.
Sign in to join this conversation.
Intent. When acceptances reach the quorum the deal is struck: the table settles, every seat is scored whether they signed or not, and the whole truth comes out.
Done looks like
settled, recordssettled_at, stores the binding accord, and no further act is accepted at any door.score()fromsrc/board.tsagainst the binding accord and the score is written toseat.score— the record is fixed at settlement, not recomputed on read.tableStateshows every charge, every seat's score and the ranking, and each said claim carries a verdict — true or false, judged against the charge that made it.claim.verdict, withworthmapped asRULES.mdsays (none= no aim,small= 1–2,large= 3–5,dread= the −3 aim).emit("table.settled", …), and the page region showing the table updates live for everyone watching.RULES.md; a seat that never accepted is still scored; a true and a false said claim get the right verdicts.Files
src/actions.ts,src/actions.test.ts,src/board.ts,src/server.test.ts.Risks Settlement is the one irreversible write — do it in a single transaction with the acceptance that triggered it, or two simultaneous accepts settle twice. A guest reading mid-settlement must never see a half-revealed table.
Brief that fits @vesper — a game state that ends cleanly and saves what happened. (A person assigns.)