fix(slack): keep outbound replies in thread sessions#96650
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed June 24, 2026, 11:24 PM ET / 03:24 UTC. Summary PR surface: Source +7, Tests +45. Total +52 across 6 files. Reproducibility: yes. at source level: current main sends Slack Review metrics: 1 noteworthy metric.
Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Mantis proof suggestion Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Merge the narrow Slack-specific route fix after redacted real Slack proof or a maintainer proof override confirms outbound mirror entries stay on the existing thread session. Do we have a high-confidence way to reproduce the issue? Yes, at source level: current main sends Slack Is this the best way to solve the issue? Yes, this looks like the narrow maintainable fix: it leaves the shared SDK helper default unchanged and changes only Slack route precedence based on explicit versus inherited reply targeting. A generic precedence flip would be broader and risk other channels. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 643410c1f3c0. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +7, Tests +45. Total +52 across 6 files. View PR surface stats
Acceptance criteria:
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
|
|
Thanks for the fix. #97168 has now landed the same #96535 repair at the narrower Slack-owned reply-transport boundary. That implementation preserves reply-first behavior for explicit and unknown callers, uses the thread root only for known inherited replies, and avoids expanding the generic outbound session-route contract. Canonical landed commit: 5e572dc Proof: 72 focused Slack/outbound tests passed; Blacksmith Testbox Closing this as superseded by the landed fix. |
Closes #96535
What Problem This Solves
Fixes an issue where Slack thread replies could create new outbound delivery-mirror sessions keyed by a child reply timestamp instead of reusing the existing thread session. This caused assistant-only mirror sessions to accumulate for one Slack conversation.
Why This Change Was Made
Slack outbound session routing now treats inherited reply metadata differently from explicit reply targets. Inherited same-thread sends prefer the recovered/current Slack thread session, while explicit reply targets still keep the existing reply-first behavior. The generic SDK route-helper default remains unchanged for other channels.
User Impact
Slack users should see outbound mirrored replies stay attached to the existing Slack thread session instead of producing near-empty sibling session records for each reply.
Evidence
node scripts/run-vitest.mjs extensions/slack/src/channel.test.ts -t "uses the current Slack thread session before inherited child reply ids"failed because the route used:thread:1712345688.654321instead of the current thread:thread:1712345678.123456.node scripts/run-vitest.mjs extensions/slack/src/channel.test.ts src/plugin-sdk/thread-aware-outbound-session-route.test.ts src/infra/outbound/message-action-runner.threading.test.tspassed 3 Vitest shards / 75 tests.git diff --checkpassed.