fix(doctor): support macOS 27 pmset therm/batt output#1
Merged
Conversation
macOS 27 changed the text emitted by pmset -g therm (no longer prints CPU_Scheduler_Limit when idle) and pmset -g batt (AC Power now appears on a separate "Now drawing from" line). The doctor command silently dropped the thermal row and could misclassify the power source. Add src/system.js with parseThermalOutput and parseBatteryOutput helpers that recognise both the legacy numeric form and the macOS 27 wording, and treat the macOS 27 Note: lines as an explicit healthy-idle state reported as "no thermal pressure". Wire them into runDoctor and cover legacy and macOS 27 outputs with unit tests. Bump version to 0.5.2. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
pmset -g thermandpmset -g batt. On this release thedoctorcommand silently dropped the thermal check (becauseCPU_Scheduler_Limitis no longer printed when the machine is idle) and could misread the power source (AC Power now lives on a separateNow drawing fromline).src/system.jswithparseThermalOutputandparseBatteryOutputhelpers that handle both the legacy numeric form and the macOS 27 wording. The macOS 27Note:idle output is now reported explicitly asno thermal pressureinstead of being dropped.runDoctor, adds unit tests for legacy + macOS 27 outputs, and bumps the version to0.5.2.Verified on
npm test→ 33/33 pass (was 25)npm run lint→ cleanfm-bench doctornow printsok thermal no thermal pressureandok battery 80% (charging/AC)where it previously omitted the thermal rowfm-bench models,fm-bench legend, and a live--profile quickbenchmark run all still work end-to-end against the real/usr/bin/fmTest plan
npm testpasses locally (33 tests)npm run lintpasses locallyfm-bench doctorruns cleanly on macOS 27 and reports the thermal + battery rowsfm-bench --models system --profile quick --runs 1produces a normal report on macOS 27macos-15runner (legacy parser path)Made with Cursor