Preserve connecting status while a turn starts#4101
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)
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 modifies session state machine behavior in the orchestration layer, changing how status transitions during turn startup. The changes affect core runtime state management across multiple files, warranting human review despite good test coverage. You can customize Macroscope's approvability policy. Learn more. |
fb8870e to
1c1aa71
Compare
Co-authored-by: codex <codex@users.noreply.github.com>
Dismissing prior approval to re-evaluate 1c1aa71
Co-authored-by: codex <codex@users.noreply.github.com>
1c1aa71 to
919bd72
Compare
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
What Changed
Preserve the connecting thread status while provider readiness arrives with a turn start still pending. The thread transitions directly to working once the turn starts instead of briefly appearing inactive.
Why
Status-grouped thread lists currently jump between sections during provider startup because readiness temporarily exposes an idle state.
Fixes #4099
Verification
Checklist
Note
Preserve 'starting' session status while a turn start is pending
thread.turn.startis handled, the session is immediately projected asstartingbefore the provider session is fully ready, and remainsstartingeven if the provider reportsreadyuntil a turn actually begins.ProviderRuntimeIngestionmapssession.state.changed 'ready'andsession.startedevents tostarting(rather thanready) when a pending turn-start exists for the thread.thread.session-setwith terminal statuses (error,stopped,interrupted), any pending turn-start records for the thread are deleted viaprojectionTurnRepository.deletePendingTurnStartByThreadId.setThreadSessionErrorOnTurnStartFailurenow constructs a minimal session from the thread when none exists, setting status toerror(or keepingstopped) so turn failures are always surfaced.readybetween turn-start and the first turn event will now showstartinginstead.Macroscope summarized 919bd72.