{"record":{"id":"22c3364e236a10dc","repo":"multica-ai/multica","slug":"brew-upgrade-failed-w-22c336","errorCode":null,"errorMessage":"brew upgrade failed: %w","messagePattern":"brew upgrade failed: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/internal/daemon/daemon.go","lineNumber":4416,"sourceCode":"\t\t\td.updating.Store(false)\n\t\t\treturn serverUpdateRuntimeBusy\n\t\tcase <-ticker.C:\n\t\t}\n\t}\n}\n\n// runUpdate executes the brew-or-download upgrade against targetVersion and\n// returns the human-readable output (always populated, even on failure when\n// brew gives us a useful diagnostic). The caller is responsible for the\n// `updating` CAS guard and for reporting status back to the server / triggering\n// the restart — extracted so the server-triggered path (handleUpdate) and the\n// auto-update poller (autoUpdateLoop) share the exact same execution body.\nfunc (d *Daemon) runUpdate(targetVersion string) (string, error) {\n\tif cli.IsBrewInstall() {\n\t\td.logger.Info(\"updating CLI via Homebrew...\")\n\t\tout, err := cli.UpdateViaBrew()\n\t\tif err != nil {\n\t\t\treturn out, fmt.Errorf(\"brew upgrade failed: %w\", err)\n\t\t}\n\t\treturn out, nil\n\t}\n\td.logger.Info(\"updating CLI via direct download...\", \"target_version\", targetVersion)\n\tout, err := cli.UpdateViaDownload(targetVersion)\n\tif err != nil {\n\t\treturn out, fmt.Errorf(\"download update failed: %w\", err)\n\t}\n\treturn out, nil\n}\n\n// updateReportBackoffs defines the retry schedule for delivering CLI update\n// status back to the server. This mirrors localSkillReportBackoffs because\n// both features have the same user-visible failure mode: the daemon completed\n// work locally, but a transient report failure leaves the UI waiting until the\n// server-side request times out.\n//\n// Overridable for tests to avoid real sleeps.","sourceCodeStart":4398,"sourceCodeEnd":4434,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/internal/daemon/daemon.go#L4398-L4434","documentation":"Error \"brew upgrade failed: %w\" thrown in multica-ai/multica.","triggerScenarios":"Thrown at server/internal/daemon/daemon.go:4416 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Run 'brew upgrade multica-ai/tap/multica' manually to see the full error."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2c0912b6ec764b373d44eeea1e80f0d9f11ab417","analyzedAt":"2026-08-15T13:25:18.241Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}