From f3d4dd89bcde6e6211804efb2b6f6a97d581c45d Mon Sep 17 00:00:00 2001 From: Russell Ballestrini Date: Mon, 11 Aug 2025 12:47:25 -0400 Subject: [PATCH] Add debug output for Game Over metadata filtering to investigate STFU bug when game actually ends --- app.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/app.py b/app.py index 9228bc6..5cd7044 100644 --- a/app.py +++ b/app.py @@ -2644,7 +2644,7 @@ def provide_feedback_prompts( k: v for k, v in full_metadata.items() if k in filter_keys } - # Special debug for Ship Status + # Special debug for Ship Status and Game Over if prompt_name == "Ship Status": print(f"DEBUG SHIP STATUS - filter_keys: {filter_keys}") print(f"DEBUG SHIP STATUS - filtered metadata: {prompt_metadata}") @@ -2654,11 +2654,21 @@ def provide_feedback_prompts( print( f"DEBUG SHIP STATUS - ai_sunk_ship_this_round = '{prompt_metadata.get('ai_sunk_ship_this_round')}'" ) + elif prompt_name == "Game Over": + print(f"DEBUG GAME OVER - filter_keys: {filter_keys}") + print(f"DEBUG GAME OVER - filtered metadata: {prompt_metadata}") + print(f"DEBUG GAME OVER - game_over = '{prompt_metadata.get('game_over')}'") + print(f"DEBUG GAME OVER - user_wins = '{prompt_metadata.get('user_wins')}'") + print(f"DEBUG GAME OVER - ai_wins = '{prompt_metadata.get('ai_wins')}'") else: if prompt_name == "Ship Status": print( f"DEBUG SHIP STATUS - NO metadata_filter, full metadata: {prompt_metadata}" ) + elif prompt_name == "Game Over": + print( + f"DEBUG GAME OVER - NO metadata_filter, full metadata: {prompt_metadata}" + ) # Combine legacy tokens with prompt-specific tokens if legacy_tokens_for_ai: