Skip to content

fix: wire DockerSocket config into build manager#121

Merged
rgarcia merged 1 commit intocodex/mac-standby-supportfrom
fix/docker-socket-and-vm-keepalive
Mar 3, 2026
Merged

fix: wire DockerSocket config into build manager#121
rgarcia merged 1 commit intocodex/mac-standby-supportfrom
fix/docker-socket-and-vm-keepalive

Conversation

@rgarcia
Copy link
Contributor

@rgarcia rgarcia commented Mar 2, 2026

Summary

cfg.Build.DockerSocket was defined in the app config struct and parsed from config.yaml, but never passed through to builds.Config in lib/providers/providers.go. This meant the docker_socket value (e.g. Colima's ~/.colima/default/docker.sock) was silently ignored and the build manager always fell back to the hardcoded /var/run/docker.sock, breaking make dev-darwin on machines using Colima or other non-default Docker socket paths.

Change

One-line fix in lib/providers/providers.go — adds DockerSocket: cfg.Build.DockerSocket to the builds.Config initialization.

Made with Cursor


Note

Low Risk
Low risk config plumbing change: it only adds a missing field mapping so the build manager can use a non-default Docker socket path; no behavioral changes elsewhere unless Build.DockerSocket is set.

Overview
Wires cfg.Build.DockerSocket through ProvideBuildManager into builds.Config, so the build system can use a configured Docker socket path instead of implicitly relying on the default socket.

Written by Cursor Bugbot for commit 848d7e4. This will update automatically on new commits. Configure here.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix prepared a fix for the issue found in the latest run.

  • ✅ Fixed: Agent signal forwarder handles only one signal
    • Changed the guest-agent signal forwarder to continuously range over the signal channel so all shutdown signals are forwarded instead of only the first.

Create PR

Or push these changes by commenting:

@cursor push d964c3fb27
Preview (d964c3fb27)
diff --git a/lib/system/init/mode_exec.go b/lib/system/init/mode_exec.go
--- a/lib/system/init/mode_exec.go
+++ b/lib/system/init/mode_exec.go
@@ -152,8 +152,9 @@
 		agentSigCh := make(chan os.Signal, 1)
 		signal.Notify(agentSigCh, syscall.SIGTERM, syscall.SIGHUP, syscall.SIGQUIT, syscall.SIGINT)
 		go func() {
-			sig := <-agentSigCh
-			agentCmd.Process.Signal(sig)
+			for sig := range agentSigCh {
+				agentCmd.Process.Signal(sig)
+			}
 		}()
 		agentCmd.Wait()
 		signal.Stop(agentSigCh)

cfg.Build.DockerSocket was parsed from config.yaml but never passed to
builds.Config, so the docker_socket setting was silently ignored and the
build manager always fell back to /var/run/docker.sock.
@rgarcia rgarcia force-pushed the fix/docker-socket-and-vm-keepalive branch from 5ef5f14 to 848d7e4 Compare March 3, 2026 00:16
@rgarcia rgarcia changed the title fix: wire DockerSocket config and keep VM alive after entrypoint exits fix: wire DockerSocket config into build manager Mar 3, 2026
@rgarcia rgarcia merged commit d481c16 into codex/mac-standby-support Mar 3, 2026
6 checks passed
@rgarcia rgarcia deleted the fix/docker-socket-and-vm-keepalive branch March 3, 2026 00:21
sjmiller609 added a commit that referenced this pull request Mar 3, 2026
* Describe implementing vz standby

* Fix VZ standby review issues

* Increase CI test timeout and fix standby test nil deref

* Add VZ fork preparation and running-fork integration test

* Generalize vsock socket naming and add VZ standby fork integration

* Update readme

* Delete redundant test

* fix: wire DockerSocket config and keep VM alive after entrypoint exits

Two fixes for macOS development:

1. Wire cfg.Build.DockerSocket into builds.Config so the config file
   value (e.g. Colima socket path) is actually used instead of always
   falling back to /var/run/docker.sock.

2. Restore pre-PR#99 behavior of keeping the VM alive after the
   entrypoint exits by waiting on the guest-agent. PR#99 changed init
   to immediately power off the VM when the entrypoint exits, which
   breaks images like alpine:latest whose CMD is /bin/sh — the shell
   gets no stdin and exits instantly, killing the VM before anyone can
   `hm exec` into it. The guest-agent keeps the VM alive and accessible
   until an explicit stop/delete.

* Revert "fix: wire DockerSocket config and keep VM alive after entrypoint exits"

This reverts commit 37272ca.

* fix: wire DockerSocket config into build manager (#121)

cfg.Build.DockerSocket was parsed from config.yaml but never passed to
builds.Config, so the docker_socket setting was silently ignored and the
build manager always fell back to /var/run/docker.sock.

---------

Co-authored-by: Rafael Garcia <raf@kernel.sh>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants