feat(module-07): real-time presence, lobby chat backend - #10
Merged
Conversation
Git's core.autocrlf rewrote line endings on Windows, making a semantically identical checked-in manifest hash to a different seed revision. Hash the manifest with canonical LF endings so only real content changes move the checksum, and cover it with a checksum test.
Adds Dockerfile, CI/CD hardening (SBOM generation, provenance attestation, NuGet vulnerability gate, container smoke test), CodeQL and dependabot config, liveness/readiness health checks with a worker-readiness registry, correlation-id middleware, and structured JSON logging for containers. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…lobby chat backend Adds an authenticated /hubs/realtime SignalR hub with origin validation, connection tracking/rate limiting, and per-method scope/suspension/block rechecks; an in-memory presence registry; and persistent lobby chat (retention sweeper, idempotency, block-aware delivery) exposed over both the hub and REST history endpoints.
Lobby.Close/expiry only flipped the lobby's own state and never released individual LobbyMember rows still at Joined. The partial unique index on (UserId, Joined) then permanently blocked that user from joining or creating another lobby, even though the lobby itself was terminal. Found during module-07 E2E verification; also broadcasts readiness changes over the outbox so LobbyRealtimeHandler can consume them.
|
|
||
| try | ||
| { | ||
| using (_logger.BeginScope(new Dictionary<string, object?> { ["CorrelationId"] = correlationId })) |
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
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
What changed
RealtimeHubat/hubs/realtimewith presence tracking (Online/Away/InLobby/Playing/Offline, 5-connection cap).ChatService,ChatRepository,ChatRetentionSweeper).LobbyScopeAuthorizerre-checks lobby membership/auth on every hub method call (not cached); connections close on auth expiration.LobbyRealtimeHandlerbroadcasts lobby/chat events.Lobby.Close()now releases all joined members instead of leaving them stranded; broadcasts a readiness-changed event via outbox.AddChatAndRealtimeActivation.Tests
LobbyLifecycleTests).docs/modules/module-07-realtime-presence-chat/testing-report.mdin SimPle.Project).Security/docs
docs/security/audits/module-07-realtime-presence-chat.md(SimPle.Project).docs/modules/module-07-realtime-presence-chat/{api-reference,technical-flow,testing-report}.md.Risks/deferred
releaseEligibleremains false: containerized/staging deployment evidence and hosted CI are owned by Module 14, not this PR.