[Bug] Windows CI 上 TestCloseSavesEditsMadeDuringFinalDiskCheck 偶现超过期限未能投递文档状态

Aperta
#2,379 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
50/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
go
Ambito
testing

Direzione di ricerca

Start at desktop/internal/workbench/document_observation_test.go around line 394, where the final disk check is blocked and the text "latest" is inserted. Reproduce with ./scripts/desktop/desktop-go.sh test ./internal/workbench -run '^TestCloseSavesEditsMadeDuringFinalDiskCheck$' -count=1 on Windows, then follow the document watcher and awaitDocumentState path to see how the deadline is set. Done means the test passes deterministically on Windows CI without simply extending the timeout.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

review: high
Platform / 平台

Windows

Area / 模块

Editor / 编辑器

Lithe version / Lithe 版本

开发分支(913661835 基线,PR #2344 与正文无关改动)

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/viva bb85256c8ffa
  • Core:PINNED_CORE_REVISION=076ce04e314ecdde790b36ee3f374becb11951a0
  • 复现环境:GitHub Actions Desktop CI / Vet and test on Windows(Run 45214592965 Attempt 1,Job 137832603047);同 Run --failed 重跑后通过
Steps to reproduce / 复现步骤
  1. 在 Windows CI 环境运行 ./scripts/desktop/check.sh 或 ./scripts/desktop/desktop-go.sh test ./internal/workbench -run '^TestCloseSavesEditsMadeDuringFinalDiskCheck$' -count=1。
  2. desktop/internal/workbench/document_observation_test.go:394 启动关闭文档前的最后一次磁盘校验阻塞,插入文本 "latest" 后释放读取器并等待 awaitDocumentState 完成关闭与磁盘保存。
Expected behavior / 预期行为

文档关闭前完成末次校验并确定性保存最新编辑到磁盘,测试在有界期限内稳定通过。

Actual behavior / 实际行为

在 Windows runner 高负载条件下偶发超时失败,报告 document watcher did not deliver the expected state before the deadline(8.04s),同一运行仅重跑失败 job 即恢复通过。

Logs or diagnostic output / 日志或诊断输出
# GitHub Actions Run 45214592965 (Attempt 1, Vet and test on Windows)
--- FAIL: TestCloseSavesEditsMadeDuringFinalDiskCheck (8.04s)
    document_observation_test.go:394: document watcher did not deliver the expected state before the deadline
FAIL
FAIL	github.com/1lck/Lithe-IDEA/desktop/internal/workbench	115.550s
Screenshots or recordings / 截图或录屏

不适用:纯测试稳定性与 Windows 文件监听时序问题,无桌面界面变化。

Checklist / 提交前检查
  • I searched existing issues for duplicates. / 我已搜索现有 Issue,确认没有重复报告。
  • I removed secrets and personal data from the report. / 我已从报告中移除敏感信息和个人数据。
Lingua principale
TypeScript
Stelle
1.8k
Fork
151
Merge medio
4h 4m
PR unite (30g)
558

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di 1lck/Lithe-IDEA

Tutte le issue di 1lck/Lithe-IDEA

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.