CPU topology v2 phase 4: add safe CpuSelection affinity apply path#10
Conversation
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cc6b8b6cf0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| failureReason: AffinityApplyFailureReason.InvalidMask); | ||
| } | ||
|
|
||
| var cpuSetsResult = this.TryApplyCpuSets(process, selection); |
There was a problem hiding this comment.
Respect CPU Sets toggle before attempting CpuSelection apply
This path always calls TryApplyCpuSets first, so SetUseCpuSets(false) is effectively ignored for CpuSelection requests. In ProcessService, the legacy mask path explicitly gates CPU Sets with useCpuSets, but this new selection path does not, which means users who disable CPU Sets (to avoid compatibility issues) can still hit CPU-Set-specific behavior/errors. The selection apply flow should honor the same toggle and skip CPU Sets entirely when disabled.
Useful? React with 👍 / 👎.
Summary
Tests
dotnet test Tests\ThreadPilot.Core.Tests\ThreadPilot.Core.Tests.csproj --configuration Release --no-restore --filter AffinityApplyServiceTestsdotnet test Tests\ThreadPilot.Core.Tests\ThreadPilot.Core.Tests.csproj --configuration Release --no-restore --filter "AffinityApplyServiceTests|ProcessServiceSecurityTests"dotnet test "ThreadPilot_1.sln" --configuration Release --no-restore(206passed,0failed)Notes
ProcessCpuSetHandler.ApplyCpuSelectionreturns onlybool, so a genericfalsecan mean CPU Sets unavailable, access denied without detailed error, or native apply failure. More precise CPU Sets error classification is left for the next UX/error-model phase.