Module 6: Lobby & Matchmaking System (backend) - #9
Merged
Conversation
…lity domain models Adds the Lobby aggregate (members, invites, join credentials, settings, outcomes), matchmaking tickets/bands/assignments, and game capability profiles, plus the additive EF Core migration and entity configurations backing them.
…es, matchmaking, and outbox Adds LobbiesService (create/join/leave/start/credential rotation), MatchmakingService/Coordinator (ticket lifecycle, band widening, proposal building), the transactional outbox handlers and options, and the expiry sweeper. Flips GameEntryActions gating for the three module-owned entry points now that lobby/matchmaking is implemented.
…rs, and capability seeding Adds the Postgres-backed lobby/matchmaking/outbox repositories, the advisory-lock command runner, the HMAC join-credential hasher and in-memory join-failure throttle, the lobby-expiry and matchmaking background workers, the outbox dispatcher, and the game-capability profile seeder with its versioned seed manifest.
…points Adds LobbiesController, MatchmakingController, and MatchRematchController; registers the new services/workers/options in the composition root and appsettings.
Covers lobby lifecycle/credentials/host-transfer/readiness, matchmaking band widening/proposal building/coordinator/outbox processing, and capability-profile seeding, including Postgres-backed concurrency and migration smoke tests. 862/862 unit, 375/375 integration against real PostgreSQL.
The module-06 backend PR intermittently failed CI in GameHostSerializerHardeningTests with Engine.ExecutionBudgetExceeded instead of the expected rejection code, while the identical commit passed on a separate CI trigger moments later. The integration suite has no [Collection] fixtures, so every test class is its own xUnit collection and runs in parallel by default; with ~340 test classes now hitting a shared Postgres instance and spawning worker threads, GitHub's 2-vCPU runners can starve the .NET thread pool enough that GameHostInvoker's cooperative-cancellation watchdog (Execute, 550ms budget) times out on trivial, non-CPU-bound work. Disabling collection parallelism via xunit.runner.json removes the contention without touching the engine's timing budget, which is pinned by EngineLimitsTests and requires an ADR to change.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
IMatchRuntimeProbegates Start/Quick-Match and the only reachable outcome today isMatchRuntimeUnavailable. Matches are not playable yet.What changed
src/SimPle.Domain/{Lobbies,Matchmaking,Capabilities}— new aggregates/entities20260711195731_AddLobbyMatchmakingAndCapabilities(additive, applied cleanly to real Postgres)src/SimPle.Application/{Lobbies,Matchmaking,Outbox,Expiry}— services, DTOs, outbox handlerssrc/SimPle.Infrastructure— repositories, background workers, capability seedingsrc/SimPle.Api/Controllers/{Lobbies,Matchmaking,MatchRematch}Controller.cs— API endpointstests/SimPle.UnitTests,tests/SimPle.IntegrationTests— new coverage including Postgres-backed concurrency and migration smoke testsTests
dotnet ef database update: migration applied cleanlySecurity/docs
SimPle.Projectaudit doc).SimPle.ProjectPR.Risks/deferred
IMatchRuntimeProbeuntil Module 8 registers a runtime.releaseEligible: false— no CI/staging/deployment yet, expected until Module 14's shared CI/container/staging foundation.