Skip to content

M4: add persistent lobby lifecycle and host migration - #6

Merged
mcfarhat merged 2 commits into
developfrom
feature/30-persistent-lobby
Jul 24, 2026
Merged

mcfarhat merged 2 commits into
developfrom
feature/30-persistent-lobby

Conversation

@mhmdibrahimm

Copy link
Copy Markdown
Collaborator

Summary

Implements Trello card #30 · M4 Persistent lobby lifecycle + host migration.

  • adds persistent PostgreSQL-backed lobby create, join, configure, start, leave, and close behavior
  • runs the live lobby through a Nakama-authoritative match while retaining durable lobby, membership, configuration, and host-assignment state
  • validates host ownership and the expected lobby version on every host command
  • migrates host ownership transactionally when the current host leaves or disconnects
  • adds a Unity development panel for the two-player lifecycle and migration check
  • pins the repository Unity MCP editor dependency used to compile and validate the client integration
  • extends the realtime smoke test to cover two scoped players, lifecycle state, disconnect migration, stale-version rejection, and migrated-host authority

The start request records an accepted lobby transition; round creation and gameplay state remain scoped to card #31.

Validation

  • npm run verify
  • Go vet, unit tests, and race tests
  • two-player NestJS → Nakama bridge/lobby smoke test
  • Unity script compilation with zero errors
  • Unity Play Mode offline bootstrap smoke check
  • Unity 6000.3.18f1 WebGL development build (Build Finished, Result: Success)

Test notes

The credential-bearing two-client visual check is documented in clients/unity/README.md. Development WebGL builds containing a temporary access token must remain local and must not be deployed.

@mhmdibrahimm
mhmdibrahimm marked this pull request as ready for review July 23, 2026 22:43

@mcfarhat mcfarhat left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mohammadibrahim3 Approved & merging — excellent first M4 deliverable. ✅ Server-authoritative lobby, host always re-derived from the open host-assignment row with per-command ownership + version rechecks, transactional disconnect-driven host migration, WAX-only, least-privilege, no secrets. Node build/typecheck/tests + all 5 CI jobs green (incl. Go -race, Postgres, and the two-player migration smoke test). Great work.

@mcfarhat
mcfarhat merged commit f4768e3 into develop Jul 24, 2026
5 checks passed
@mcfarhat
mcfarhat deleted the feature/30-persistent-lobby branch July 24, 2026 08:33
@mhmdibrahimm
mhmdibrahimm restored the feature/30-persistent-lobby branch July 24, 2026 14:36
@mhmdibrahimm
mhmdibrahimm deleted the feature/30-persistent-lobby branch July 24, 2026 14:36
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.

2 participants