ahp.connections.refresh retries forever with 30s timeouts and no backoff or circuit breaker

未關閉
#5,594 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
46/100
Issue 類型
缺陷
描述清晰度
基本清楚
活躍度
活躍
技術堆疊
python
領域
cli

研究方向

Start by locating the ahp.connections.refresh request and its background retry loop; the issue does not name source files or tests. Read the related issue #4907 for context, then trace how retries retain the in-memory connection snapshot. Done means failed refreshes use capped exponential backoff, stop or trip a circuit breaker after repeated failures, and surface dead connections to users.

由索引模型根據 Issue 內容生成。

描述

area:networking

Build: 1.0.115 (packaging-agnostic: observed on both snap and standalone Windows installs, two machines).

Repro / observation (passive, log-based):

  1. Leave a CLI host process running with stale remote AHP environment connections whose compute hosts no longer exist.
  2. Tail the host process log.

Actual: ahp.connections.refresh requests fail continuously: each attempt ends after a ~30s timeout (JSON-RPC code -32603, "Connection recovery has not succeeded after 60 seconds. Background retries continue.") and the loop re-fires every ~4s indefinitely. Aggregated counts from two independent machines over ~18h: ~23,000 failed refresh requests on one host, plus a steady ~300 failures/10min rate after the dead connections were removed from user config but before the host process restarted (the retry loop keeps its in-memory snapshot).

Expected: exponential backoff with a cap; a circuit breaker after N consecutive failures; surfacing dead connections to the user (e.g. /status or one-time notice) instead of silent background churn. A shared request path with 30s-timeout retries every 4s risks event-loop pressure that plausibly contributes to user-visible latency complaints (interactions with notification-surfacing latency were inconclusive from our side and are reported separately, honestly labeled).

Related pattern: #4907 (MCP reconnect notification flood) — same class: unbounded background retry loops with user-visible side effects.

主要語言
Python
星號
11.5k
分支
2k
平均合併
6 小時 34 分鐘
30 天內合併 PR
3

環境準備

  • 沒有 Dockerfile 或 Docker Compose 檔案
  • 沒有 Pull Request 範本
  • 閱讀貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

github/copilot-cli 的其他 Issue

查看 github/copilot-cli 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。