refactor: thread slackUserId through Slack bot createSession#535
refactor: thread slackUserId through Slack bot createSession#535ColeMurray merged 1 commit intomainfrom
Conversation
Add slackUserId parameter to createSession and include it in structured log metadata. The Slack user ID was already available at the call site but not passed through. No control plane changes yet — the value flows through logging only.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughExtended the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Terraform Validation Results
Pushed by: @ColeMurray, Action: |
There was a problem hiding this comment.
Summary
PR Title and number: refactor: thread slackUserId through Slack bot createSession (#535)
Author: @ColeMurray
Files changed count: 1, additions/deletions: +5/-2
This change cleanly threads the Slack user ID into createSession and limits the behavioral impact to structured logging, matching the PR description. I reviewed the touched path for correctness, logging implications, and call-site consistency, and did not find blocking issues.
Critical Issues
- None.
Suggestions
- [Testing]
packages/slack-bot/src/index.ts:891- Consider adding an explicit assertion insrc/index.test.tsthat the session-creation log metadata includesslack_user_id, since that is the only behavioral change in this PR. The existing suite exercises the path, but a direct assertion would better protect this migration step from regression.
Nitpicks
- None.
Positive Feedback
- The parameter is threaded through the narrowest possible surface area, which keeps this pre-migration step focused.
- The control-plane request body is unchanged, avoiding accidental behavior changes outside logging.
- The existing Slack bot typecheck and test suite still pass against this branch, which reduces regression risk.
Questions
- None.
Verdict
- Approve: Ready to merge, no blocking issues.
Summary
slackUserIdparameter tocreateSessionin the Slack botslack_user_idin structured log metadata for session creationstartSessionAndSendPrompt) but was not passed through tocreateSessionPre-step 5 of the unified user model migration (pre-steps doc). The main migration will add identity resolution (
getUserInfo) and forwardactor*fields through this same parameter path — having the user ID already threaded keeps that PR focused on identity logic.Test plan
npm run typecheck -w @open-inspect/slack-botpassesnpm test -w @open-inspect/slack-bot— all 44 tests passSummary by CodeRabbit