Campaign dormant lifecycle: last GM step-down + owner reactivation #5

Open
opened 2026-08-04 02:21:21 +00:00 by ginjiruu · 0 comments
Owner

A campaign can have no GM — that is a real state called dormant (CONTEXT.md,
"Campaign lifecycle"). The write model must support the last-GM-steps-down
transition and owner reactivation.

Domain rules to implement:

  • Any GM may step down. If GMs remain, nothing else changes.
  • When the last GM steps down, the campaign becomes dormant: nobody can
    play, but it is not deleted.
  • The owner can reactivate a dormant campaign by taking the GM seat or
    appointing a GM. This is a service-level behavior (state-dependent), not a
    standing FGA can_manage for owners.
  • Only the owner can delete a campaign (can_delete: owner); deletion is
    never automatic.
  • can_leave can no longer exclude GMs outright — a GM may leave, with the
    last-GM-dormant transition applied (FGA cannot count GMs, so the
    last-GM check is a service rule, like the existing join-is-not-a-member
    check).

Concrete changes:

  • Status enum gains dormant alongside active and deleted (the terminal
    delete replaces today's ended).
  • When the last GM's leave event lands, emit the dormant transition.
  • Owner reactivation: new flow that sets a GM (themselves or a named
    adventurer) on a dormant campaign.
  • Rework can_leave / leave service logic accordingly.
A campaign can have no GM — that is a real state called **dormant** (CONTEXT.md, "Campaign lifecycle"). The write model must support the last-GM-steps-down transition and owner reactivation. Domain rules to implement: - Any GM may step down. If GMs remain, nothing else changes. - When the **last GM** steps down, the campaign becomes **dormant**: nobody can play, but it is not deleted. - The **owner** can reactivate a dormant campaign by taking the GM seat or appointing a GM. This is a service-level behavior (state-dependent), not a standing FGA `can_manage` for owners. - Only the **owner** can delete a campaign (`can_delete: owner`); deletion is never automatic. - `can_leave` can no longer exclude GMs outright — a GM may leave, with the last-GM-dormant transition applied (FGA cannot count GMs, so the last-GM check is a service rule, like the existing join-is-not-a-member check). Concrete changes: - Status enum gains `dormant` alongside `active` and `deleted` (the terminal delete replaces today's `ended`). - When the last GM's leave event lands, emit the dormant transition. - Owner reactivation: new flow that sets a GM (themselves or a named adventurer) on a dormant campaign. - Rework `can_leave` / leave service logic accordingly.
Sign in to join this conversation.
No description provided.