bridge: add GATEWAY_* aliases with SLACK_* fallback (phase 2)#191
Merged
benvinegar merged 1 commit intomainfrom Mar 1, 2026
Merged
bridge: add GATEWAY_* aliases with SLACK_* fallback (phase 2)#191benvinegar merged 1 commit intomainfrom
benvinegar merged 1 commit intomainfrom
Conversation
Greptile SummaryCompletes phase 2 of the Gateway bridge rename by introducing backward-compatible environment variable aliases. The implementation adds Key changes:
Design highlights:
The implementation is well-tested, thoroughly documented, and maintains full backward compatibility while encouraging migration to the new naming convention. Confidence Score: 5/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Bridge Startup] --> B[applyGatewayEnvAliases]
B --> C{Check each alias pair}
C --> D{GATEWAY_* set?}
D -->|Yes| E[Use GATEWAY_* value]
D -->|No| F{SLACK_* set?}
F -->|Yes| G[Use SLACK_* value<br/>+ emit deprecation warning]
F -->|No| H[Skip - not configured]
E --> I{SLACK_* also set<br/>with different value?}
I -->|Yes| J[Emit conflict warning]
I -->|No| K[No conflict]
J --> L[Set process.env SLACK_* key]
K --> L
G --> L
H --> M[Continue]
L --> M
M --> N{More pairs?}
N -->|Yes| C
N -->|No| O[Bridge continues startup<br/>using SLACK_* keys]
Last reviewed commit: 01a2edc |
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
Implements phase 2 of the Gateway bridge rename by introducing backward-compatible env var aliases:
GATEWAY_*aliases (preferred) withSLACK_*fallback (legacy)GATEWAY_*wins when both are set)What changed
Runtime alias resolution
slack-bridge/env-aliases.mjsslack-bridge/bridge.mjsslack-bridge/broker-bridge.mjsStartup/runtime compatibility
pi/skills/control-agent/startup-pi.shnow detects broker/socket config via either alias familypi/extensions/sentry-monitor.tsacceptsGATEWAY_BOT_TOKENwithSLACK_BOT_TOKENfallbackbin/doctor.shbin/security-audit.shbin/lib/baudbot-runtime.shinstall.shbin/config.sh(allowlist validation wording)Docs/schema
.env.schemawith preferredGATEWAY_*+ legacySLACK_*entriesCONFIGURATION.mdwith precedence, migration wording, and updated example.envTests
slack-bridge/env-aliases.test.mjscovering fallback + precedencetest/legacy-node-tests.test.mjsandbin/test.shbin/security-audit.test.shtest/security-audit.test.mjsValidation
npm run lintnpm testnpm run typecheckbash bin/test.sh jsbash bin/test.sh shell(One pre-existing non-blocking Biome warning remains in
slack-bridge/broker-bridge.mjsfor an unused catch variable.)