Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Flush the connection log buffer after N failed reconnect attempts against an unreachable server

Đang mở
#1,112 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 2 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
45/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
networking, observability

Hướng nghiên cứu

Start by reading src/websocket/reconnectingWebSocket.ts and src/logging/logBuffer.ts, then review PR #1100 for the existing flush triggers and reasons. Settle the retry threshold, counter reset, and one-flush-per-failure-episode behavior. Done means sustained unreachable-server retries flush the buffer once, a successful connection resets the episode, and later terminal failures retain their existing behavior.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement tech-debt
Background

DEVEX-669 (#1100) added BufferingLogger, which flushes buffered below-level connection logs into the "Coder" output channel on a genuine, surfaced connection failure:

  • a reconnecting WebSocket terminal failure (unrecoverable_close, unrecoverable_http, or certificate_error; a handshake 401 is excluded because a token refresh reconnects the same socket);
  • a failure while opening a workspace (canceled build, missing agent, timeout, or CLI/certificate error).

During Ehab's review of #1100 we agreed to defer one additional trigger: flushing after N consecutive failed reconnect attempts against an unreachable server.

Problem

When a server is simply unreachable, the reconnecting WebSocket keeps retrying with backoff and never reaches a terminal failure reason, so the buffer is never flushed. A user reproducing a "can't connect / hangs on connecting" problem therefore gets no buffered detail in their support bundle, even though plenty of below-level context was captured.

Proposal

Flush the connection log buffer once a reconnect loop has failed N consecutive times (i.e., treat sustained unreachability as a genuine failure worth surfacing), then avoid re-flushing on every subsequent attempt until a successful connect resets the counter.

Open questions to settle during implementation:

  • Value of N (or a time-based threshold instead of / in addition to a count).
  • Where the counter lives and how it resets on a successful open.
  • Guarding against repeated flushes while still stuck (flush once per failure "episode").
  • A meaningful flush reason/route for attribution, consistent with the existing terminal-failure reasons.
References
  • PR #1100 (DEVEX-669)
  • src/websocket/reconnectingWebSocket.ts, src/logging/logBuffer.ts

🤖 Filed by Coder Agents on behalf of @aqandrew, following up on the #1100 review.

Ngôn ngữ chính
TypeScript
Star
131
Fork
48
Merge trung bình
2 ngày 3 giờ
Pull request đã merge (30 ngày)
16

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của coder/vscode-coder

Tất cả issue của coder/vscode-coder

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.