Skip to content

Recover clients when hosted lobby authority departs - #36

Merged
James Lenell (jameslen-atg) merged 1 commit into
mainfrom
jameslen-microsoft-upstream-build-audit
Nov 16, 2026
Merged

James Lenell (jameslen-atg) merged 1 commit into
mainfrom
jameslen-microsoft-upstream-build-audit

Conversation

@jameslen-atg

Copy link
Copy Markdown
Member

Summary

Recover host-disconnect changes found uncommitted during the local-to-upstream audit. Observe Party peer-left and hosted-lobby ownership/member changes so clients return to the menu when their pinned host leaves, including during loading/countdown and behind popups. Defer handling until the native notice returns, fence stale lobby updates, and preserve healthy Party sessions during local-only Lobby notification drops.

Validation

  • Multiplayer suite: 1,421 assertions passed.
  • Sample voice and MicrosoftGame.config checks passed.
  • Regression coverage: host/peer departure, owner removal/change/disconnection, countdown losses, duplicate notices, and retired-lobby isolation.

Original Host disconnect recovery worktree is unchanged. Fresh PC and Xbox Series X|S layouts will be built from upstream main after this PR merges, using its pinned addon revision.

Preserve the audited host-disconnect work on current upstream. Observe Party peer-left and hosted lobby changes, defer session teardown, and cover host loss through loading, countdown, gameplay, and popups.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues are identified for the host-departure recovery changes.

No open issues 🎉

What changed in this PR

Improves client recovery when a hosted lobby’s pinned host departs, returning clients to the main menu during loading, countdown, gameplay, or while popups are open.

Changes:

  • Observes Party peer departures and hosted-lobby updates, deferring authority checks and fencing stale session notices.
  • Adds regression coverage for host loss, duplicate notices, retired lobbies, and continuity after local-only Lobby notification drops.
  • Documents the host-departure recovery behavior.
File Description
tools/​tests/​multiplayer_failure_tests.gd Adds a lobby state-change signal to the test fixture.
tools/​tests/​cable_pull_tests.gd Covers host departures and Lobby notification continuity across client states.
scripts/​services/​party_service.gd Observes lobby updates and limits peer-left notices to the attached context.
scripts/​autoload/​net_manager.gd Connects departure notices and schedules session-fenced authority checks.
docs/​multiplayer.md Explains host-loss detection and deferred teardown.

Review effort: Balanced

@jameslen-atg

Copy link
Copy Markdown
Member Author

No changes requested by this review. The host-departure regression suite passes, and the original local worktree is preserved.

🤖 AI-authored reply via Agency Finish PR.

@jameslen-atg
James Lenell (jameslen-atg) merged commit feef0d1 into main Nov 16, 2026
5 checks passed
@jameslen-atg
James Lenell (jameslen-atg) deleted the jameslen-microsoft-upstream-build-audit branch November 16, 2026 19:51
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