Repository navigation
Closed
Labels
Description
Platform / 平台
macOS
Area / 模块
Test / 测试
Lithe version / Lithe 版本
0119f41 (also observed earlier at 761e6f8 on origin/main)
Priority / 优先级
P1 / 尽快处理:使用体验大幅下降,但通常仍可继续使用
OS and architecture / 操作系统与架构
macOS 26 ARM64 (GitHub Actions macos-26 runner)
Environment / 环境信息
Go + Lithe-core-rust (scripts/desktop/check.sh, ./internal/workbench package suite)
Steps to reproduce / 复现步骤
- Run
Desktop CI(Vet and test on macOSonmacos-26) running./scripts/desktop/check.sh. - Reach
TestProjectTreeDirectoryReadCancelsWhenProjectCloses(desktop/internal/workbench/filetree_test.go:101-132). - Observe intermittent failures in
openTree->closeTree->listTreesequence.
Expected behavior / 预期行为
TestProjectTreeDirectoryReadCancelsWhenProjectCloses arms cancelledTreeListingKernel, starts ListDirectories, cancels it when the project closes, and passes deterministically on every macOS CI run.
Actual behavior / 实际行为
On macos-26 runners running the full internal/workbench suite, the test intermittently fails with:
filetree_test.go:119: directory read did not start (after waiting 8 seconds).
Observed CI runs:
- Run
44554059512(PR feat(toolchains): 接入插件工具链提供方 #2193,macos-26):TestProjectTreeDirectoryReadCancelsWhenProjectCloses(filetree_test.go:119: directory read did not start) - Run
44666328097(PR fix(desktop): 同步 Viva 上游至 46b10fdf(v0.6.6+)并更新固定版本 #2220, two attempts onmacos-26): identical failure in both attempts, while Linux, Windows, and isolated local runs pass (0.05s).
Likely root cause from inspection:
h.openTree(desktop/internal/workbench/filetree_actions_test.go:39) awaits onlyp.tree.root != nil && p.tree.root.listedrather than!p.tree.reading/ watch settle.- On macOS (
treeUsesRecursiveWatch() == true), initial recursive FSEvents ready/resync events can triggerresyncTreeListingsaroundcloseTree(p)/listTree(p, "")(filetree_watch.go:94-106), leavingp.tree.reading == trueso the subsequentpumpTreeListingsskips callingkernel.ListDirectories. - Calling
h.app.closeTree(p)/h.app.listTree(p, "")directly outsideh.app.postcan also race with window thread tree listing state.
Logs or diagnostic output / 日志或诊断输出
--- FAIL: TestProjectTreeDirectoryReadCancelsWhenProjectCloses (8.11s)
filetree_test.go:119: directory read did not start
FAIL
FAIL github.com/1lck/Lithe-IDEA/desktop/internal/workbench 398.191sScreenshots or recordings / 截图或录屏
N/A
Checklist / 提交前检查
- I searched existing issues for duplicates. / 我已搜索现有 Issue,确认没有重复报告。
- I removed secrets and personal data from the report. / 我已从报告中移除敏感信息和个人数据。
Activity
test(workbench): drain native tree read before cancellation assertion (…
test(workbench): 避免 macOS 项目树取消测试等待未驱动的目录读取(#2221) (#2347)