Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#1,112 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
45/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
TypeScript
Stelle
131
Fork
48
Merge medio
4g 15h
PR unite (30g)
17

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di coder/vscode-coder

Tutte le issue di coder/vscode-coder

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.