Repository navigation
feat(chat-platform): one Hazel bot for every Maple region - #2244
Merged
Merged
Maple Review Bot / Maple / review
succeeded
Nov 4, 2026 in 1m 38s
Confidence 10/10 · No issues found
🟢 Confidence 10/10 · safe to merge. One helper derives the region for both the install link and the redemption, and new tests pin both plus the gateway handshake.
no findings · tests covered · risk medium
Adds an optional per-deployment gateway region so several Maple instances can share one Hazel bot, threading it through the install link, the callback URI and the token exchange, with optional connector config keys so a missing region still counts as configured. The three files changed since the last review are consistent with each other and with the callers; safe to merge once the rollout steps land.
hazelRedirectUriputs?hazel_region=on the install link and the redemptionMAPLE_HAZEL_REGIONdeclared as an optional key on the install and gateway halvesisConnectorConfiguredand chat-bot'sresolveConnectorConfigignore optional keys
Before merge
- Env var · Set
MAPLE_HAZEL_REGION=euin the EUapiandchat-botenv; Hazel's regional install support must be deployed first ·packages/chat-platform/src/connectors/hazel/api.ts:42 - Manual · Register EU's callback on the bot as
…/oauth/chat/hazel/callback?hazel_region=eu— the PR description still says?region=eu, which Hazel will not match
What was checked
- Redemption URI is rebuilt from config in
complete, andChatWorkspaceServicereplays the region-less state row, so the two still agree (install.ts:143,ChatWorkspaceService.ts:406) MAPLE_HAZEL_REGIONreaches both hosts as an optional env read (apps/api/src/resources/env.ts:79,apps/chat-bot/src/config.ts:63)- The callback's
hazel_regionrides the forwarded query intoOAuthCompleteRequest.queryand is unused bycomplete(oauth-return.ts:31)
c52178c · Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.
Loading