[Bug] Windows CI 上 TestPluginSaveWritesTheCurrentTextAtTheExpectedVersion 偶现文件被占用无法移除保存失败
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Start at desktop/internal/workbench/pluginfilechanges_test.go:48-66 and reproduce with ./scripts/desktop/desktop-go.sh test ./... on a Windows runner (it passes on Linux/macOS, so the failure is Windows-only). Follow w.SaveDocument into the plugin host code that raises plugin.host.failed: The save failed: Unable to remove the file to be replaced. — that remove/replace step is where a lingering file handle or transient lock bites. Done means the test passes reliably on Windows, either by closing handles before the replace or retrying on transient lock errors.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Platform / 平台
Windows
Area / 模块
Editor / 编辑器
Lithe version / Lithe 版本
d5a091c83(基于 3d7b5acb5,PR #2342 与插件文件保存无关改动)
Priority / 优先级
P2 / 后续考虑:目前不着急,可安排到后续版本
OS and architecture / 操作系统与架构
Windows Server 2022 (windows-2022), x86_64 (GitHub Actions runner)
Environment / 环境信息
- Go:
desktop/go.mod固定版本;Viva:github.com/Lithe-IDEA/vivabb85256c8ffa - Core:
PINNED_CORE_REVISION=9ab2336e8ca651e40baa5e65848b717b26f69e43 - 复现环境:GitHub Actions
Desktop CI / Vet and test on Windows(Run45318253535Attempt 1,同节点 Linux 与 macOS 全量通过)
Steps to reproduce / 复现步骤
- 在 Windows runner 上运行全量
./scripts/desktop/desktop-go.sh test ./...。 desktop/internal/workbench/pluginfilechanges_test.go:48-66(TestPluginSaveWritesTheCurrentTextAtTheExpectedVersion)先用过期版本号调用w.SaveDocument验证版本冲突未写盘,再用最新版本号调用w.SaveDocument保存文档。
Expected behavior / 预期行为
携带最新版本号调用 w.SaveDocument 时稳定将 "ALPHA" 写入目标文件并清除脏标记。
Actual behavior / 实际行为
在 Windows runner 上偶发失败:w.SaveDocument 返回 plugin.host.failed: The save failed: Unable to remove the file to be replaced.,磁盘内容仍为 "alpha"。可能与 Windows 共享句柄未释放、搜索索引/杀毒短时占用或替换实现未处理瞬态文件锁有关。
Logs or diagnostic output / 日志或诊断输出
# GitHub Actions Run 45318253535 (Attempt 1, Vet and test on Windows)
--- FAIL: TestPluginSaveWritesTheCurrentTextAtTheExpectedVersion (0.17s)
pluginfilechanges_test.go:64: save = {DocumentID: Version:0 Path:<nil> LanguageID:<nil> IsReadOnly:false IsDirty:false Encoding: LineEnding:}, plugin.host.failed: The save failed: Unable to remove the file to be replaced., disk "alpha"
FAIL
FAIL github.com/1lck/Lithe-IDEA/desktop/internal/workbench 278.151s
Screenshots or recordings / 截图或录屏
不适用:纯 Windows 保存测试偶发失败,无桌面界面变化。
Checklist / 提交前检查
- I searched existing issues for duplicates. / 我已搜索现有 Issue,确认没有重复报告。
- I removed secrets and personal data from the report. / 我已从报告中移除敏感信息和个人数据。
- Ngôn ngữ chính
- TypeScript
- Star
- 1.8k
- Fork
- 151
- Merge trung bình
- 4 giờ 4 phút
- Pull request đã merge (30 ngày)
- 558
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của 1lck/Lithe-IDEA
-
refactor review: high
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
1lck/Lithe-IDEA#2376 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug issue-form:bug review: no-score
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
1lck/Lithe-IDEA#2373 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:ui enhancement P2 platform:cross-platform refactor review: high
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 84/100
1lck/Lithe-IDEA#2365 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
review: high
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 28/100
1lck/Lithe-IDEA#2381 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
review: high
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 50/100
1lck/Lithe-IDEA#2379 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của 1lck/Lithe-IDEA
Issue tương tự
-
chore
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
drydocs/meridian#1503 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
bug extension mcp
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
primer/primitives#1426 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
danielmiessler/LifeOS#2941 ·
Maintainer thường phản hồi trong vòng 4 ngày
-
Sign-in-only setup dialog describes API-key verificationCó thể đã có người làm @roboclaw-bot đã nhận hôm nay. Đang mởclawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P2
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
openclaw/openclaw#204323 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày