From 14d3c0ca2d73a596fa8a260db43d0bdd730a3adf Mon Sep 17 00:00:00 2001 From: Stacy Olivas Date: Tue, 17 Mar 2026 19:56:11 -0700 Subject: [PATCH] refactor: move command aliases to per-command config section Each command's aliases are now configured as an `aliases` key in its own config section (e.g. [Wx_Command] aliases = !weather, !w) rather than a separate [Aliases] section. BaseCommand._load_aliases_from_config() reads and injects them into keywords at startup. CommandManager.load_aliases() and _apply_aliases() are removed. No behaviour change for commands without aliases configured. --- BUGS.md | 2 + TODO.md | 6 +- config.ini.example | 22 +------- modules/command_manager.py | 47 ---------------- modules/commands/base_command.py | 24 ++++++++ tests/test_command_manager.py | 97 ++++++++++++-------------------- 6 files changed, 69 insertions(+), 129 deletions(-) diff --git a/BUGS.md b/BUGS.md index 3891044..9add941 100644 --- a/BUGS.md +++ b/BUGS.md @@ -10,6 +10,8 @@ Tracking of known bugs, fixed issues, and outstanding defects in meshcore-bot. | Commit | Summary | |--------|---------| +| pending | Refactored command aliases from global `[Aliases]` config section to per-command `aliases =` key in each command's own config section; `BaseCommand._load_aliases_from_config()` reads and injects aliases at startup; `CommandManager.load_aliases()` and `_apply_aliases()` removed | +| pending | Fixed pre-existing test failure in `test_discord_bridge_multi_webhooks.py`: `ConfigParser` lowercases all config keys so `bridge.Public` is stored as `"public"` — test assertions updated to match actual lowercase key behaviour; runtime matching was already case-insensitive | | `26d18c1` | Fixed BUG-029 (third pass): Realtime monitor panels stuck at "Connecting…" — root cause was `