Repository navigation
Use process-owned Power Requests for idle-sleep prevention - #5
Merged
Merged
Conversation
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.
Block now acquires an owned system/display Power Request pair synchronously, with rollback on partial activation and release on Allow, normal exit, or process termination. This replaces the periodic thread execution-state worker. Windows explicit Sleep/Hibernate remains authoritative, and the existing resume path renews Block protection.
The change also fixes autostart AccessCheck with identification-level tokens. Smoke testing explicitly defers the absent Update Orchestrator Reboot task and the autostart lifecycle when the current elevated process has no linked UAC token. Unexpected scheduler or token-query errors remain failures. The full autostart lifecycle and safe refusal were exercised separately in the interactive VM.
Validation: 42 Rust tests passed; formatting, default release build, and ordinary Clippy passed. Guest smoke recorded 18 passes, zero failures, and three documented skips. Both Clippy warnings predate this migration. Local MSVC release retries hit SDK autodetection failures; the retained Windows runtime artifact is bound to the candidate's source.
The eight requested power cases passed in an isolated Windows 11 S3 VM, including actual Start-menu sleep in Block, same-process reacquisition, protected idle/display timeouts, automatic sleep/display in Allow, and request cleanup. The VM needed a separate firmware resume repair. Physical S3/monitor behavior, Hibernate, and Modern Standby remain unvalidated. A completed independent source and evidence review found no actionable issue.
Details: VM acceptance record. No release tag is part of this integration.