[Bug] Windows 项目树展开上限测试在等待树空闲时超时
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
Start with internal/workbench/filetree_actions_test.go:235 and the TestProjectTreeExpandAllStopsAtItsLimit test; it times out while waiting for treeIdle(p) after the expansion limit assertions pass. Compare the test and tree reading or pending state with the main overlay, where the same failure occurs, then capture the pending directory and watcher state during the wait. Done means identifying why the tree does not reach idle or supplying a minimal diagnostic that pinpoints the unfinished read or synchronization boundary.
由索引模型根据 Issue 内容生成。
描述
Platform / 平台
Windows
Area / 模块
Test / 测试
Lithe version / Lithe 版本
源码测试构建:测试二进制启动时 checkout HEAD 为 4225299b1073f39e87ddc36caa20fd6da98bb0fb,含 #2425 的工作台测试修复。filetree_actions_test.go 相对 main 349f389ba027bedd003fbda2faf0e7f64d7e7f10 无差异;main 工作台源代码 overlay 同样失败。这是源码测试失败,不是已发布应用的运行报告。
Priority / 优先级
P2 / 后续考虑:目前不着急,可安排到后续版本
OS and architecture / 操作系统与架构
Windows 11 Pro,build 26300,原生 amd64 物理机,无架构仿真。
Environment / 环境信息
- 发生于 2026-11-26(Asia/Shanghai)的本地 Windows 工作台分段测试。Go 1.27.4、GNU Rust 1.100.0、Git 2.56.1.windows.1;CPU Intel Core Ultra 5 125H,32 GiB 内存。
- 默认固定 Core
e8927412b6324636f2636b58c521758451d97fc4、Viva448b0553faf8,无本地依赖覆盖。通过仓库的 Git Bash / desktop-go 构建与测试入口执行。 - 用例在本地
t.TempDir()下创建treeExpandAllLimit + 2个平级目录,每个目录有一个f.txt,使用合成工作台 harness 和真实目录读取/监听边界。没有业务项目、真实插件或外部网络依赖。 - main 对照通过 Go overlay 将本分支相对基线有差异的 20 个 Go 源文件(含工作台和 i18n 生成文件)映射回
349f389ba,本次新增文件替换为空的package workbench,使用相同固定依赖;这是该包的源码对照,不宣称重新验证了整个 main 仓库。 - 失败时没有采集 CPU/磁盘负载、文件监听事件序列及待处理目录快照;不能据此判断是负载、监听事件、目录读取流程还是测试同步问题。临时目录实际路径及完整环境变量未公开。
Steps to reproduce / 复现步骤
- 在 Windows 上准备上述源码和默认固定依赖,按仓库构建入口运行工作台测试。本轮实际由工作台分段测试触发。
- 用例可用
scripts/desktop/desktop-go.sh test -count=1 ./internal/workbench -run '^TestProjectTreeExpandAllStopsAtItsLimit$'筛选;本报告没有额外执行隔离复跑,不能保证孤立运行必现。 - 用例创建
treeExpandAllLimit + 2个目录并打开项目树,调用expandProjectTree,验证停止展开、上限提示及展开目录数。 - 在
filetree_actions_test.go:235等待treeIdle(p),即!p.tree.reading && len(p.tree.pending) == 0。
Expected behavior / 预期行为
展开达到上限后,已经请求的目录读取应在有界时间内完成,项目树进入空闲状态,测试稳定结束。若流程不能完成,应提供足以定位未完成读取或测试同步边界的最小诊断。
Actual behavior / 实际行为
用例已通过停止展开、提示文本和目录数量的断言,随后在最后等待树空闲的步骤达到 awaitDocumentState 的期限,报告 document watcher did not deliver the expected state before the deadline。本轮测试整体耗时 9.24s;main 源码 overlay 中同一行、同一错误再次失败,整体耗时 9.45s。这些是整项测试耗时,不能当作纯等待时间。
原因尚未确定。日志只证明等待期间未观察到预期的树空闲状态,不能据此断定生产项目树永久挂死,也不能归因于 #2425 的 taskGroup 或新的等待 helper。main 对照同失败表明该症状在本次修复之外也存在。
查重时已阅读 #2379(另一文档关闭用例的同类等待错误)和已关闭的 #2221(macOS 项目关闭取消目录读取的不同等待位置);它们没有记录本用例的 Windows 展开上限后空闲等待失败。错误文案来自共用 helper,本身不足以证明同一根因;后续诊断若确认关联,可再合并跟踪。
Logs or diagnostic output / 日志或诊断输出
# 当前测试构建(启动时 checkout HEAD 4225299b1)
=== RUN TestProjectTreeExpandAllStopsAtItsLimit
filetree_actions_test.go:235: document watcher did not deliver the expected state before the deadline
--- FAIL: TestProjectTreeExpandAllStopsAtItsLimit (9.24s)
# main 349f389ba 工作台源码 overlay,相同依赖
=== RUN TestProjectTreeExpandAllStopsAtItsLimit
filetree_actions_test.go:235: document watcher did not deliver the expected state before the deadline
--- FAIL: TestProjectTreeExpandAllStopsAtItsLimit (9.45s)
Screenshots or recordings / 截图或录屏
不适用:本轮为命令行驱动的工作台测试,无真实用户界面操作录屏;失败步骤和日志已列出。
Checklist / 提交前检查
- I searched existing issues for duplicates. / 我已搜索现有 Issue,确认没有重复报告。
- I removed secrets and personal data from the report. / 我已从报告中移除敏感信息和个人数据。
- 主要语言
- TypeScript
- 星标
- 1.8k
- 派生
- 151
- 平均合并
- 3 小时 48 分钟
- 30 天内合并 PR
- 571
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
1lck/Lithe-IDEA 的其他 Issue
-
review: medium
难度 2/5 1-3 小时 新手友好度 78/100
1lck/Lithe-IDEA#2432 ·
维护者通常 1 天内回复
-
review: medium
难度 1/5 1 小时以内 新手友好度 82/100
1lck/Lithe-IDEA#2431 ·
维护者通常 1 天内回复
-
refactor review: high
难度 2/5 1-3 小时 新手友好度 72/100
1lck/Lithe-IDEA#2376 ·
维护者通常 1 天内回复
-
area:ui enhancement P2 platform:cross-platform refactor review: high
难度 1/5 1 小时以内 新手友好度 84/100
1lck/Lithe-IDEA#2365 ·
维护者通常 1 天内回复
-
review: medium
难度 3/5 1-2 天 新手友好度 57/100
1lck/Lithe-IDEA#2434 ·
维护者通常 1 天内回复
相似的 Issue
-
foreground-up-signals-live: delivery-repair cell expects a spawn suggestion status no longer prints未关闭bug triage:owned
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
e2e-failure ready-to-code
难度 2/5 1-3 小时 新手友好度 78/100
redhat-developer/rhdh-plugin-export-overlays#4905 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
directus/directus#28558 · 1 条评论 ·
维护者通常 2 天内回复
-
难度 1/5 1 小时以内 新手友好度 88/100
cloudflare/workers-sdk#17189 ·
维护者通常 1 天内回复
-
AWS Lambda Waiting for: Product Owner
难度 1/5 1 小时以内 新手友好度 82/100
getsentry/sentry-javascript#26910 · 1 条评论 ·
维护者通常 1 天内回复