fix(commands): unpin /reset from Slack priority aliases — registry hit the 50-cap

CI tests the PR merged with current main, where the new /memory canonical
command filled Slack's 50-slash cap: with btw/bg/reset all pinned ahead of
canonicals, the last canonical (/debug) got clamped and the Telegram-parity
test failed. Canonical commands must win slots over alias spellings — /new
keeps its native slot and 'reset' stays reachable via /hermes reset.

Also updates test_includes_aliases_as_first_class_slashes to assert the
pinned-alias contract (_SLACK_PRIORITY_ALIASES survive) instead of a
specific unpinned alias's survival, which was the same change-detector
pattern the docstring already warned about.
This commit is contained in:
Teknium
2026-06-11 10:49:47 -07:00
parent e8b757845d
commit 3c489fda81
2 changed files with 12 additions and 6 deletions
+5 -1
View File
@@ -1037,7 +1037,11 @@ _SLACK_RESERVED_COMMANDS = frozenset({
# unrelated command landed. These claim their slots right after /hermes,
# ahead of both canonical names and the rest of the aliases. Anything not
# listed here still degrades gracefully (reachable via /hermes <command>).
_SLACK_PRIORITY_ALIASES = ("btw", "bg", "reset")
# Keep this list TIGHT: every pinned alias takes a slot a canonical command
# would otherwise get, and the Telegram-parity test fails when a canonical
# gets clamped ("reset" was unpinned for exactly that — /new keeps its
# native slot, the alias spelling stays reachable via /hermes reset).
_SLACK_PRIORITY_ALIASES = ("btw", "bg")
def _sanitize_slack_name(raw: str) -> str: