fix(detection): add sysctl hw.ncpu fallback for macOS in detection.sh - #5564
Open
vaibhavsrv wants to merge 1 commit into
Open
vaibhavsrv wants to merge 1 commit into
vaibhavsrv wants to merge 1 commit into
Conversation
vaibhavsrv
force-pushed
the
fix/detection-macos-hw-ncpu-fallback
branch
from
September 17, 2026 04:47
f442622 to
84f5c77
Compare
This was referenced Sep 17, 2026
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.
Why this matters
In
ods/installers/lib/detection.sh,get_host_logical_cpus()only queriednprocand/proc/cpuinfobefore falling back to1. On macOS and BSD systems where neither utility exists by default, core count was under-reported as 1.Add
sysctl -n hw.logicalcpuandsysctl -n hw.ncpufallbacks to accurately identify host logical cores on macOS.Validation
nprocfell back to hardcoded 1 core.test_detection_darwin_cpu_cores.pysourcesdetection.shand verifies positive integer core count.Overlap check
Searched live open/closed PRs by
detection.sh. #5136 normalizes BSD paths; this complements it by improving CPU core discovery.Risk / AI disclosure
AI-assisted investigation, implementation and CLI regressions. This strengthens platform core discovery. Independent review remains a gate.
Follow-up integration evidence
Composed with #5136 at 5136 without conflicts. Hardware detection checks remain intact.
Backlog composition was local-only (production/test diffs, excluding workflow/Makefile wiring); it is not an upstream merge or independent human approval. Declared live-review gates remain open.