Copilot PR-state polling throws RangeError: Invalid array length while accumulating paginated results
維護者通常 1 天內回覆
評估
這個 Issue 還沒有評估資料。
描述
- Extension version: GitHub Pull Requests 0.166.1
- VSCode Version: 1.141.0-insider; also observed after updating to d1f9096c3663d21e55cf448de012c620b960220a on 6 October 2026
- OS: macOS 27.0.1, Apple Silicon
- Repository Clone Configuration (single repository/fork of an upstream repository): Multiple repositories/worktrees and windows, including the Agents window
- GitHub Product (GitHub.com/GitHub Enterprise version x.x.x): GitHub.com
Steps to Reproduce:
An exact minimal reproduction has not yet been isolated. This report comes from retained logs during normal multi-window/Agents-window use, not from a new controlled reproduction.
- Use the affected extension with PR/Copilot-state polling active across repositories/worktrees.
- Observe background polling failures in the extension-host log. A useful targeted reproduction is a query that has multiple pages, particularly after the Copilot state model has initialized.
Observed
Ten RangeError: Invalid array length exceptions were recorded during 4 October 2026 13:14 to 6 October 2026 13:14 CEST (UTC+02). Renderer copies of the same exceptions were not counted again. The failure persisted after the latest Insiders update, with examples at 6 October 12:49:17, 12:51:41, and 13:08:28 CEST.
2026-10-06 12:49:17.147 [error] RangeError: Invalid array length
at Array.push (<anonymous>)
at <extensions>/github.vscode-pull-request-github-0.166.1/dist/extension.js:4168:41690
at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
at async O6._pollForChanges (<extensions>/github.vscode-pull-request-github-0.166.1/dist/extension.js:3794:58246)
Paths are redacted; the error, timestamps, and bundled source locations are preserved. The failure interrupts background Copilot/PR-state refresh and may involve a very large accumulated array; no heap measurement has been taken.
Likely cause to investigate
Inspection of the installed bundle maps the failing push to refreshCopilotStateChanges. It loops while hasMorePages and appends the result of getPullRequestsForQuery. The helper can return cached or cumulative results, while the argument used for fetchNextPage is derived from the model's initialization state rather than advancing explicitly with each loop iteration.
This suggests repeated accumulation of the same/cumulative page when hasMorePages stays true. This is a code-and-stack hypothesis, not yet a regression-tested diagnosis.
Expected / proposed direction
Polling should advance pagination, terminate, and accumulate each PR once without unbounded array growth. Please check cached versus incremental query-result semantics and add regression coverage for an initialized model with more than one page, including a non-advancing result.
Raw logs are not attached because they contain unrelated private workspace/session data.
- 主要語言
- TypeScript
- 星號
- 2.6k
- 分支
- 800
- 平均合併
- 1 天 6 小時
- 30 天內合併 PR
- 46
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
microsoft/vscode-pull-request-github 的其他 Issue
-
PR overview remains stuck checking mergeability after an UNKNOWN response可能已有人在做 @alexr00 於 9 天前認領。 未關閉bug
難度 2/5 1-3 小時 新手友好度 78/100
microsoft/vscode-pull-request-github#8953 · 已指派 1 人 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 68/100
microsoft/vscode-pull-request-github#8792 ·
維護者通常 1 天內回覆
-
False C# syntax errors and red squiggles when viewing pull request diffs可能已有人在做 @alexr00 於 1 天前認領。 未關閉info-needed
microsoft/vscode-pull-request-github#9034 · 3 則留言 · 已指派 1 人 ·
維護者通常 1 天內回覆
-
Enable "Open original file" for deleted files可能已有人在做 @alexr00 於 2 天前認領。 未關閉
microsoft/vscode-pull-request-github#9030 · 1 個 reaction · 已指派 2 人 ·
維護者通常 1 天內回覆
-
Issue links in overview HTML are emitted with an extra quote in href可能已有人在做 @alexr00 於 3 天前認領。 未關閉bug
microsoft/vscode-pull-request-github#9022 · 已指派 1 人 ·
維護者通常 1 天內回覆
查看 microsoft/vscode-pull-request-github 的全部 Issue
相似的 Issue
-
[Docs] README: FAQ setup command, IDA in the intro, Node badge可能已有人在做 @akram1089 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 85/100
維護者通常 1 天內回覆
-
[Feature]: [P3] engine-rs: the package source hash should ignore line endings and untracked files未關閉
難度 2/5 1-3 小時 新手友好度 70/100
maniator/verticopolis#880 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 72/100
-
難度 2/5 1-3 小時 新手友好度 62/100
siyuan-note/siyuan#20353 ·
維護者通常 1 天內回覆
-
afk-ok area:data-quality importer size:S
難度 2/5 1-3 小時 新手友好度 82/100
enorm-labs/event-junkie#3027 ·
維護者通常 1 天內回覆