Skip to content

guest sdk: room lifecycle declarations — resumable / ephemeral / resident#30

Merged
BCook98 merged 1 commit into
mainfrom
room-lifecycle-modes
Jun 7, 2026
Merged

guest sdk: room lifecycle declarations — resumable / ephemeral / resident#30
BCook98 merged 1 commit into
mainfrom
room-lifecycle-modes

Conversation

@BCook98

@BCook98 BCook98 commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

Kit half of the room-lifecycle-modes change (engine half follows; design in the platform spec workspace).

GameMeta.Lifecycle — a trailing presence-guarded byte after the large-room meta section:

value meaning
LifecycleResumable (0, default) hibernate on abandonment, player-driven resume — today's behavior, byte-compat for every existing artifact
LifecycleEphemeral after the abandonment grace the room ends and disposes — no snapshot, no Resume entry (casual social rooms; the grace still covers connection blips)
LifecycleResident one long-lived room per slug — persistent worlds; granted by the platform per slug, ungranted declarations behave as resumable
  • ABI major stays 2; older payloads decode as resumable; hosts treat unknown values as resumable.
  • Encode-time validation (both SDKs, fail-fast): undefined values rejected; resident + MinPlayers > 1 rejected (a resident room runs with zero members).
  • Rust crate mirrors field/enum/validation; goldens extended and the lifecycle suffix cross-checked against the actual Go encoder.
  • Docs: ABI.md (the byte + zero-member posture), GUIDE.md "Choosing a lifecycle" (including End() as the resident world-reset primitive).
  • go test ./... and cargo test green.

Sequencing: merge + tag v2.7.0 → engine PR pins it → catalog games declare ephemeral.

🤖 Generated with Claude Code

…dent

GameMeta.Lifecycle, a trailing presence-guarded byte after the
large-room meta section (ABI major stays 2; older payloads decode as
resumable, older hosts ignore the byte). resumable (0, default) is
today's hibernate-on-abandon. ephemeral ends and disposes after the
abandonment grace — no snapshot, no Resume entry — right for casual
social rooms. resident declares one long-lived granted room per slug;
the host treats unknown values as resumable. SDKs reject undefined
values and resident+MinPlayers>1 (a resident room runs with zero
members) at meta encode time. Rust crate mirrors field, validation,
and goldens (lifecycle suffix cross-checked against the Go encoder).
GUIDE.md gains "Choosing a lifecycle"; ABI.md documents the byte and
the zero-member posture.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@BCook98
BCook98 merged commit 40d8258 into main Jun 7, 2026
5 checks passed
@BCook98
BCook98 deleted the room-lifecycle-modes branch June 7, 2026 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant