fix: suppress recoverable global event stream noise - #715
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 (5)
✨ 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.
Suggested priority: P2 (includes user-path files (packages/app/src/context/global-sdk.tsx, packages/app/src/context/global-sdk/sse-error.test.ts, packages/app/src/context/global-sdk/sse-error.ts)).
P1/P0 are reserved for maintainer confirmation. Please relabel manually if this is a release blocker, security issue, data-loss risk, or updater/runtime failure.
There was a problem hiding this comment.
Code Review
This pull request refactors SSE error handling by replacing a Zod-based abort check with a more comprehensive isRecoverableSseDisconnect utility. This new utility identifies recoverable network errors, such as Chromium's suspended IO or closed connections, alongside intentional aborts. Unit tests were also introduced to verify these scenarios. The reviewer suggested improving the robustness of the error detection by using an isErrorLike type guard instead of strictly checking for TypeError, which would ensure better compatibility across different environments.
Perf delta summaryComparator: pass
|
Summary
Suppress recoverable global event stream disconnects from the install-build console error path.
Why
The packaged app can show
/global/eventfailures such asnet::ERR_NETWORK_IO_SUSPENDED, followed by[global-sdk] event stream error, even when the app and local sidecar keep running normally. That stream is the global SSE subscription used for app state updates, and these Chromium/Electron disconnects are recoverable through the existing reconnect loop.The bug is that recoverable SSE disconnects were logged like product failures.
Related Issue
Closes #690
Human Review Status
Pending. A human should make the final merge decision after reviewing the final diff and verification evidence.
Review Focus
Please check the classifier boundary: intentional aborts and known Chromium/Electron recoverable network disconnects should stay out of
console.error, while unknown parse/server errors still report.Risk Notes
Low. The PR does not change the SSE reconnect loop, cursor replay, heartbeat, server route, or event reducer behavior. It only changes whether known recoverable disconnects are treated as console errors in the global SDK stream path.
How To Verify
Screenshots or Recordings
Not applicable. This is a console logging / SSE error classification change with no visible UI changes.
Checklist
bug,enhancement,task, ordocumentation), at least one primary routing label (app,ui,platform,harness, orci), and exactly one priority label (P0toP3), or I requested maintainer labelingdev, and my PR title and commit messages use Conventional Commits in English