Fix persistent priority reversion after process startup#33
Merged
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
Focaccina-Ripiena37
approved these changes
Jul 11, 2026
Focaccina-Ripiena37
left a comment
There was a problem hiding this comment.
Reviewed the bounded retry lifecycle, cancellation, protected/exited-process guards, write attribution, release metadata, and automated validation.
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.
Root cause
ThreadPilot treated a completed CPU-priority write as success without verifying that the process still reported the requested priority. Processes that reset their own priority shortly after startup could therefore end at
Normalwhile Activity Log reported a successful persistent-rule apply.Fix
The persistent-rule lifecycle is now:
apply → immediate verify → delayed verification → detect revert → one retry → final verifyAutomated validation
dotnet clean ThreadPilot_1.slndotnet restore ThreadPilot_1.slndotnet build ThreadPilot_1.sln --configuration Release --no-restoreReal-world validation
A private diagnostic build was tested by the reporting user against a real process that resets priority shortly after startup. The logs confirmed initial
High, reversion toNormal, exactly one scheduled retry, successful retry verification asHigh, and a final stableHighpriority. The implementation is general and contains no RimWorld-, Unity-, or Steam-specific logic.Fixes #32