Skip to content

fix(core): Steer a thread's !! reply into the running Turn - #5179

Open
sentry-junior[bot] wants to merge 3 commits into
mainfrom
fix/core-bang-bang-steer
Open

sentry-junior[bot] wants to merge 3 commits into
mainfrom
fix/core-bang-bang-steer

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

With passive routing, core held every thread message with no mention for the reply decision after the Turn (slack-webhook.ts), a !! reply too, and the decision could skip it. On main, buildSlackInboundMessage marks a !! reply as interrupt input:

  • The author's own !!: the running Turn's steering drain takes it at the next step, with the processing reaction.
  • Another person's !!: the running Turn yields at its next boundary. The next Run supersedes it (supersedeTurnForInput), so it ends with no reply, and that Run decides the !! reply with the passive decision. A reply Turn answers both messages, because the first one is still unanswered in history.

What changes: while a started Turn runs (not waiting), core appends a !! thread reply as interrupt input instead of holding it. It also adds main's processing reaction and a Slack receipt (slackReceipt, now passed through appendAndEnqueueInboundMessage). Placement then joins the author's own running Turn, or supersedes another person's. With no running Turn, the reply is held for the decision as before, as on main.

Remaining difference: when another person sends !!, core runs the new Turn with no passive decision. Where main's decision would skip that reply, main answers neither message, and core answers both. Matching that would take a way to supersede a Turn without placing an input.

The turn-lifecycle:slack-bang-bang-override row note describes both paths. Once #5169 is on main, a later merge of main into this branch drops that PR's known-core-gap mark on the row.

via @thomasjiangcy.

--

View Session [Sentry]

Core held every thread message with no mention for the decision after
the Turn, `!!` too, and the decision could skip it. Main marks a `!!`
reply as interrupt input, and its running Turn takes it at its next
step, or yields to it when another person sent it. While a Turn runs,
core now appends the reply as interrupt input with main's processing
reaction, and placement joins it or supersedes the running Turn.
@vercel

vercel Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
junior-docs Ready Ready Preview Dec 3, 2026 11:15pm UTC

Request Review

@github-actions github-actions Bot added the risk: medium PR risk score: medium label Dec 3, 2026
@blacksmith-sh

blacksmith-sh Bot commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

Found 4 test failures on Blacksmith runners:

Failures

Test View Logs
file-length/file-length View Logs
node scripts/check.mjs/check.mjs View Logs
tests/integration/plugin-started-tasks.test.ts/plugin tasks that a route starts >
acknowledges the task after its fifth failed delivery
View Logs
tests/integration/plugin-started-tasks.test.ts/plugin tasks that a route starts >
retries a failed inline write with backoff and applies it once
View Logs

Fix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@github-actions github-actions Bot added risk: high PR risk score: high and removed risk: medium PR risk score: medium labels Dec 3, 2026

This branch was successfully deployed

1 active deployment
Preview – junior-docs — 19d217b0 Deployed Dec 3, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: high PR risk score: high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant