Skip to content

Module 4: Game Library & Discovery backend - #7

Merged
MohanEhab merged 3 commits into
mainfrom
feature/module-04-game-library-discovery
Jul 11, 2026
Merged

Module 4: Game Library & Discovery backend#7
MohanEhab merged 3 commits into
mainfrom
feature/module-04-game-library-discovery

Conversation

@MohanEhab

Copy link
Copy Markdown
Contributor

Summary

  • Adds the Module 4 game catalog: domain, additive schema, checksum-verified seeder, and a full read/favorites API with cache/ETag/rate-limiting.

What changed

  • Domain: Game, GameTag, GameModeCapability, UserFavoriteGame, CatalogSeedHistory entities and EF configurations.
  • Two additive migrations (AddGameCatalog, AddGameLifecycleVersion), a checksum-verified seed manifest (8 neutral-named games), and an advisory-locked idempotent seeder CLI.
  • GamesController (list/detail/featured/favorites) via GamesService/GameRepository, cursor pagination, ETag/304, an outbox for favorite/lifecycle events, and 3 dedicated rate-limiter policies.

Tests

  • Unit: 412/412 full-solution pass.
  • Integration (non-Postgres HTTP contract): 219/219 pass.
  • Integration (real Postgres, disposable scratch role): 32/32 pass (migrations, seeder, concurrency races).
  • Full-solution build: 0 errors, 0 warnings.

Security/docs

  • --security=light backend review: zero Critical/High. 2 Low (sort-index gap, favorites-list index gap) + 1 Info (project-wide correlation id), all deferred/non-blocking.
  • Audit: SimPle.Project/docs/security/audits/module-04-game-library-discovery.md (companion PR).

Risks/deferred

  • Name/Difficulty catalog sorts can't use their raw-column indexes for a computed-expression ORDER BY (ground-truth confirmed via EXPLAIN); bounded by current catalog size and rate limits.
  • Favorites-list query has no supporting composite index; correctness unaffected at current volumes.
  • UserFavoriteGame has no row-level concurrency token; conflict detection relies on the outbox's unique index instead (verified correct under real concurrent writers).
  • Full canonical final evidence: docs/ai-workflow/evidence/module-04-game-library-discovery-run-2026-07-10T18-17-48-742Z-304902dc-abd4-4cd5-a4a2-77ea3e9d2233.json (workflow repo, not part of this PR).

Adds Game/GameTag/GameModeCapability/UserFavoriteGame/CatalogSeedHistory
entities, EF configurations, two additive migrations, and the
checksum-verified seed manifest + advisory-locked seeder CLI for the
canonical 8-game catalog.
Wires GamesController (list, detail, featured, favorites) through
GamesService/GameRepository with cache/ETag/304 handling, cursor
pagination, an outbox for favorite/lifecycle events, and three
dedicated rate-limiter policies for catalog reads, search, and
favorites.
Unit tests for the Game/UserFavoriteGame domain, GamesService, and
cursor codec; integration tests for migrations, the seeder (advisory
lock, checksum, rerun idempotency), HTTP contract, and real-Postgres
concurrency (favorite races, seed races).
@MohanEhab
MohanEhab merged commit dffa70e into main Jul 11, 2026
2 checks passed
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