Skip to content

fix(channels): deliver the first reply on a thread - #6072

Closed
mmabrouk wants to merge 1 commit into
feat/add-channelsfrom
channels/fix-first-post-locator
Closed

fix(channels): deliver the first reply on a thread#6072
mmabrouk wants to merge 1 commit into
feat/add-channelsfrom
channels/fix-first-post-locator

Conversation

@mmabrouk

Copy link
Copy Markdown
Member

Context

The agent ran and answered, the playground showed the reply, and Slack showed "Working…" forever. The delivery worker crashed with KeyError: 'channel' inside the Slack adapter. The first post for an outbox item has no receipt yet, and that branch of _send passed an empty locator, although the thread row holds the full target (team, channel, thread timestamp). The first-ever answer on any thread could never be delivered.

Changes

_send now takes the thread and uses thread.data.external_locator for the no-receipt post. Later posts and edits keep using the stored receipt, unchanged.

This is the same defect class the branch's ledger records for the bridge adapter (F63): a read with no writer, which survived because test fixtures seeded the receipt directly and never exercised the first post.

Tests

  • New: the first post of a turn targets the thread's own locator (spy adapter records what post_message receives).
  • Full channels unit tier passes (645 tests).
  • Verified live: first replies now land in the Slack thread (finding F6 of the deployment field report).

The delivery worker's first post for an item has no receipt yet, and that
branch passed an empty locator to the adapter. The Slack adapter needs
locator['channel'], so it raised KeyError and the first answer on any thread
was silently never delivered — the playground showed the answer, Slack showed
'Working…' forever.

The thread row already holds the full target (team, channel, thread_ts);
_send now takes the thread and uses its locator for the no-receipt post.
Same defect class as the bridge's F63: a read with no writer, surviving
because fixtures seeded the receipt directly.
@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 the size:XS This PR changes 0-9 lines, ignoring generated files. label Aug 17, 2026
@coderabbitai

coderabbitai Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

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: 6ec9322c-118a-4c1d-a7d6-d299b0d2b482

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.

@dosubot dosubot Bot added bug python Pull requests that update Python code tests labels Aug 17, 2026
@github-actions

github-actions Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Railway Preview Environment

Status Destroyed (PR closed)

Updated at 2026-09-08T11:43:10.325Z

@mmabrouk

mmabrouk commented Sep 8, 2026

Copy link
Copy Markdown
Member Author

Folded into the successor branch feat/channels (see the takeover PR). This PR's commit is on that branch.

@mmabrouk mmabrouk closed this Sep 8, 2026
@mmabrouk

mmabrouk commented Sep 8, 2026

Copy link
Copy Markdown
Member Author

Successor: #6644

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. tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant