fix(slack): keep slash commands in their Slack conversation scope - #10875
Closed
LeonSGP43 wants to merge 1 commit into
Closed
fix(slack): keep slash commands in their Slack conversation scope#10875LeonSGP43 wants to merge 1 commit into
LeonSGP43 wants to merge 1 commit into
Conversation
Collaborator
Collaborator
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Why
Issue #10688 reports that
/modelin Slack can appear to switch successfully but later turns still use the old provider/model. One concrete failure mode is session drift: the slash command writes its override into a DM-shaped session key while subsequent Slack replies resolve under the real channel or thread session.This change fixes that mismatch by making slash commands build the same session source shape that normal Slack messages already use.
Scope
This PR intentionally addresses the Slack session-scope part of #10688. It does not claim to fix the dashboard provider-field UX.
Addresses #10688
Tests
python3 -m pytest -o addopts= tests/gateway/test_slack.py -k "SlashCommands or group_session_scope or dm_session_scope or preserves_thread_context"python3 -m pytest -o addopts= tests/gateway/test_session_model_override_routing.py tests/gateway/test_model_switch_persistence.pypython3 -m pytest -o addopts= tests/gateway/test_session.py -k "distinct_dm_chat_ids_get_distinct_session_keys or group_sessions_are_isolated_per_user_when_user_id_present or group_thread_sessions_are_shared_by_default"