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.
b2a5fae to
a54ec4a
Compare
|
Real native Darwin GuestService2222 QA passed in an isolated cold-booted OCI guest using the current shared binary, user-launched at UID501 only. Host shared client verified Root daemon was not installed: guest noninteractive sudo is unavailable and no privileged provisioning was performed. System image capability remained false. These results prove native transport/user-level exec/files/cancellation and shutdown admission, not normal API system-agent installation/readiness or successful graceful root shutdown. Those remain gates. Original guest/API/storage untouched; isolated QA VM ended stopped. |
a1ed358 to
243ce9a
Compare
|
Simplification update at 243ce9a: common command setup/process-group cancellation and bounded wait/drain/final-status handling for both TTY modes. Permanent tests cover pre-cancelled starts and failed output sends cancelling/reaping commands. Full agent/client race suites passed 3 runs; combined post-restack focused suites also passed 3 runs. Base changed to feat/macos-oci-images so the image rollback fix and bundle consolidation are inherited once rather than duplicated. Root provisioning remains undone. All PRs remain draft. This is source-level/synthetic validation, not a new live boot or production build proof. Default Codex independent review was attempted but is still blocked by authentication (HTTP401). Published atomically after checking reviewer heads with explicit per-ref force-with-lease; prior heads preserved locally. |
|
Root QA follow-up pushed as ae3685d; desktop restacked atomically with explicit leases. Manually installed shared system-role agent survived isolated normal-API cold boots. Repeated race-instrumented authenticated API tests verified UID0 exec (both TTY modes), root-owned0600 file copy round trips, and descendant cancellation. Live testing reproduced and fixed Darwin readiness using the nonexistent /bin/true; /usr/bin/true now probes successfully and normal GET persists GuestAgentReadyAt without a Linux workload marker. Fixed premature shutdown fallback after a lost Darwin RPC reply: configured grace period is retained while still requiring owned VMM exit; Linux policy is unchanged. Final normal API stop accepted the RPC and confirmed VMM exit/storage closure without forced fallback. Corrected stale opt-in test calls left after runtime simplification. Focused instances/API/agent/client tests pass race,count3; default independent autoreview remains401-blocked. Manual QA provisioning is not automatic image installation or end-to-end build/publication proof. PR remains draft. |
c336b30 to
1cae99b
Compare
1cae99b to
24fad86
Compare
24fad86 to
2df3f56
Compare
2df3f56 to
ebf6c6e
Compare
ebf6c6e to
fbfd9d2
Compare
39e247a to
f472950
Compare
dd32757 to
8c7482e
Compare
8c7482e to
9d13f55
Compare
5bb5b41 to
a8f7048
Compare
a8f7048 to
0462e06
Compare
85e8d2f to
cf64b2e
Compare
cf64b2e to
c0da4ad
Compare
a8ff002 to
7a480d4
Compare
7a480d4 to
3a0d7a5
Compare
3a0d7a5 to
77b12e8
Compare
Shared GuestService on host-CID vsock 2222, root system agent, agent readiness probe, agent-gated exec, copy and stat, and a macOS stop floor. Darwin exec runs its own bounded lifecycle in exec_lifecycle.go. Linux exec, boot markers, stop and the guest client are unchanged.
The guest display was fixed at 1280x800 at 80 ppi. Use 3024x1964 at 160 ppi, which is 1512x982 points at 2x. Changes the display only on the macOS guest path; the Linux path is untouched.

Summary
Third of six macOS guest PRs. Gives Darwin guests a system guest agent (a root LaunchDaemon serving the existing
GuestServiceon vsock 2222), and changes how macOS instances report readiness, run exec, and shut down.guest_agent: truein its platform config. Images without it behave as before.Initializinguntil the agent answers a readiness probe, thenRunning, like Linux guests. Without it,Runningstill means "VMM running".cmd/vz-shim/macos_arm64.go, in its own commit (d461bab).Existing and new flows
Readiness (macOS only; Linux paths are unchanged):
Exec, cp, stat:
Stop:
Boot admission (refactor, same checks):
startAndBootVMcallsadmitMacOSBoot, which returns a release func, instead of running the socket-path and identity checks inline.Change size
Totals from the PR: +2,038 / −93 across 49 files. Of the 2,038 added lines, 1,060 are tests (17 files) and 127 are docs (3 files). The remaining 851 are implementation lines.
Approximate meaningful implementation size: about 600 lines. These are estimates, not Git counts. Excluded: tests, docs, mechanical wiring (delete, manager, vsock and network call-site updates, about 20 lines), and moved code.
vsock_darwin.go,vsock_darwin_nocgo.go,ready_darwin.go,network_darwin.go,shutdown_darwin.go,shutdown_policy.go,main.goexec_lifecycle.go,exec.goquery.go,start.go,macos.go,guest_os.go,types.go,create.gocmd/api/api/exec.go,cp.go,guest_unsupported.go,lib/guest/client.gostop.goBehavior changes
Initializinguntil the agent answers, so it reportsRunninglater than before. This is the only change for macOS instances that declare the agent.Rollout
Merge order in the stack: #498 (merged 2026-10-19), then #499, then this PR, then #506, then #514. #503 is not needed for v0. This PR's base is
feat/macos-oci-images(#499), so it needs #499 merged or rebased ontomainfirst.Testing
go test ./lib/system/guest_agent/ -count=1 -race— ok (7.8 s)go test ./lib/guest/ -count=1— okgofmt -lon the 46 changed.gofiles — cleango build ./...,go testfor./lib/instances/,./cmd/api/..., and./cmd/vz-shim/. This checkout lacks the embedded binaries those packages need (cloud-hypervisor, the guest agent, caddy; produced bymake), so they fail at setup. Darwin builds and the cgo vz shim were not compiled. The display change has not been booted.Caveats / Not included
Review focus
lib/system/guest_agent/exec_lifecycle.go: cancellation, process-group kill, and bounded output drain.lib/instances/query.go(deriveRunningState) andmacOSRunningPhase.Stack
Each PR is one commit on the one below it.