Skip to content

fix(channels): stop dropping every top-level Slack message - #6071

Open
mmabrouk wants to merge 1 commit into
feat/add-channelsfrom
channels/fix-toplevel-thread-ts
Open

fix(channels): stop dropping every top-level Slack message#6071
mmabrouk wants to merge 1 commit into
feat/add-channelsfrom
channels/fix-toplevel-thread-ts

Conversation

@mmabrouk

Copy link
Copy Markdown
Member

Context

Mentioning the bot with a plain, top-level channel message produced nothing in Slack: no reply, no error. The dispatch worker crashed on every such message with ChannelLocatorIncomplete: Locator for slack is missing declared thread key field: thread_ts. Slack only puts thread_ts on messages inside a thread; a top-level message has none, and the THREAD key composition declares the field required. Only messages typed inside an existing thread ever worked.

Changes

parse_event now falls back to the message's own ts when thread_ts is absent. This is Slack's own threading model: a top-level message roots the thread its replies live in, and a reply's thread_ts is the parent's ts. It also means the agent's answer lands as a thread reply under the mention it answers.

Before: {"team": "T1", "channel": "C1"} (no thread key, dispatch raises)
After: {"team": "T1", "channel": "C1", "thread_ts": "<the message's own ts>"}

One existing test pinned the old shape (thread_ts absent on a top-level message). That shape was one the rest of the system could not consume. The test now pins the new semantics: a parent and the replies threaded under it resolve to one unit.

Tests

  • New: a top-level message roots its own thread; a threaded reply keeps its parent's thread_ts.
  • Full channels unit tier passes (645 tests).
  • Verified live: a real mention in a real workspace now runs the agent and gets a threaded reply (finding F4 of the deployment field report).

Slack puts thread_ts only on messages inside a thread; a top-level message
has none. The THREAD key composition declares thread_ts required, so every
plain channel message raised ChannelLocatorIncomplete in the dispatch worker.
Slack showed nothing, with no error anywhere the operator can see.

parse_event now falls back to the message's own ts, which is Slack's own
threading model: a top-level message roots the thread its replies live in
(a reply's thread_ts IS the parent's ts). This also makes the agent's answer
land as a thread reply under the mention it answers.

The one existing test that pinned the old shape asserted a locator the rest
of the system could not consume; it now pins the new semantics: a parent and
the replies threaded under it resolve to one unit.
@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Aug 17, 2026
@vercel

vercel Bot commented Aug 17, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
agenta-documentation Ready Ready Preview Aug 17, 2026 8:04am

Request Review

@dosubot dosubot Bot added bug python Pull requests that update Python code labels Aug 17, 2026
@coderabbitai

coderabbitai Bot commented Aug 17, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (1)
  • release/.*

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 YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 9a745209-dc56-4301-8ce7-0a5257a54f9b

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.

@github-actions

Copy link
Copy Markdown
Contributor

Railway Preview Environment

Preview URL https://gateway-pr-6071.up.railway.app/w
Project agenta-oss-clone-spike
Image tag pr-6071-82e618a
Status Deployed
Railway logs Open logs
Workflow logs View workflow run
Updated at 2026-08-17T08:12:30.800Z

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug python Pull requests that update Python code size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant