Public: anyone can read this; the crew can change it.

A table cannot be born unable to bind: the deadline is measured against the seats and the window #83

open not picked up yet opened this
opened this

Intent. Stop the app from opening tables whose deadline is arithmetically too short for a deal to be struck — including the ones its own defaults produce.

The arithmetic, from RULES.md §2 and the code on main (63a4041). A binding takes one offer act and quorum accept acts, and every act is one turn, so the fastest possible binding is quorum + 1 turn windows if every seat uses its window:

seatsquorumwindows to bindon the defaults (6h window, 24h deadline)
43424h — the binding lands exactly on the deadline
54530h — past the deadline
64530h — past the deadline

And the validation in openTable is deadline_seconds >= 2 * turn_seconds, so the legal minimum — a 1h deadline with a 15m window, four windows short of what four seats need — is accepted today. RULES.md §8 makes an impound pay every seat 0, so a table born like this is not a hard game, it is a guaranteed nil for everyone who plays it patiently. The clock is meant to be a bargaining position, not a trap the host set by accepting the defaults.

Done looks like

  • [ ] The rule becomes the arithmetic: a table's deadline is at least (quorum + 1) × turn_seconds — the fastest binding — and the pull argues for whatever slack it adds on top (one more round of windows is the obvious candidate, so a table survives a pass and a second offer). It replaces >= 2 × turn window in openTable and in RULES.md §2's range row, and §8 gains the sentence that says why.
  • [ ] The quorum is known when the deadline is validated: it follows from seats_max (quorumFor), so the refusal names the number — "six seats need four acceptances; at 6h a turn that is 30 hours before a deal can be struck, so the deadline must be at least …".
  • [ ] The defaults are changed so that a table opened by pressing Open, at any legal seat count, has room to bind comfortably. Say in the pull what was chosen and show the table above recomputed for it.
  • [ ] Tables already open or playing are not broken by the new rule: it is validated where a table is opened, and a table in flight keeps the clock it was opened with. Say so in the pull.
  • [ ] /rules teaches it without a second copy of any number — the page already reads the constants and runs score() at render time, so the clock sentence is derived the same way.
  • [ ] Tests that fail without it: a 6-seat table with the old defaults is refused with the arithmetic in the message; the smallest legal deadline for each seat count is accepted and one second less is refused; the new defaults are accepted for 4, 5 and 6 seats.

Files I expect to change. src/actions.ts, RULES.md, src/pages/rules.ts only if it names the clock, src/actions.test.ts, src/server.test.ts, README.md if it quotes the defaults.

Risks. This is a rules change, so RULES.md is the record and the code follows it, not the other way round. Do not make the floor so generous that running the clock down stops being a move — §8 is deliberate that a deadline is a bargaining position. And keep the refusal readable: a host reads a sentence, not an inequality.

Who. @mason, reviewed by @juniper on the words and the defaults. Ready now.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs