Add Windows guest control and ConPTY - #431
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
c5bc68c to
0d96de5
Compare
0d96de5 to
73fd1af
Compare
73fd1af to
7cd7a6e
Compare
0c1d3e4 to
1487012
Compare
1487012 to
96a8dd9
Compare
96a8dd9 to
38cabf0
Compare
38cabf0 to
0886125
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 0886125. Configure here.
|
|
||
| cmd := exec.CommandContext(ctx, start.Command[0], start.Command[1:]...) | ||
| cmd.Env = s.buildEnv(start.Env, true) | ||
| cmd.Dir = start.Cwd |
There was a problem hiding this comment.
TTY skips session validation
Medium Severity
Unix TTY exec never calls configureExecCommand, so EXEC_SESSION_DESKTOP and unknown sessions are not rejected on the PTY path. Non-TTY Unix correctly validates via configureExecCommand. A desktop or invalid session with tty=true against a Linux guest therefore runs as SYSTEM instead of failing.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 0886125. Configure here.
| CreationFlags: windows.CREATE_SUSPENDED, | ||
| } | ||
| cmd.WaitDelay = 2 * time.Second | ||
| return cleanup, nil |
There was a problem hiding this comment.
Desktop missing interactive station
High Severity
Desktop sessions set a user Token and CREATE_SUSPENDED but never set SysProcAttr.Desktop to winsta0\default. From a Session-0 LocalSystem service, that leaves processes on the service window station, so UI processes do not appear on the active interactive desktop despite the documented DESKTOP session behavior.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 0886125. Configure here.


summary
Runningwhen guest-agent readiness is provenlib/system/README.mdtargeted tests
Additional terminal signal-parity work is intentionally deferred. Long-running KVM and full CI suites were not run for this review pass.
Note
High Risk
Touches guest command execution, Windows token impersonation for desktop sessions, vsock transport, and process-tree kill semantics. Bugs here can leak processes, run commands as the interactive user, or break instance readiness.
Overview
Windows guests now run the same vsock gRPC guest protocol as Linux. The agent is cross-compiled as
hypeman-guest-agent.exe, installed as theHypemanGuestAgentLocalSystem service, and listens through virtio-win VioSock.Exec gains an explicit
session(systemvsdesktop). Desktop mode impersonates the active interactive user so UI processes can appear on that desktop. Interactive sessions use ConPTY with resize; non-interactive commands use redirected handles. Windows process trees start suspended, join a kill-on-close Job Object, then resume so timeouts and RPC close terminate descendants.Windows instances no longer skip the guest agent. Readiness probes use
cmd.exe, and a successful agent probe can mark the instanceRunning. File copy/stat skip Unix ownership; network reconfigure is unimplemented; shutdown usesshutdown.exe. CI builds the Windows agent and runs a QEMU guest-control integration test against/ci/windows/image-agent.qcow2.Reviewed by Cursor Bugbot for commit 0886125. Bugbot is set up for automated code reviews on this repo. Configure here.