Skip to content

fix: resolve inconsistent doctor --live report (fix #121)#224

Merged
jackwener merged 2 commits intojackwener:mainfrom
yanCode:codex/fix-issue-121-live-status-refresh
Mar 22, 2026
Merged

fix: resolve inconsistent doctor --live report (fix #121)#224
jackwener merged 2 commits intojackwener:mainfrom
yanCode:codex/fix-issue-121-live-status-refresh

Conversation

@yanCode
Copy link
Contributor

@yanCode yanCode commented Mar 22, 2026

修复了issue #121:--live 执行后会重新读取一次状态,再生成最终报告,改动在 src/doctor.ts。另外补了一条回归测试,覆盖“初始未运行,但 live 检查启动了 daemon”的场景,见 src/doctor.test.ts。

验证我已经跑过:npm test -- src/doctor.test.ts,6 个测试都通过。

yanCode and others added 2 commits March 22, 2026 08:32
Instead of calling checkDaemonStatus() twice (before and after the
connectivity check), reorder so that the live connectivity check runs
first, then read daemon status only once. This:
- Eliminates redundant checkDaemonStatus() call
- Naturally avoids the timing inconsistency (fixes jackwener#121)
- Also fixes the sessions query using stale status
- Simplifies test assertions to avoid over-coupling to exact wording
@jackwener jackwener merged commit 387aa0d into jackwener:main Mar 22, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants