M3 slice 2: Getting in #17

Closed
opened 2026-11-14 20:55:42 +01:00 by SirStone · 1 comment
Owner

What

Players and player keys; fff-vtt gm-key CLI (creates the single GM, prints key, --new rotates; must run as the NixOS service user, DESIGN 11.1); POST /join with key sign-in; sessions and cookies (non-expiring); Origin check; /ws upgrade checks; connection caps 4 per player (oldest closed) and 16 total. Key create, key replace (old sessions and live connections closed), remove player, one key on several devices. See DESIGN 3.2, 3.4, 4.3, 6.5, 6.6, 8.

Acceptance

  • Test group auth green: key create; key replace closes old sessions and live connections; remove player; one key on several devices; Origin mismatch rejected; cookie flags present.
  • Visitor without key gets no session; wrong key refused.
  • 5th connection of one player closes the oldest; 17th total refused.
  • gm-key re-run prints same key; --new refuses while server holds the data dir lock.
  • devbox run test green.

Decide while building

DDL for players/keys/sessions, key format and length, cookie name, gm-key CLI wiring. Record as FIXED (owner-delegated) in DESIGN.

Refs

Map #2. Decisions: #5 First GM login, #6 Players and invites, #15 M3 limits, #10 Library check: mummy and db_connector. DESIGN 3.2, 3.4, 4.3, 6.5, 6.6, 8, 11.1, 13 (M3 group 5).

## What Players and player keys; `fff-vtt gm-key` CLI (creates the single GM, prints key, `--new` rotates; must run as the NixOS service user, DESIGN 11.1); `POST /join` with key sign-in; sessions and cookies (non-expiring); Origin check; `/ws` upgrade checks; connection caps 4 per player (oldest closed) and 16 total. Key create, key replace (old sessions and live connections closed), remove player, one key on several devices. See DESIGN 3.2, 3.4, 4.3, 6.5, 6.6, 8. ## Acceptance - Test group **auth** green: key create; key replace closes old sessions and live connections; remove player; one key on several devices; Origin mismatch rejected; cookie flags present. - Visitor without key gets no session; wrong key refused. - 5th connection of one player closes the oldest; 17th total refused. - `gm-key` re-run prints same key; `--new` refuses while server holds the data dir lock. - `devbox run test` green. ## Decide while building DDL for players/keys/sessions, key format and length, cookie name, `gm-key` CLI wiring. Record as FIXED (owner-delegated) in DESIGN. ## Refs Map #2. Decisions: #5 First GM login, #6 Players and invites, #15 M3 limits, #10 Library check: mummy and db_connector. DESIGN 3.2, 3.4, 4.3, 6.5, 6.6, 8, 11.1, 13 (M3 group 5).
SirStone added the ready-for-agent label 2026-11-14 20:55:42 +01:00
SirStone added a new dependency 2026-11-14 20:56:11 +01:00
SirStone added a new dependency 2026-11-14 20:56:12 +01:00
SirStone added a new dependency 2026-11-14 20:56:18 +01:00
Author
Owner

Slice complete and merged to main.

Commits:

  • e612db5 server: auth schema, keys, sessions, connection registry (#17)
  • 9d43aef server: /join, session cookies, ws auth and gm-key CLI (#17)
  • f85665b design: record slice 2 decisions (#17)
  • 8ff6653 results: slice 2 test and mutation logs (#17)
  • 527e216 design: mark sign-in path and ws origin check fixed (#17)

Gate: devbox run test + devbox run mutation green on the final tree.

Slice complete and merged to `main`. Commits: - `e612db5` server: auth schema, keys, sessions, connection registry (#17) - `9d43aef` server: /join, session cookies, ws auth and gm-key CLI (#17) - `f85665b` design: record slice 2 decisions (#17) - `8ff6653` results: slice 2 test and mutation logs (#17) - `527e216` design: mark sign-in path and ws origin check fixed (#17) Gate: `devbox run test` + `devbox run mutation` green on the final tree.
Sign in to join this conversation.