Module 5: Game Hosting Architecture (backend) - #8
Merged
Conversation
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
GameHostplugin-contract layer: a typedIGameDefinition<TState,TCommand,TPlayerView>contract, a non-generic host adapter, aTryResolve(slug, engineVersion)registry, an allow-listedSystem.Text.Jsoncodec with a checksummed byte envelope, aPCG32-v1deterministic RNG, a size/budget/redaction invoker boundary, and a catalog/engine-compatibility validator.IGameEngine.cs,GameSession.cs, and the oldIGameRegistry.cscontract) they replace.What changed
feat: GameHost domain contracts (envelopes, RNG, error codes) + removal of legacy stubsfeat: GameHost application services (codec, registry, invoker, catalog validator) + DI/Program.cswiring with startup fail-fast on duplicate/mismatched catalog entriestest: 177 unit + 12 integration tests (189/189 passing), including a two-process golden-vector determinism proof and a Stopwatch benchmarkTests
dotnet test --filter "FullyQualifiedName~GameHost": 189/189 passed (177 unit + 12 integration)dotnet testprocesses produced byte-identical golden-vector SHA-256 hashes (10/10 vectors)GameHostBenchmarkTests: p95 = 0.0293 ms (budget < 25 ms), max single command 12.1803 ms (soft budget ≤ 100 ms)check-contract-drift.mjs: DRIFT=0 (no new route/frontend surface)Security/docs
--security=asvs-litebackend review complete: zero unwaived Critical/High/Medium findings. 3 deferred non-blocking findings (M05-001 Low, M05-002/M05-003 Info) — seeSimPle.Project/docs/security/audits/module-05-game-hosting-architecture.md.api-reference.md,technical-flow.md,testing-report.md) are in the companionSimPle.ProjectPR.Risks/deferred
Array.Empty<IHostedGameDefinition>()inProgram.cs) — intentional, valid state.