fix(slack): prefer webhookVerifier over signingSecret#468
Merged
Conversation
…NG_SECRET When `webhookVerifier` is configured, ignore both `config.signingSecret` and the `SLACK_SIGNING_SECRET` env var. Previously a configured `signingSecret` (or env var) would shadow the verifier the caller wired up, which is the opposite of the intended override behavior. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Mirror the JSDoc/changeset wording: webhookVerifier wins over both signingSecret and SLACK_SIGNING_SECRET. The previous note still claimed signingSecret won, contradicting the behavior fixed in e77359b.
bensabic
approved these changes
May 9, 2026
This was referenced May 29, 2026
patrick-chinchill
added a commit
to Chinchill-AI/chat-sdk-python
that referenced
this pull request
May 29, 2026
Flips precedence between webhook_verifier and signing_secret in SlackAdapter to match upstream vercel/chat#468 (commit 0f0c203, in chat@4.29.0). Behavior change: when both webhook_verifier and signing_secret are configured, webhook_verifier now wins. SLACK_SIGNING_SECRET env var is also ignored when a verifier is set. This fixes a precedence regression the Python port introduced in 0.4.27 (#87) by tracking upstream's intent at that time. Upstream has since reversed itself in #468 (an env-configured SLACK_SIGNING_SECRET was silently shadowing verifiers callers wired up — same hazard our port also had). - adapter.py: rewrote the signing_secret cascade so an explicit webhook_verifier drops both config and env signing-secret fallbacks; _webhook_verifier set unconditionally; stale construction-cascade comment refreshed - types.py: signing_secret + webhook_verifier docstrings describe the new precedence - tests: renamed test_signing_secret_takes_precedence → test_webhook_verifier_takes_precedence (strengthened assertions), added test_verifier_runs_even_when_signing_secret_is_configured - CHANGELOG: behavior-change entry with migration guidance Pre-merge code review verified strict mutual exclusion matches upstream, tests are stronger not weaker, and the rebind/state and pass-interaction hazards are clean. One stale comment caught + fixed.
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
webhookVerifierwins over bothconfig.signingSecretand theSLACK_SIGNING_SECRETenv var. Previously, a configuredsigningSecret(or the env var) would silently shadow the verifier the caller wired up.SlackAdapterconstructor and thecreateSlackAdapterfactory; JSDoc onwebhookVerifierupdated to match.Test plan
pnpm --filter @chat-adapter/slack typecheck— cleanpnpm --filter @chat-adapter/slack test— 366/366 pass🤖 Generated with Claude Code