You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(slack): address review — set credentialId, scope OAuth path to workspace, drop event narrowing
Review round 1 (Greptile 4/5 + Cursor Bugbot):
- deploy.ts: the native Sim-app (OAuth) branch now sets providerConfig.credentialId
(runtime token resolution in the slack provider and credential-disconnect cleanup
both key slack_app rows on it — without it, file downloads / reaction text fail and
disconnect leaves the webhook active).
- deploy.ts: resolve the OAuth credential through resolveTriggerCredentialId
(workspace- and oauth-scoped) so a pasted foreign/other-tenant credential id can't
bind to the workflow; use the resolved canonical id for token owner lookup + routing.
- deploy.ts: a deleted/secretless custom bot credential (getSlackBotCredential → null
but a service_account row exists) now returns the "reconnect the bot" error instead
of the misleading "connected Slack account" message.
- oauth.ts: drop the credential-based event-option narrowing. The shared dropdown
framework doesn't revalidate a stored value when its dependency changes, so switching
a custom bot → Sim account left an orphaned event that failed deploy with a 400. The
event picker now offers all events; the deploy path is the authoritative gate.
- tests: add broken-bot and workspace-not-resolvable cases; assert credentialId is set.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018asmKsWQ5Vi7T7wD9uHofz
0 commit comments