Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR aims to improve backend session shutdown behavior by ensuring websocket sessions and related background resources are torn down more reliably and with better logging.
Changes:
- Handle websocket disconnects more explicitly and add more robust teardown logging in the websocket endpoint.
- Improve session/task shutdown behavior in the context manager (incl. pyright unused-result cleanup).
- Add
EndOfStreamhandling inTextCoalescerand update the pyright baseline accordingly.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
backend/src/main.py |
Refactors websocket receive loop error handling and adds more detailed teardown/error logging. |
backend/src/interview_helper/context_manager/session_context_manager.py |
Adjusts task group shutdown call to satisfy static analysis. |
backend/src/interview_helper/context_manager/TextCoalescer.py |
Adds graceful handling for closed streams (anyio.EndOfStream) during coalescing. |
backend/.basedpyright/baseline.json |
Removes a baseline entry made obsolete by the code change. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.