refactor(orchestrate): prefix Slack env vars with ORCHESTRATE_ - #2
Merged
Merged
Conversation
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
marked this pull request as ready for review
July 27, 2026 19:57
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
SLACK_BOT_TOKENandSLACK_CHANNEL_IDare 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 nowORCHESTRATE_SLACK_BOT_TOKENandORCHESTRATE_SLACK_CHANNEL_ID, matching theORCHESTRATE_prefix the skill's other settings already use (ORCHESTRATE_MODEL_CATALOG,ORCHESTRATE_TOOL_CALL_IDLE_MS,ORCHESTRATE_OPERATOR).SLACK_BOT_TOKENORCHESTRATE_SLACK_BOT_TOKENSLACK_CHANNEL_IDORCHESTRATE_SLACK_CHANNEL_IDBreaking 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_TOKENfor 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:
Anyone upgrading sees exactly what to change on the next run.
Implementation
Both names now live in constants (
SLACK_TOKEN_ENVinadapters/slack/client.ts,SLACK_CHANNEL_ENVincli/util.ts) rather than string literals spread across six files, and the two places that hand-rolledprocess.env.SLACK_BOT_TOKENtruthiness checks go through a sharedslackTokenConfigured(). User-facing messages, CLI--slack-channelhelp text, and theplan.slackChannelschema description are updated to the new names, withplan.schema.jsonregenerated.Test plan
bun test(228 pass), including a newslack-env-rename.test.tscovering the prefixed variable enabling Slack, neither variable set, the legacy-only rename notice, and the prefixed one winning when both are setbun run check(biome + tsc)