The cross-harness, self-improving memory layer for AI agents. Join our community: https://discord.com/invite/zdNChS2fBu
Go agent-ai-cliagent-harnessesagent-securitybrowser-extensionciclaude-codecloudcodexcursordetection-engineeringjevknowledge-basememorymobile-device-managementobservabilitysecuritysecurity-information-and-event-managementsecurity-toolstelemetrytraces
fix(endpoint): preserve running updater during reconciliation
shukieshah2ea36e700a63
diff --git a/cli/beacon/internal/endpoint/service/updater.go b/cli/beacon/internal/endpoint/service/updater.goindex ce26469d..23e52e15 100644--- a/cli/beacon/internal/endpoint/service/updater.go+++ b/cli/beacon/internal/endpoint/service/updater.go@@ -37,6 +37,9 @@ func (m UpdaterManager) Load() error {if runtime.GOOS != "darwin" {return nil}+ if status := m.Status(); status.Loaded && status.Running {+ return nil+ }path := m.PlistPath()return loadLaunchdJob("system", UpdaterLabel, path)}diff --git a/cli/beacon/internal/endpoint/service/updater_test.go b/cli/beacon/internal/endpoint/service/updater_test.goindex fa22708e..0469e7cf 100644--- a/cli/beacon/internal/endpoint/service/updater_test.go+++ b/cli/beacon/internal/endpoint/service/updater_test.go@@ -1,6 +1,7 @@package serviceimport (+ "errors""runtime""strings""testing"@@ -48,3 +49,28 @@ func TestUpdaterWritePlistNonDarwinContract(t *testing.T) {t.Error("expected error writing updater plist on non-darwin")}}++func TestUpdaterLoadDoesNotUnloadRunningUpdater(t *testing.T) {+ if runtime.GOOS != "darwin" {+ t.Skip("launchd updater load is macOS-only")+ }+ var calls []string+ oldRun := runLaunchctlCommand+ runLaunchctlCommand = func(args ...string) (string, error) {+ calls = append(calls, strings.Join(args, " "))+ if strings.Join(args, " ") == "print system/"+UpdaterLabel {+ return "state = running\npid = 123\n", nil+ }+ return "", errors.New("unexpected launchctl call")+ }+ t.Cleanup(func() {+ runLaunchctlCommand = oldRun+ })++ if err := (UpdaterManager{}).Load(); err != nil {+ t.Fatalf("Load returned error: %v", err)+ }+ if len(calls) != 1 || calls[0] != "print system/"+UpdaterLabel {+ t.Fatalf("launchctl calls = %#v, want only status print", calls)+ }+}