Repository navigation
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 8f6dd1c. Configure here.
| if err != nil { | ||
| return n, &net.OpError{Op: "read", Net: "vsock", Err: err} | ||
| } | ||
| return n, err |
There was a problem hiding this comment.
Read wraps EOF as OpError
Low Severity
vmConn.Read wraps every os.File.Read failure, including bare io.EOF, in net.OpError. Standard net.Conn implementations leave io.EOF unwrapped, and gRPC/HTTP2 compare with == io.EOF for a clean close. Guest disconnects can be treated as transport errors instead of orderly EOF.
Reviewed by Cursor Bugbot for commit 8f6dd1c. Configure here.
- Persist macOS guest-agent readiness on the public read path by hydrating boot markers for macOS instances too. - Kill the command's process group on cancellation or timeout so shell descendants do not outlive the command. - Bound how long a cancelled exec waits for output to drain, so a client that stopped reading cannot hold the handler open. - Hold the fork lock across Darwin vsock accept so an accepted descriptor is not inherited by a concurrent fork before it is marked close-on-exec.
The guest agent runs commands as root, as the Linux agent does, and the host API is the only authorization boundary. Exec timeout ends the command; it does not bound a healthy output stream.
chruffins
force-pushed
the
feat/macos-guest-service
branch
from
October 9, 2026 14:46
b2a5fae to
a54ec4a
Compare
- Send the final exit code under the same bound as command output, so a client that stopped reading cannot hold the handler past a timeout. - Kill the command's process group from the context rather than only through exec.Cmd.Cancel, which is not called once the direct child has exited. - Make the drain bound a server field instead of a package variable, so tests do not mutate shared state read by handlers that outlive them.
Hydration and persistence duplicated the missing-marker checks, the serial log parse, marker assignment and the readiness probe. Extract them into one applyBootMarkers routine. Hydration keeps its scan throttling and rescan bookkeeping; persistence keeps its save and metrics.
This branch has not been deployed
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.


Stack
PR 3/6 of macOS guest integration; based on #498. Draft foundation for Darwin GuestService, readiness and networking. It does not depend on the OCI implementation in #499.
Implemented
Unimplementedfor Darwin network identity reconfiguration; no NAT/static-IP/policy parity claim.guest_agentimage declaration enables normal exec/copy vsock paths and graceful-stop attempts; existing templates remain unmanaged and can explicitly disable integration.Validation
Tests use an in-memory gRPC transport, temporary files and short-lived test commands. Shutdown policy tests stub the command: no actual host/guest shutdown, agent installation or live API deployment occurred.
Remaining draft gates
No VM images, credentials, private notes or benchmark evidence are included. The live benchmark guest and its prototype agents remain untouched.