feat: game lobby service

This commit is contained in:
Ilia Denisov
2026-04-25 23:20:55 +02:00
committed by GitHub
parent 32dc29359a
commit 48b0056b49
336 changed files with 57074 additions and 1418 deletions
+23 -4
View File
@@ -34,6 +34,11 @@ integration/
│ └── notification_mail_test.go
├── notificationuser/
│ └── notification_user_test.go
├── lobbyuser/
│ └── lobby_user_test.go
├── lobbynotification/
│ ├── lobby_notification_test.go
│ └── race_name_intents_test.go
├── go.mod
├── go.sum
└── internal/
@@ -81,14 +86,24 @@ integration/
across real `Edge Gateway`, real `Auth / Session Service`, real
`User Service`, and real `Mail Service`, including the regression that
auth-code mail bypasses `notification:intents`.
- `lobbyuser` verifies the synchronous eligibility boundary between real
`Game Lobby` and real `User Service`, including the happy path,
permanent_block rejection, unknown user, and transient User Service
unavailability.
- `lobbynotification` verifies the producer side of `Game Lobby →
notification:intents`, covering all eleven `lobby.*` intent types from
applications, invites, member operations, runtime pause, cascade
membership block, and the three race-name intents emitted by capability
evaluation at game finish and by self-service registration.
The current fast suites still use one isolated `miniredis` instance plus either
real downstream processes or external stateful HTTP stubs where appropriate.
`authsessionmail`, `gatewayauthsessionmail`, `notificationgateway`,
`notificationmail`, `notificationuser`, and `gatewayauthsessionusermail` are
the deliberate exceptions: they use one real Redis container through
`testcontainers-go`, because those boundaries must exercise real Redis stream,
persistence, or scheduling behavior.
`notificationmail`, `notificationuser`, `gatewayauthsessionusermail`,
`lobbyuser`, and `lobbynotification` are the deliberate exceptions: they use
one real Redis container through `testcontainers-go`, because those
boundaries must exercise real Redis stream, persistence, or scheduling
behavior.
`authsessionmail` additionally contains one targeted SMTP-capture scenario for
the real `smtp` provider path, while `gatewayauthsessionmail` keeps `Mail
Service` in `stub` mode and extracts the confirmation code through the trusted
@@ -110,6 +125,8 @@ go test ./notificationgateway/...
go test ./notificationmail/...
go test ./notificationuser/...
go test ./gatewayauthsessionusermail/...
go test ./lobbyuser/...
go test ./lobbynotification/...
```
Useful regression commands after boundary changes:
@@ -125,6 +142,8 @@ go test ./notificationgateway/...
go test ./notificationmail/...
go test ./notificationuser/...
go test ./gatewayauthsessionusermail/...
go test ./lobbyuser/...
go test ./lobbynotification/...
cd ../gateway && go test ./...
cd ../authsession && go test ./... -run GatewayCompatibility
cd ../user && go test ./...