fix(session): refine transport interruption phases#838
Conversation
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
✨ 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 |
There was a problem hiding this comment.
Code Review
This pull request introduces tracking for the completion of tool execution within the observability and incident derivation modules. Key changes include adding a tool_execution_completed flag to the attempt state and summary types, updating the recorder to capture this state, and refining the incident phase derivation logic to correctly categorize events occurring after tool execution. Additionally, new test cases verify that transport failures are accurately classified based on whether tool execution has started or completed. I have no feedback to provide.
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
Summary
after_tool_resultandpost_toolinstead of a pre-execution phase.Why
Issue #803 requires provider/transport streaming interruptions to distinguish tool-call generation from tool execution. The landed Run Incident Framework already fixed partial tool-input disconnects; this follow-up closes the remaining phase gap where a transport failure after tool execution could still look like
after_tool_call_before_execution.Related Issue
Closes #803.
Part of #808.
Human Review Status
Pending
Review Focus
tool_execution_startedno longer report a pre-execution provider phase.tool_execution_completedis tracked at attempt scope and only upgrades completed-tool transport failures toafter_tool_result/post_tool.Risk Notes
Latest review fix: terminal phase derivation now ignores same-attempt evidence recorded after the terminal event, and processor stream/tool execution diagnostics stay bound to the stream event or tool-call attempt instead of a later current attempt.
Latest follow-up review fix: halt/interrupt transport failures now record against the process-local failing attempt instead of mutable currentAttemptID, and same-monotonic phase truncation uses evidence order as a tie-breaker.
Latest tie-break review fix: terminal phase ordering now treats monotonic time as primary, uses evidence order only when monotonic times are equal, and transport cause facts are derived at the failure timestamp.
Latest lifecycle terminal review fix: terminal phase derivation now applies terminal-time evidence truncation even when the terminal event has no attempt_id, so lifecycle closes cannot be upgraded by later tool completion evidence.
How To Verify
Screenshots or Recordings
Not applicable — no visible UI change.
Checklist
bug,enhancement,task,documentation. Type labels are author-added; the labeler bot does NOT assign them. Add the label in the GitHub UI, then tick this.app,ui,platform,harness,ci. The labeler bot assigns these on PR open based on changed paths. Confirm the bot's choice (or override if wrong), then tick this.P0,P1,P2,P3. The priority-triage bot suggests one on PR open. Confirm or override, then tick this.Pending,Approved by @<reviewer>, orNot required: <reason>(default isPending; "not required" is restricted to bot-authored low-risk PRs).dev, and my PR title and commit messages use Conventional Commits in English.