fix(install): make psutil a hard win32 dependency#72
Conversation
|
Warning Review limit reached
Next review available in: 17 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (6)
WalkthroughThe ChangesDependency configuration update
Estimated code review effort: 1 (Trivial) | ~3 minutes Estimated code review effort: 1 (Trivial) | ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
On Windows psutil is load-bearing, not optional: WindowsProcessHost probes engine liveness/identity through it (no /proc, and os.kill(pid,0) is a destructive CTRL_C_EVENT on win32). When it is absent every liveness read degrades to "unknown" and the TUI paints every run as `?`. It was only declared in the optional `non-linux` extra, which the default install path (bmad-loop-setup's `[tui]`) never pulls. Promote it to a platform-scoped core dependency so pip, uv tool, and the setup skill all get it automatically on Windows; Linux stays dep-free and the extra remains the macOS opt-in. Closes bmad-code-org#71
7ddd4f4 to
c247f8b
Compare
🤖 Augment PR SummarySummary: Makes 🤖 Was this summary useful? React with 👍 or 👎 |
psutil is now a core dep on win32, so pointing Windows users at the optional bmad-loop[non-linux] extra is misleading. Reword both _psutil() errors (and their docstrings) to say "reinstall bmad-loop" on Windows and keep the extra hint for macOS.
…ad-time metadata)
pbean
left a comment
There was a problem hiding this comment.
Validated end-to-end — approving. The root-cause trace checks out exactly as described: WindowsProcessHost.is_alive depends entirely on psutil (process_host.py), probe_liveness() degrades a missing psutil to unknown, and the default install path (bmad-loop[tui] via the setup skill) never pulled the non-linux extra — so a stock Windows install genuinely paints every run ?. The sys_platform == 'win32' core-dep marker is the right shape: Linux stays dep-free, non-linux remains the macOS opt-in, and >=7.2.2 matches both the existing extra pin and the current PyPI latest.
I pushed three mechanical fix-ups to the branch (hope you don't mind):
- uv.lock re-locked with a current uv — the lock had been regenerated with an older uv (schema
revision = 3→1, allupload-timefields stripped, ~260 lines of churn that would flip back on the next maintaineruv lock). The lock diff vs main is now just the two psutil marker entries. - Merged main + CHANGELOG entry under
[Unreleased] → Fixed. - Two docs aligned (
docs/game-engine-plugin-guide.md,docs/plugin-authoring-guide.md) — both still described psutil as exclusively the opt-innon-linuxextra, including on Windows.
Full test suite + trunk check green locally. Will squash-merge once CI re-greens. Thanks for the sharp diagnosis and the clean fix, @dracic!
What
Make
psutila platform-scoped core dependency (psutil>=7.2.2; sys_platform == 'win32') instead of an opt-innon-linuxextra.Why
On win32 psutil is load-bearing:
WindowsProcessHostprobes engine liveness/identity through it (no/proc, andos.kill(pid, 0)there is a destructiveCTRL_C_EVENT). When it's absentprobe_liveness()degrades to"unknown", sobmad-loop tuipaints every run as?regardless of actual state.The default install path never pulled it — the
bmad-loop-setupskill installsbmad-loop[tui], not[non-linux]. This marker makes pip,uv tool, and the setup skill all get psutil automatically on Windows. Linux stays dep-free; thenon-linuxextra remains the macOS opt-in.Closes #71
Summary by CodeRabbit