[READY][Gameplay] #310 Host transition idempotency and error catalog for scoreboard -> next round / finish #320

Merged
agw merged 45 commits from dev/issue-310-host-transition-idempotency-v2 into main 2026-03-18 06:52:04 +01:00
Showing only changes of commit a9c6e4fd79 - Show all commits

View File

@@ -1,3 +1,4 @@
import inspect
import json
import tempfile
from datetime import timedelta
@@ -60,6 +61,24 @@ class LobbyGameplayExtractionTests(TestCase):
self.assertIs(lobby_views._finish_game, gameplay_services.finish_game)
self.assertIs(lobby_views._build_scoreboard_phase_event, gameplay_payloads.build_scoreboard_phase_event)
def test_start_next_round_view_source_stays_http_thin(self):
source = inspect.getsource(inspect.unwrap(lobby_views.start_next_round))
self.assertIn("transition = _start_next_round(session)", source)
self.assertNotIn("RoundConfig", source)
self.assertNotIn("RoundQuestion", source)
self.assertNotIn("build_start_next_round_response", source)
self.assertNotIn("build_start_next_round_phase_event", source)
def test_finish_game_view_source_stays_http_thin(self):
source = inspect.getsource(inspect.unwrap(lobby_views.finish_game))
self.assertIn("transition = _finish_game(session)", source)
self.assertNotIn("RoundConfig", source)
self.assertNotIn("RoundQuestion", source)
self.assertNotIn("build_finish_game_response", source)
self.assertNotIn("build_finish_game_phase_event", source)
@patch("lobby.views.sync_broadcast_phase_event")
@patch("lobby.views._start_next_round")
def test_start_next_round_view_delegates_transition_to_service(