CPU topology v2 phase 7: improve affinity errors and priority guardrails#13
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: 71e2d1a708
ℹ️ 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".
| return lowered.Contains("anti-cheat") || lowered.Contains("anti cheat") || lowered.Contains("protected") | ||
| ? ProcessOperationUserMessages.AntiCheatProtectedLikely | ||
| : ProcessOperationUserMessages.AccessDenied; |
There was a problem hiding this comment.
Avoid treating generic access denial as anti-cheat protection
This branch now maps any message containing "protected" to AntiCheatProtectedLikely, but ProcessOperationUserMessages.AccessDenied itself contains the word "protected" (Services/ProcessOperationUserMessages.cs). As a result, ordinary permission failures thrown from SetProcessPriority/affinity paths are misreported as anti-cheat/protected-process cases, which gives users the wrong remediation guidance and obscures when admin elevation might actually help.
Useful? React with 👍 / 👎.
| else if (this.setLimitedInfoHandle.IsInvalid) | ||
| { | ||
| // The handle was already made previously and failed, don't bother trying again | ||
| return false; | ||
| return CpuSetApplyResult.Failed( | ||
| AffinityApplyErrorCodes.CpuSetsUnavailable, |
There was a problem hiding this comment.
Preserve access-denied classification for cached invalid CPU-set handles
When opening the CPU-set handle fails with access denied, the handler instance is cached; on the next attempt this IsInvalid path returns CpuSetsUnavailable instead of AccessDenied. In the current flow this causes later retries to be treated as "CPU sets unavailable" (triggering legacy fallback) rather than consistently surfacing the permission/protection block, so repeated attempts against the same process can produce incorrect behavior and messaging.
Useful? React with 👍 / 👎.
Improve affinity errors and priority guardrails
Centralize safe user-facing messages for process affinity, CPU Sets, protected processes, access denied cases, topology errors and priority guardrails.
No persistent rules engine, registry affinity, preset/profile migration, version or tag changes.