MEDIUM: Runtime Settings Not Persisted - Globals Need Migration #22
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Runtime settings (AUTONOMOUS_DEBUG, VOICE_DEBUG_MODE, LANGUAGE_MODE, moods) are stored as globals instead of in ConfigManager, making persistence and tracking difficult.
Where It Occurs
Why This Is a Problem
What Can Go Wrong
Scenario 1: Lost Debug Settings
Scenario 2: Mood Inconsistency
Proposed Fix
Migrate runtime settings to ConfigManager:
Update all references:
Severity
MEDIUM - Runtime state not persisted, changes lost on restart.
Files Affected
bot/globals.py, bot/config_manager.py, bot/server_manager.py, bot/utils/moods.py
Fixed in commit
d44f08a. Added restore_runtime_settings() to ConfigManager that reads config_runtime.yaml on startup and restores persisted values into globals (LANGUAGE_MODE, AUTONOMOUS_DEBUG, VOICE_DEBUG_MODE, USE_CHESHIRE_CAT, PREFER_AMD_GPU, DM_MOOD). Also added missing persistence calls to three API endpoints: /language/set, /voice/debug-mode, and /memory/toggle.