Skip to content

Migrate Process tab manual affinity apply to CpuSelection#16

Merged
PrimeBuild-pc merged 2 commits into
mainfrom
codex/process-tab-cpuselection
May 20, 2026
Merged

Migrate Process tab manual affinity apply to CpuSelection#16
PrimeBuild-pc merged 2 commits into
mainfrom
codex/process-tab-cpuselection

Conversation

@PrimeBuild-pc
Copy link
Copy Markdown
Owner

Summary

  • add a ProcessAffinityApplyCoordinator for manual Process tab affinity applies
  • prefer CpuSelection/CPU Sets, migrate legacy bool masks when topology is available, and block unsafe >64 legacy fallback
  • wire SetAffinity, ApplyCoreMaskToProcessAsync, and QuickApplyAffinityAndPowerPlan through the coordinator
  • add regression coverage for CPU64, multi-group, migration, safe legacy fallback, and protected-process messaging

Tests

  • dotnet test "Tests/ThreadPilot.Core.Tests/ThreadPilot.Core.Tests.csproj" --configuration Release --no-restore --filter FullyQualifiedName~ProcessAffinityApplyCoordinatorTests --logger "console;verbosity=normal"
  • dotnet test "ThreadPilot_1.sln" --configuration Release --no-restore

Notes: restore/build emitted existing NU1900 vulnerability-feed warnings because NuGet vulnerability data could not be reached, plus pre-existing StyleCop warnings in LogViewerViewModel.

@codecov-commenter
Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 48.03150% with 66 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
ViewModels/ProcessViewModel.Behaviors.partial.cs 0.00% 41 Missing ⚠️
Services/ProcessAffinityApplyCoordinator.cs 70.00% 17 Missing and 7 partials ⚠️
Services/ServiceConfiguration.cs 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2c2bfc72be

ℹ️ 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".

Comment on lines +715 to +718
var result = await this.processAffinityApplyCoordinator.ApplyCoreSelectionAsync(
selectedProcess,
pendingSelection,
"Manual Process tab CPU selection");
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Avoid showing 0x0 after CPU-set affinity apply

SetAffinity now uses ApplyCoreSelectionAsync, which can return a CPU-sets success result without VerifiedMask populated, but the success branch still formats status/notification using result.VerifiedMask. On systems where CPU Sets are used, users will see a false 0x0 affinity in the success message even though the apply succeeded, which is misleading and can trigger incorrect follow-up actions.

Useful? React with 👍 / 👎.

@PrimeBuild-pc PrimeBuild-pc merged commit cbe2402 into main May 20, 2026
3 checks passed
@PrimeBuild-pc PrimeBuild-pc deleted the codex/process-tab-cpuselection branch May 20, 2026 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants