Skip to content

fix(slack): share thread history across speakers - #820

Merged
izadoesdev merged 3 commits into
stagingfrom
codex/slack-shared-thread-history
Sep 18, 2026
Merged

izadoesdev merged 3 commits into
stagingfrom
codex/slack-shared-thread-history

Conversation

@izadoesdev

@izadoesdev izadoesdev commented Sep 17, 2026

Copy link
Copy Markdown
Member

When a second person followed up in a Slack thread, the agent loaded a separate conversation history and lost the first person's exchange. Scope Slack API-key history to the integration and thread so participants share the conversation, while personal memory remains scoped to each speaker.

Tests exercise ask, trace, and stream through the shared entry points and real conversation-store logic. They verify isolation between integrations in the same organization, channels, and threads, and preserve dashboard, external MCP, and session-based behavior. Existing speaker-scoped history caches expire normally; they are not copied into the new shared cache.

Validation: 56 focused history/memory tests, 969 AI tests, 95 Slack tests, root lint, all 33 typecheck tasks, and all 29 pre-push test tasks passed. The AI suite skips 33 integration tests requiring external services. Independently reviewed.

This is an independent history-ownership slice; #818 and #821 change separate tool files. No migrations, OAuth scopes, new dependencies, or user setup. AI-assisted implementation and review.

@vercel

vercel Bot commented Sep 17, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
databuddy-status Ready Ready Preview Sep 18, 2026 8:25am UTC
2 Skipped Deployments
Project Deployment Actions Updated
dashboard Skipped Skipped Sep 18, 2026 8:25am UTC
documentation Skipped Skipped Sep 18, 2026 8:25am UTC

@coderabbitai

coderabbitai Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: dcb13d59-18e5-422e-8399-096e743cc186

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@unkey-deploy

unkey-deploy Bot commented Sep 18, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Unkey Deploy

Name Status Preview Inspect Updated (UTC)
links (preview) Ready Visit Preview Inspect Sep 18, 2026 8:25am

@greptile-apps

greptile-apps Bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The PR appears safe to merge, with no outstanding correctness, security, or repository-rule issues identified.

Summary

This PR changes Slack API-key conversation ownership so all speakers in the same integration and thread share conversation history while personal memory remains speaker-scoped.

  • Uses integration-and-thread-scoped history for Slack API-key calls.
  • Preserves existing speaker-scoped behavior for dashboard, MCP, and session actors.
  • Adds parameterized coverage for ask, trace, and stream entry points and for integration, channel, and thread isolation.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Agent request] --> B{Slack source with API key?}
  B -->|Yes| C[Conversation user ID: null]
  B -->|No| D[Conversation user ID: memory user ID]
  C --> E[History scoped by integration and thread]
  D --> F[History scoped by speaker]
  A --> G[Personal memory scoped by memory user ID]
Loading

Reviews (2) · Last reviewed commit: "test(slack): parameterize history isolat..."

Comment thread packages/ai/src/agent/conversation-history.test.ts
@vercel
vercel Bot temporarily deployed to Preview – dashboard September 18, 2026 08:24 Inactive
@vercel
vercel Bot temporarily deployed to Preview – documentation September 18, 2026 08:24 Inactive
@izadoesdev
izadoesdev marked this pull request as ready for review September 18, 2026 08:27
@izadoesdev
izadoesdev merged commit ced8ec9 into staging Sep 18, 2026
22 checks passed
@izadoesdev
izadoesdev deleted the codex/slack-shared-thread-history branch September 18, 2026 08:31

This branch was successfully deployed

2 active and 2 inactive deployments
Preview – databuddy-status 394e3bf9 Deployed Sep 18, 2026 by vercel[bot]
links - preview 394e3bf9 Deployed Sep 18, 2026 by unkey-deploy[bot]
Preview – dashboard 394e3bf9 Deployed Sep 18, 2026 by vercel[bot]
Preview – documentation 394e3bf9 Deployed Sep 18, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant