Critical fixes: - Add threading.Lock for all shared mutable state (override, cache, current activity) - Atomic YAML writes (temp file + os.replace) to prevent corruption on crash - Deep-copy cache on reads to prevent callers from mutating shared state High-severity fixes: - Validate entries in pick_activity_for_mood() — skip/log malformed instead of KeyError - Log warning on unrecognized activity type fallback - Normalize empty-string state to None (avoid 'None' display) - release_manual_override() now uses force=True so bot always shows activity - Add try/except in release_manual_override() to handle failures gracefully Medium fixes: - Remove dead 'test' mood from activities.yaml - Validate name length (128 char Discord limit) in CRUD and manual set - Validate streaming entries have URL in CRUD path - Add JSON parse error handling in API routes - on_ready preserves active manual override instead of overwriting - Log override expiry timestamp (HH:MM:SS) for easier debugging - exc_info=True on presence update errors for full stack traces Low fixes: - JS activitySetFromEntry() shows notification on parse error
16 KiB
16 KiB