Add UI executor to bridge WinRM commands to the interactive desktop session#912
Add UI executor to bridge WinRM commands to the interactive desktop session#912elizashurov wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a UI agent system to execute commands in interactive Windows sessions, featuring a PowerShell agent and a Ruby UIExecutor for management. The integration allows for UI-interactive commands during tests and client setup. Feedback was provided to enhance the PowerShell agent's reliability by ensuring command scripts are deleted regardless of result-writing success to prevent re-execution.
f830cbe to
5db9887
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces a UI agent mechanism to bridge WinRM (Session 0) to the interactive desktop (Session 1) on Windows clients. It includes a PowerShell agent (agent.ps1) that executes commands from a filesystem queue and a Ruby UIExecutor class to manage deployment, command submission, and result polling. Integration is added to the test engine and client setup manager to support a new guest_ui_run command type. I have no feedback to provide.
There was a problem hiding this comment.
Pull request overview
Adds a “UI executor” path to run PowerShell commands in the interactive Windows desktop session (instead of WinRM Session 0) to support UI-dependent HLK workflows.
Changes:
- Extend
CommandInfowithguest_ui_runto represent interactive-session guest commands. - Update client post-start and test command runners to execute
guest_ui_runvia the new executor. - Add
UIExecutor(Ruby) +agent.ps1(PowerShell) implementing a scheduled-task-based interactive-session agent and filesystem queue protocol.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| lib/setupmanagers/hckclient.rb | Runs post-start UI commands via UIExecutor when guest_ui_run is present. |
| lib/models/command_info.rb | Adds guest_ui_run field to command model. |
| lib/engines/hcktest/tests.rb | Adds UI-command execution during test command sequences, caching executors per client. |
| lib/auxiliary/ui_agent/ui_executor.rb | New Ruby executor that deploys/controls interactive-session agent and queues commands/results. |
| lib/auxiliary/ui_agent/agent.ps1 | New PowerShell agent that executes queued scripts in the interactive session and writes JSON results. |
| lib/all.rb | Autoloads UIExecutor. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
5db9887 to
c286b1e
Compare
c286b1e to
440312b
Compare
…ession WinRM commands run in Session 0 which cannot interact with the UI. This commit adds a PowerShell agent and Ruby executor that bridge WinRM to the interactive desktop session via a scheduled task with Interactive logon type and a filesystem-based command queue. Enables running UI-dependent HLK tests that were previously rejected because they required interactive session access. Signed-off-by: Elizabeth Ashurov <eashurov@redhat.com>
440312b to
9ff1f7a
Compare

WinRM commands run in Session 0 which cannot interact with the UI. This commit adds a PowerShell agent and Ruby executor that bridge WinRM to the interactive desktop session via a scheduled task with Interactive logon type and a filesystem-based command queue.
Enables running UI-dependent HLK tests that were previously rejected because they required interactive session access.