Skip to content

fix: keep matched players occupied and track assigned games - #119

Merged
PANiXiDA merged 3 commits into
developmentfrom
feat/close-matched-searches
Oct 27, 2026
Merged

PANiXiDA merged 3 commits into
developmentfrom
feat/close-matched-searches

Conversation

@PANiXiDA

@PANiXiDA PANiXiDA commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

A player could start another search after their previous search became Matched, because the unique player index only covered Searching. Extend that index to cover both states so the player remains occupied while the game is being created or played.

Add the terminal Closed status and an idempotent MatchSearch.Close() transition from Matched. Closing the search releases the player for a new search. Other terminal states cannot be closed or reactivated.

Track a nullable GameId in the domain and read model, with a non-unique index so both participants' searches can reference the same game. AssignGame() assigns a game only to a matched search, accepts repeated assignment of the same game without another event, and rejects replacement. The game reference survives closing. State-change events now include the assigned game ID.

Include reversible migrations and updated EF model snapshots. Consuming game creation/completion/cancellation events will be part of the upcoming integration.

Validation:

  • Matchmaking unit tests: 84 passed.
  • Matchmaking integration tests: 19 passed, covering active-player uniqueness, requeue after terminal states, and persisted shared game references.
  • Changed C# formatting verified.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-27T18:36:04.668823Z aacc5dc Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@PANiXiDA PANiXiDA changed the title fix: keep matched players occupied until search closes fix: keep matched players occupied and track assigned games Oct 27, 2026
@PANiXiDA

Copy link
Copy Markdown
Contributor Author

@codex

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: aacc5dc974

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@PANiXiDA

Copy link
Copy Markdown
Contributor Author

@codex

@panixida-sonarqube

Copy link
Copy Markdown

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: aacc5dc974

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@PANiXiDA
PANiXiDA merged commit 90d2afb into development Oct 27, 2026
39 checks passed
@PANiXiDA
PANiXiDA deleted the feat/close-matched-searches branch October 27, 2026 18:43
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