Skip to content

fix(backend): close sessions properly#46

Merged
StarDylan merged 2 commits intomainfrom
fix-session-closing
Feb 6, 2026
Merged

fix(backend): close sessions properly#46
StarDylan merged 2 commits intomainfrom
fix-session-closing

Conversation

@StarDylan
Copy link
Owner

No description provided.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 EndOfStream handling in TextCoalescer and 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.

@StarDylan StarDylan merged commit 3e66186 into main Feb 6, 2026
2 checks passed
@StarDylan StarDylan deleted the fix-session-closing branch February 6, 2026 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments