Skip to content

fix: harden gateway runtime migration reliability#5

Merged
pionxe merged 1 commit into
mainfrom
fork-pr-374-1776686256
Apr 20, 2026
Merged

fix: harden gateway runtime migration reliability#5
pionxe merged 1 commit into
mainfrom
fork-pr-374-1776686256

Conversation

@fennoai
Copy link
Copy Markdown

@fennoai fennoai Bot commented Apr 20, 2026

Requested by @pionxe

Summary

  • fix gateway RPC close/readLoop concurrency to avoid send-on-closed-channel panic
  • add notification backpressure fail-fast timeout to prevent indefinite blocking
  • tighten runtime session already-exists classification with sentinel errors
  • map sqlite duplicate create errors to session.ErrSessionAlreadyExists
  • add regression tests for close interleaving and backpressure fail-fast

…fication issues

- harden gateway rpc notification backpressure with fail-fast timeout
- avoid close/readLoop channel panic by removing queue close path
- replace runtime already-exists string matching with sentinel errors.Is checks
- add ErrSessionAlreadyExists and map sqlite unique constraints to sentinel
- add regression tests for close interleaving and backpressure fail-fast

Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: pionxe <148670367+pionxe@users.noreply.github.com>
@fennoai
Copy link
Copy Markdown
Author

fennoai Bot commented Apr 20, 2026

Important

Configuration Required

No API key has been configured for this organization. XGopilot requires an API key to process requests.

Please visit the Settings page to configure your API key.

@codecov-commenter
Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 87.50000% with 5 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
internal/session/sqlite_store.go 71.42% 2 Missing and 2 partials ⚠️
internal/tui/services/gateway_rpc_client.go 96.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@pionxe pionxe merged commit 9c50ab8 into main Apr 20, 2026
1 check passed
@fennoai fennoai Bot deleted the fork-pr-374-1776686256 branch April 20, 2026 15:28
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.

3 participants