Agentic RL支持监听http断开事件#149
Conversation
There was a problem hiding this comment.
Code Review
This pull request implements client disconnect detection in the FastAPI server, cancelling the processing task if a disconnect occurs, and adds utility functions for extracting request IDs and business summaries for logging. The review feedback suggests delaying the disconnect listener task creation until after the request body is fully parsed to avoid ASGI message competition, adding a null check for this listener in the 'finally' block to prevent 'AttributeError', and defensively accessing the 'headers' attribute on the request object.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Description
[Describe what this PR does and why]
Related Issue: Fixes #[issue_number] or Relates to #[issue_number]
Security Considerations: [Check if API keys or sensitive credentials are exposed in code/logs]
Type of Change
Component(s) Affected
Checklist
Testing
[How to test these changes]
Additional Notes
[Optional: any other context]