Skip to content

Fix Slack multi-workspace token and routing regressions - #3928

Closed
kshitijk4poor wants to merge 1 commit into
NousResearch:mainfrom
kshitijk4poor:codex/slack-multi-workspace-fixes
Closed

kshitijk4poor wants to merge 1 commit into
NousResearch:mainfrom
kshitijk4poor:codex/slack-multi-workspace-fixes

Conversation

@kshitijk4poor

Copy link
Copy Markdown
Contributor

Summary

  • skip invalid cached Slack workspace tokens during startup instead of aborting the adapter
  • persist channel_id -> team_id routing to slack_channel_teams.json so outbound sends after restart reach the correct workspace
  • allow outbound Slack client selection to use explicit team_id metadata when available
  • add focused Slack regression tests for stale saved tokens and persisted channel routing

Why

The upstream multi-workspace Slack change introduced two regressions:

  1. one revoked token in slack_tokens.json could abort connect() and keep Slack fully offline
  2. proactive sends to secondary workspaces after restart could fall back to the primary client and fail with channel_not_found

This PR makes token validation per-workspace and persists learned channel routing so workspace selection survives process restarts.

Validation

  • source .venv/bin/activate && python -m pytest tests/gateway/test_slack.py -q
  • source .venv/bin/activate && python -m py_compile gateway/platforms/slack.py tests/gateway/test_slack.py

@kshitijk4poor
kshitijk4poor marked this pull request as ready for review March 30, 2026 09:28
@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/gateway Gateway runner, session dispatch, delivery platform/slack Slack app adapter labels May 2, 2026
@teknium1

Copy link
Copy Markdown
Collaborator

Closing as superseded by #70190 (merged): predates the plugin migration and most of its targets were already fixed on main; remaining gaps covered by #70190.

Thanks for the work — it's credited in #70190's summary.

@teknium1 teknium1 closed this Jul 23, 2026
@kshitijk4poor
kshitijk4poor deleted the codex/slack-multi-workspace-fixes branch August 5, 2026 07:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/gateway Gateway runner, session dispatch, delivery P2 Medium — degraded but workaround exists platform/slack Slack app adapter type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants