Skip to content

refactor(orchestrate): prefix Slack env vars with ORCHESTRATE_ - #2

Merged
JonnyPower merged 1 commit into
mainfrom
cursor/orchestrate-slack-env-prefix-1a9d
Jul 27, 2026
Merged

refactor(orchestrate): prefix Slack env vars with ORCHESTRATE_#2
JonnyPower merged 1 commit into
mainfrom
cursor/orchestrate-slack-env-prefix-1a9d

Conversation

@JonnyPower

Copy link
Copy Markdown
Member

Summary

SLACK_BOT_TOKEN and SLACK_CHANNEL_ID are generic enough that orchestrate could pick up an unrelated tool's Slack app from a shared environment, which matters most on cloud agents where secrets are injected per repo. They are now ORCHESTRATE_SLACK_BOT_TOKEN and ORCHESTRATE_SLACK_CHANNEL_ID, matching the ORCHESTRATE_ prefix the skill's other settings already use (ORCHESTRATE_MODEL_CATALOG, ORCHESTRATE_TOOL_CALL_IDLE_MS, ORCHESTRATE_OPERATOR).

Before After
SLACK_BOT_TOKEN ORCHESTRATE_SLACK_BOT_TOKEN
SLACK_CHANNEL_ID ORCHESTRATE_SLACK_CHANNEL_ID

Breaking change, deliberately not softened

The old names are not read as a fallback. Honoring them would defeat the isolation this is for: if a teammate's environment sets SLACK_BOT_TOKEN for something else, orchestrate would still post with it.

The risk of a hard rename is that an existing setup goes quiet with no explanation, since an unset token just disables Slack. So a token found only under the old name prints a rename notice instead of the generic disabled line:

[orchestrate] SLACK_BOT_TOKEN is no longer read; rename it to ORCHESTRATE_SLACK_BOT_TOKEN. Slack visibility disabled

Anyone upgrading sees exactly what to change on the next run.

Implementation

Both names now live in constants (SLACK_TOKEN_ENV in adapters/slack/client.ts, SLACK_CHANNEL_ENV in cli/util.ts) rather than string literals spread across six files, and the two places that hand-rolled process.env.SLACK_BOT_TOKEN truthiness checks go through a shared slackTokenConfigured(). User-facing messages, CLI --slack-channel help text, and the plan.slackChannel schema description are updated to the new names, with plan.schema.json regenerated.

Test plan

  • bun test (228 pass), including a new slack-env-rename.test.ts covering the prefixed variable enabling Slack, neither variable set, the legacy-only rename notice, and the prefixed one winning when both are set
  • bun run check (biome + tsc)
  • CLI smoke: with the new token and no channel, kickoff bails naming both new variables; with only the legacy token, Slack is treated as unconfigured and the channel gate does not fire
  • Live run: confirm a real kickoff still threads into Slack under the new names
Open in Web Open in Cursor 

SLACK_BOT_TOKEN and SLACK_CHANNEL_ID are generic enough that orchestrate
could pick up an unrelated tool's Slack app from a shared environment. They
are now ORCHESTRATE_SLACK_BOT_TOKEN and ORCHESTRATE_SLACK_CHANNEL_ID,
matching the ORCHESTRATE_ prefix the skill's other settings already use.

Both env names now live in constants rather than scattered string literals.
The old names are not read as a fallback, since honoring them would defeat
the isolation; instead, a token found only under the old name prints a rename
notice, so the change can't present as a silent Slack outage mid-run.

Co-authored-by: Jonny Alexander Power <JonnyPower@users.noreply.github.com>
@JonnyPower
JonnyPower marked this pull request as ready for review July 27, 2026 19:57
@JonnyPower
JonnyPower merged commit bb783a1 into main Jul 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants