Add utils/task_tracker.py with create_tracked_task() that wraps background tasks with error logging, cancellation handling, and reference tracking. Replace all 17 fire-and-forget asyncio.create_task() calls across 7 files: - bot/bot.py (5 interjection checks) - bot/utils/autonomous.py (2 check-and-act/react tasks) - bot/utils/bipolar_mode.py (3 argument tasks) - bot/commands/uno.py (1 game loop task) - bot/utils/voice_receiver.py (3 STT/interruption callbacks) - bot/utils/persona_dialogue.py (4 dialogue turn/interjection tasks) Previously-tracked tasks (voice_audio.py, voice_manager.py) were left as-is since they already store task references for cancellation. Closes #1
1.7 KiB
1.7 KiB