Skip to content

feat: start match searches through internal Players and Builds APIs - #120

Merged
PANiXiDA merged 14 commits into
developmentfrom
feat/start-match-search
Oct 29, 2026
Merged

PANiXiDA merged 14 commits into
developmentfrom
feat/start-match-search

Conversation

@PANiXiDA

@PANiXiDA PANiXiDA commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Add authenticated POST /api/v1/match-searches accepting buildId and mode, returning 204 No Content on success. Matchmaking resolves the current user's player and selected build through the Players and Builds internal APIs. Missing players, unavailable builds, and builds owned by another player return 404.

Each provider exposes a dependency-free Contracts API with nullable response DTOs. The implementations live in their owning Presentation/Internal folders and dispatch the ordinary GetInternalPlayer and GetInternalBuild Application queries through Mediator. Handlers, validators, and read models remain in Application; EF projection and soft-delete filtering remain behind read repositories in Infrastructure. Host registration includes each module's Presentation services.

Matchmaking declares IPlayersClient and IBuildsClient in Application/Abstractions and its PlayerReadModel and BuildReadModel in Application/ReadModels, both implementing IReadModel. IBuildsClient.GetByIdAsync now returns the persisted build's ID and player ID through Builds.Contracts. Application validates the returned player ID before accessing its domain value and checks build ownership. Outgoing clients are registered through Clients/DependencyInjection/AddClients().

Start only creates a new search. Existing Searching or Matched entries return 409, including overdue Searching entries, without updating or replacing them. GetActiveByPlayerIdAsync uses EF LINQ and standard soft-delete filtering. The unique active-player index prevents duplicate active searches, and xmin protects concurrent updates. Translating a racing insert's unique-index violation into 409 is deferred; that case can currently produce 500.

Functional tests use persisted Players and Builds data, including foreign and deleted builds, and verify that nested module queries preserve the outer Matchmaking command's persistence flow. Architecture tests require every public module I*Api contract to have one implementation in its owning Presentation assembly.

Validation:

  • Full Release solution build passed without warnings or errors.
  • Builds: 39 unit, 14 integration, and 6 functional tests passed.
  • Matchmaking: 99 unit, 30 integration, and 18 functional tests passed.
  • All 505 architecture tests passed.
  • 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-29T08:57:32.212261Z 7bd851c 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 feat: add match search start endpoint feat: start match searches through the Players module API Oct 28, 2026
@PANiXiDA PANiXiDA changed the title feat: start match searches through the Players module API feat: start match searches through the internal Players API Oct 28, 2026
@PANiXiDA PANiXiDA changed the title feat: start match searches through the internal Players API feat: start match searches through internal Players and Builds APIs Oct 29, 2026
@PANiXiDA

Copy link
Copy Markdown
Contributor Author

@codex

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: 7bd851cf3a

ℹ️ 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-sonarqube

Copy link
Copy Markdown

@PANiXiDA
PANiXiDA merged commit c19fdea into development Oct 29, 2026
39 checks passed
@PANiXiDA
PANiXiDA deleted the feat/start-match-search branch October 29, 2026 09:02
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