fix(slack): include team_id in thread-context cache key#12502
Closed
flobo3 wants to merge 1 commit into
Closed
Conversation
Collaborator
|
Likely duplicate of #12889 — same root cause: thread-context cache key missing team_id in SlackAdapter._fetch_thread_context(). |
Contributor
|
Merged via #16200 — your commit was cherry-picked onto current main with your authorship preserved (1003ab6). Extended the one-line fix to two lines so the new |
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
Fixes #12421
Thread context was cached under
channel_id:thread_ts, but the rendered content depends onteam_idfor bot mention stripping and user-name resolution. In multi-workspace Slack mode, a later lookup from a different workspace could receive stale context from the first workspace.Change
Include
team_idin the cache key:f"{channel_id}:{thread_ts}:{team_id}"team_idis already a parameter of_fetch_thread_context()with a default of"", so this is backwards-compatible — single-workspace setups will use the same cache key as before.