Read handshake status from public API instead of parsing library error strings
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 74/100
- issue の種類
- リファクタリング
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- typescript
- 領域
- networking
調査の方向性
Read handshakeStatus in src/websocket/utils.ts and trace the SSE path through SseConnection.createErrorEvent in src/websocket/sseConnection.ts; first run test/unit/websocket/utils.test.ts to understand the existing coverage. Check how the public event data reaches handshakeStatus, then verify that unrecoverable-HTTP handling and the SSE 404 fallback still work without relying on error message text.
索引モデルが issue の本文から書いたものです。
説明
Background
handshakeStatus (src/websocket/utils.ts) recovers the HTTP status of a failed
WebSocket/SSE handshake by parsing the error message text from two libraries:
ws—Unexpected server response: <code>eventsource—Non-200 status code (<code>)
Neither string is a public contract; both are plain template literals
(ws/lib/websocket.js and eventsource/src/EventSource.ts). If either reword on
a version bump, handshakeStatus returns undefined, every unrecoverable status
becomes a retry-forever connection_error, and CoderApi.is404Error stops
falling back to SSE.
A real-library test (test/unit/websocket/utils.test.ts) now guards against a
silent reword by failing in CI, but parsing internal strings is still fragile.
Proposal
Read the status from the libraries' public event APIs instead of the message:
- SSE:
eventsourceputs the status onErrorEvent.code(documented public
API).SseConnection.createErrorEvent(src/websocket/sseConnection.ts)
currently reads onlymessageanderrorand dropscode; surface it. - WebSocket:
wsexposes the same on itsunexpected-responseevent, which
also suppresses the string path once handled.
Once the status comes from the events, handshakeStatus's string parsing can be
narrowed or removed.
Acceptance
- Handshake status is derived from
ErrorEvent.code/ thews
unexpected-responseevent, not the error message text. - Unrecoverable-HTTP handling and the SSE 404 fallback keep working.
Filed by Coder Agents on behalf of @aqandrew, as a follow-up to PR #1100.
- 主要言語
- TypeScript
- スター
- 131
- フォーク
- 48
- 平均マージ
- 4日 15時間
- マージ済み PR(30日)
- 17
環境構築
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
coder/vscode-coder のほかの issue
-
Surface non-blocking agent startup script failures to the user対応中かも @EhabY が 3 日前に担当しました。 オープン
coder/vscode-coder#1125 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
Migrate CI setup to pnpm/setup対応中かも @EhabY が 8 日前に担当しました。 オープンtech-debt
coder/vscode-coder#1119 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
Design the VS Code Workspaces panel対応中かも @chrifro が 11 日前に担当しました。 オープン
coder/vscode-coder#1113 · コメント 3 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
Flush the connection log buffer after N failed reconnect attempts against an unreachable serverオープンenhancement tech-debt
難易度 5/5 1週間以上 初心者へのやさしさ 45/100
coder/vscode-coder#1112 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug upstream
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
coder/vscode-coder#1087 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
coder/vscode-coder の issue をすべて見る
似ている issue
-
docs
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
remix-run/react-router#15558 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
solana-foundation/pay-kit#341 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
supabase/agent-skills#607 ·
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信