MacOS Implementation - #5
Open
arturovilla wants to merge 4 commits into
Open
Conversation
Are you using GNU coreutils? |
Author
Author
|
Dang sorry about that I tried to see the my Homebrew deps but it seems like I installed coreutils standalone , I attached the output as a txt maybe someone can let me know where I got these utils... |
RealEmmettS
referenced
this pull request
in QubeTX/qube-machine-report
Apr 28, 2026
…erminal walk) PR #5 partial — Windows polish from MASTER_PLAN.md. E.6 (admin RDP login history) and C.13 (batched PowerShell fallback) deferred to a future session. - C.10/C.10b: Native battery via GetSystemPowerStatus (~1ms vs ~40ms WMI), with a 5-state output model — AC Power (>=95% on AC, no charging), X% (Charging), X% (Plugged in) (gaming-laptop case where peak GPU draw exceeds the brick wattage OR firmware-limited charging like ThinkPad battery longevity), X% (Discharging) / Critical / Low / Unknown when off AC. Replaces the v3.11.x output of "100% (Discharging (High))" (legacy WMI BatteryStatus enum was confusing). - C.9: Native socket count via GetLogicalProcessorInformationEx (~3ms vs ~30ms WMI), two-call buffer-sizing pattern, walks variable-length SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX records via u32::from_le_bytes (alignment-safe). - C.8: GPU enumeration prefers the registry path (already used by --fast) in full mode too, since {4d36e968-...} Display class only enumerates hardware adapters. Added filter_software_gpus() name-based filter as belt-and-suspenders. WMI/PowerShell remain as fallbacks. Simpler than the originally-planned full DXGI EnumAdapters1 COM impl (~25 LOC vs ~100 LOC). - C.11: PowerShell 7+ detection via HKLM\SOFTWARE\Microsoft\PowerShellCore\ InstalledVersions\<GUID>\SemanticVersion. Compared as semver (u64,u64,u64) tuples to avoid the "7.9.0" > "7.10.0" string-compare bug (caught in Codex review). - C.12: Terminal parent-process walk via Toolhelp32 — recognizes Windows Terminal, WezTerm, Alacritty, VS Code, Cursor, Windsurf, Hyper, Tabby, Ghostty, Kitty, MinTTY, Claude Code, Antigravity. Cap 10 levels, intermediate hosts (conhost.exe / powershell.exe / pwsh.exe / cmd.exe / shells) are skipped to keep walking. Verified on this dev host: tr300.exe -> bash.exe -> claude.exe correctly resolves to "Claude Code". - C.14: Verified COM/WMI is already structurally absent from --fast hot path (fast mode early-returns before any COMLibrary::new()). No source change needed. - Codex review (GPT-5.5, high reasoning) caught two issues, both fixed before commit: alignment UB in the SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX walk (replaced raw cast with u32::from_le_bytes), and string-compare ordering bug in PSCore version detection (replaced with parse_semver_tuple comparing as (u64, u64, u64) tuples). winapi features: + winbase, errhandlingapi, winnt, tlhelp32, processthreadsapi, handleapi. Local gate: cargo fmt clean, cargo clippy --all-targets --workspace -D warnings clean, 14/14 integration tests pass + 15 lib tests, release build clean, --fast 7-run median 354ms (within 100ms of ~308ms v3.11 baseline, well under 1500ms CI gate). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
RealEmmettS
referenced
this pull request
in QubeTX/qube-machine-report
Apr 28, 2026
After tagging v3.13.0 (commit f34e981), bring the planning docs in sync with reality. MASTER_PLAN.md: - "Last updated" 2026-04-27 -> 2026-04-28 - "Current version" 3.11.0 -> 3.13.0 - Shipped table expanded from 2 to 7 entries (v3.11.1, v3.12.0, v3.13.0 plus the audit-fix and macos-13 drop intermediate commits) - New tag-status section documenting the cargo-dist v0.31.0 installer regression on x86_64-apple-darwin + x86_64-unknown-linux-musl that blocks all release.yml runs from producing GitHub release artifacts - "Live behavior changes" section expanded with v3.13.0 user-visible improvements (5-state battery, terminal walk recognizing Claude Code/Cursor/Windsurf/etc., PSCore detection, GPU registry-prefer) - "Pending" rewritten: drops shipped PRs, adds task numbers (#54, #56, #58) for outstanding work - "Recommended next steps" repointed to the cargo-dist fix as priority and PR #2/PR #3 as next-session targets - PR #4/PR #4b/PR #5 implementation checklists updated with shipped status and plan deviations called out: C.4 used simpler filter-WMI approach instead of full GetAdaptersAddresses linked-list walk; C.8 used registry-prefer + name-filter approach instead of full DXGI COM; C.10 extended into C.10b with 5+ states (user-requested gaming-laptop case); E.6 and C.13 deferred to task #58. - Phasing & sequencing table updated with new commit shas and status AGENTS.md: - Bump stale "Current version: 3.9.0" to "Current version: 3.13.0" Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.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.


The project looked pretty cool on twitter so I thought i would give it a go for MacOS.
Fair warning I only had today and I couldn't get some things to work:
There are some code comments but I couldn't get CPU FREQ to work since Apple stopped supporting the
sysctl -n hw.cpufrequency. Not even sure they dropped support for it but it doesn't work for Apple silicon machines,I could maybe get it with powermetrics but that requires sudo and a time interval so I chose to let it go for now.
Hypervisor Vendor name is also missing best I could do it to see if the hypervisor was enabled.
Kinda tired so if you need me to delete some comments, write some readme, or think of another implementation just lmk.
