claude-memory/graph/solutions/auto-start-game-when-both-lineups-submitted-4b9394.md
Cal Corum b140d4d82a migrate: 313 memories from MemoryGraph
- 313 new markdown files created
- 30 relationships embedded
- 313 entries indexed
- State initialized with usage data
2026-02-13 11:11:48 -06:00

13 lines
882 B
Markdown

---
id: 4b939448-4f73-45d8-9a0a-daf20c497304
type: solution
title: "Auto-start game when both lineups submitted"
tags: [strat-gameplay-webapp, python, fastapi, websocket, fix]
importance: 0.6
confidence: 0.8
created: "2026-01-16T20:56:49.821732+00:00"
updated: "2026-01-16T20:56:49.821732+00:00"
---
Fixed game auto-start in strat-gameplay-webapp. Three issues: 1) game_engine.start_game() only broadcast decision_required, not game_state_update - frontend had stale state. 2) /lineup-status safeguard only in database path, not in-memory path - game recovered by WebSocket bypassed it. 3) state_manager._rebuild_state_from_data() used .get(key, default) which doesn't work for explicit None values from DB - changed to 'or' pattern. Fix: broadcast game_state_update in start_game(), add safeguard to both paths in /lineup-status, use 'game.get(key) or default' for None handling.