Repository navigation
fix(slack): keep DM thread turns out of active steering - #85904
Conversation
|
Codex review: needs maintainer review before merge. Reviewed May 30, 2026, 10:55 PM ET / 02:55 UTC. Summary PR surface: Source +118, Tests +293. Total +411 across 10 files. Reproducibility: yes. Current main compares active work by session identity without route-thread distinction, and the PR body includes before-fix failing regression checks plus live Slack evidence for the overlapping-DM symptom. Review metrics: 2 noteworthy metrics.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the Slack-scoped route-thread guard after maintainer review of the final merge result, keeping the stable Slack DM SessionKey contract and the non-Slack same-session steering/admission regressions covered. Do we have a high-confidence way to reproduce the issue? Yes. Current main compares active work by session identity without route-thread distinction, and the PR body includes before-fix failing regression checks plus live Slack evidence for the overlapping-DM symptom. Is this the best way to solve the issue? Yes. The proposed path is the narrow maintainable fix for the shipped Slack stable-DM-session contract: carry route-thread identity through active reply operations and apply the special guard only to Slack direct routed-thread turns. AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against 4dad7bd93b6c. Label changesLabel justifications:
Evidence reviewedPR surface: Source +118, Tests +293. Total +411 across 10 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
ClawSweeper PR egg ✨ Hatched: 🌱 uncommon Neon Crabkin Hatch commandComment Hatchability rules:
Rarity: 🌱 uncommon. What is this egg doing here?
|
f084fed to
e76e918
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
e76e918 to
323e3ca
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Command router queued. I will update this comment with the next step. Re-review progress:
|
|
CI note for the remaining red check on current head d0d5a354e77e5650f0ff3126eea42cae04a008e3:
I tried to rerun the failed workflow with |
|
Maintainer action requested: could someone with repository permission rerun the failed The remaining failure is an unrelated timeout in I cannot rerun the GitHub job from this fork account: |
fc360ec to
01d5d36
Compare
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
This comment was marked as spam.
This comment was marked as spam.
01d5d36 to
2ce37ad
Compare
2ce37ad to
8861120
Compare
steipete
left a comment
There was a problem hiding this comment.
Reviewed for Slack DM active-run/thread isolation.
Verification:
git diff --check origin/main...FETCH_HEADpassed./Users/steipete/Projects/agent-scripts/skills/autoreview/scripts/autoreview --mode branch --base origin/main --output /tmp/pr85904-autoreview.txt --json-output /tmp/pr85904-autoreview.jsonpassed: no accepted/actionable findings.- GitHub CI for head
6703e166545bcb96c1a50de93a42446212cca9a7is green, includingchecks-node-auto-reply-reply-dispatch,checks-node-auto-reply-reply-state-routing,check-lint,check-prod-types,check-test-types, and Real behavior proof.
Real behavior proof:
- PR body includes live Slack Socket Mode proof for overlapping top-level Slack DMs and same-thread follow-up delivery.
- I reviewed the active-run steering and dispatch-admission paths plus the Slack stable DM session-key test coverage.
Known proof gap:
- I did not rerun the PR's focused Vitest suite locally after autoreview; I relied on green CI, the PR's supplied live Slack proof, and source review.
Summary
SessionKeycontract for top-level DMs and ordinary DM thread replies.Verification
origin/mainat1d1a7c26d8867fdfa98c97d8b510ad0ce1951858still does not include this fix.expected true to be falseforcall.shouldSteer, proving the second Slack DM thread would still steer into the active run.Slack routed thread was blocked by the active reply operation, matching the live Slack symptom where B was skipped asreply-operation-active.expected false to be trueforcall.shouldSteer, proving the generic route-thread guard changed existing non-Slack same-session steering.OPENCLAW_VITEST_MAX_WORKERS=2 node scripts/run-vitest.mjs run src/auto-reply/reply/dispatch-from-config.test.ts -- -t "different Slack DM routed thread|non-Slack routed direct turns|records routed Slack thread id" --test-timeout 5000 --hook-timeout 5000- 1 file passed, 156 tests passed.OPENCLAW_VITEST_MAX_WORKERS=2 node scripts/run-vitest.mjs run extensions/slack/src/monitor/message-handler/prepare.thread-session-key.test.ts extensions/slack/src/monitor/message-handler/prepare.test.ts src/auto-reply/reply/get-reply-run.media-only.test.ts src/auto-reply/reply/dispatch-from-config.test.ts src/auto-reply/reply/followup-runner.test.ts- 5 files passed, 378 tests passed, duration 19.71s.git diff --check FETCH_HEAD- passed.node scripts/crabbox-wrapper.mjs run slack-dm-thread-isolation-check-changed --provider blacksmith-testbox --shell -- "pnpm check:changed"; it did not start because this local environment has no usablecrabboxbinary (selected binary failed basic --version/--help sanity checks).Real behavior proof
SessionKey, but the second top-level Slack thread must not be steered into, or blocked behind dispatch admission for, the first active run. Ordinary DM thread follow-up should continue to work in the original Slack thread. The steering and dispatch-admission guards are Slack-scoped, so non-Slack same-session direct-message turns keep their prior behavior even when their transport thread ids differ.w1773415900-eqa641873.slack.com, OpenClaw source checkoutd0d5a354e77e5650f0ff3126eea42cae04a008e3, foreground gateway started from this branch withOPENCLAW_HOME=/tmp/openclaw-pr85904-live-root WORKSPACE=/tmp/openclaw-pr85904-live-workspace node scripts/run-node.mjs gateway run --port 18790 --verbose --ws-log compact. The normal installed gateway was stopped before the smoke and restarted after proof capture.replyToMode=all, andallowBots=truebecause the available automated Slack acceptance sender posts app-authored Slack messages. The OpenClaw bot under test was a different bot id, so this did not exercise self-message handling. Sent top-level DM A and top-level DM B from the same sender in the same DM channel about 1.00s apart, then sent ordinary follow-up D inside B's Slack thread. After the dispatch-admission repair, ran the current-head local regression set above.reply-operation-active. A received an OpenClaw reply in A's Slack thread, B received an OpenClaw reply in B's Slack thread, and the later B-thread follow-up continued in B's thread. The final active-run routing and dispatch-admission guards apply only whenChatType=direct, routed thread metadata exists, andProvider,Surface, orOriginatingChannelresolves toslack.allowBots=true. This live proof still exercises the real Slack Socket Mode transport, real Slack thread ids, and the PR checkout's active-run routing and dispatch-admission boundaries; it does not prove Slack's human-user token UX separately. The local Crabbox/Testboxpnpm check:changedgate was attempted but could not start because the localcrabboxbinary is missing or unusable.AssertionError: expected true to be falseatsrc/auto-reply/reply/get-reply-run.media-only.test.ts, showing the same-session/different-thread second turn would steer into the active run. Before the latest dispatch-admission fix, live current-head proof failed with B missing a reply and gateway loggeddispatch-from-config: skipped reply operation admission ... reason=active-run; the new dispatch regression failed withSlack routed thread was blocked by the active reply operation. Before the Slack-only scoping update, the non-Slack compatibility test failed withexpected false to be true, showing the generic guard would have changed non-Slack same-session steering.Root Cause
TransportThreadIdDM thread replies, dispatch admission blocking, non-Slack compatibility, or every operation creation path.Regression Test Plan
src/auto-reply/reply/get-reply-run.media-only.test.ts,src/auto-reply/reply/dispatch-from-config.test.ts,src/auto-reply/reply/followup-runner.test.ts, andextensions/slack/src/monitor/message-handler/prepare.thread-session-key.test.ts.TransportThreadIdget the same guard; non-Slack same-session direct-message turns remain steerable/admission-blocked as before; every created active reply operation should carry the routed thread id when one exists.CI Retry Head Note
01d5d36d391a273e760f183aa8ee41dff3a455e8is an empty CI retry commit on top of the proofed implementation commitd0d5a354e77e5650f0ff3126eea42cae04a008e3.git diff --stat d0d5a354e77e5650f0ff3126eea42cae04a008e3 01d5d36d391a273e760f183aa8ee41dff3a455e8is empty.9ed2ef2eaf662139510339e7a886be62c2d46ddf. The Slack live proof above therefore applies to the current code tree; this commit exists only to trigger GitHub CI after the unrelatedchecks-node-agentic-agentstimeout could not be rerun without maintainer/admin permissions.