Add queued thread turn orchestration#2724
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 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. Comment |
ApprovabilityVerdict: Needs human review This PR adds a complete queued turn orchestration feature, introducing new user-facing behavior (ability to queue messages during active threads), new backend services (QueuedTurnDrainReactor), database schema changes, and substantial UI modifications. The scope and cross-cutting nature of this new capability warrants thorough human review. You can customize Macroscope's approvability policy. Learn more. |
Summary
thread.turn.queuewhile keepingthread.turn.startfor immediate/provider-directed sends@t3tools/shared/orchestrationQueuehelperAudit notes
Verification
bun run test --filter=@t3tools/contracts -- orchestrationbun run test --filter=t3 -- QueuedTurnDrainReactor ProviderCommandReactor decider.projectScriptsbun fmtbun lintpass with existing warnings onlybun typecheckNote
Add queued thread turn orchestration for sending messages during active sessions
thread.turn.queuecommand).thread.turn-queued,thread.queued-turn-send-started,thread.queued-turn-send-failed,thread.queued-turn-requeued,thread.queued-turn-resolved) handled in the decider, projector, and store.QueuedTurnDrainReactor— a background reactor that dispatchesthread.queued-turn.send.startwhen a thread's session becomes ready, with recovery for previously-sending items.handleRetryQueuedTurndispatchesthread.queued-turn.retry).projection_queued_turnstable and addingqueue_item_idcolumn toprojection_turns.thread.turn.startnow always emits athread.message-sentevent beforethread.turn-start-requested, changing the event sequence for existing turn starts.Macroscope summarized ec2441f.