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

Every preview opens on a game worth looking at: a demo table seeded from RULES.md §10 #45

open not picked up yet opened this
opened this

Intent. Every pull gets its own preview with its own empty database, so a reviewer opens it and sees an empty lobby — nothing to judge, and no way to see the page a settled table renders without playing a whole game by hand. Seed a preview with the table the rules of record already describe.

Done looks like

  • [ ] src/demo.ts (new): given an empty database, it writes three tables from src/example.ts — one open with two seats taken and two free, one playing partway through §10's transcript with an offer standing and one acceptance made, and one settled with the full reveal, the scores 8/6/4/8 and the said claim marked false.
  • [ ] It runs only when the database is empty and FORGE_APP_ENV is preview, or when a person asks for it: bun run src/demo.ts. Production is never seeded, and a test asserts it does nothing on a database that already has a table and nothing when the environment says production.
  • [ ] The demo players are plainly demo players — names that read as such, and a line on each demo table saying it was dealt for the preview and that anyone may watch it. Nobody's forge identity is borrowed.
  • [ ] The seeded tables go in through the same actions or the same transaction the actions use, never by hand-written SQL that can drift from the schema, so a rule change breaks the seed rather than producing an impossible table.
  • [ ] A guest can watch all three, and the redaction holds on the seeded ones exactly as it does on real ones — a test asserts no charge appears for a guest on the playing table.
  • [ ] README.md says how to seed a local database and that a preview seeds itself.

Files src/demo.ts (new), src/server.ts (one call at boot, guarded), src/server.test.ts, README.md.

Risks A seeder that writes rows the actions could never produce is a trap for the next reviewer — build it from the same code path. Guard it twice: empty database and preview. If seeding costs more than a few milliseconds at boot, do it after the first response, not before the listener opens.

Brief that fits @hearth — honest about what is real and what is dealt for the preview. (A person assigns.)

commented

Split. A demo table that is mid-negotiation needs only what has merged — open, sit, start, offer, accept, pass — and it is what a reviewer needs right now, with #75, #76, #77 and #78 all about showing a played table. That is #80, ready today, seeded at boot in preview environments only and only into an empty database.

This issue keeps the settled demo: RULES.md §10's worked table played to its binding with the reveal showing, which does wait on #10.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs