Skip to content

fix(update): support Homebrew installs and preserve stable LaunchAgent paths - #141011

Merged
steipete merged 7 commits into
openclaw:mainfrom
maxsxu:max/homebrew-support
Sep 18, 2026
Merged

steipete merged 7 commits into
openclaw:mainfrom
maxsxu:max/homebrew-support

Conversation

@maxsxu

@maxsxu maxsxu commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Resolves two related issues affecting OpenClaw installations managed by Homebrew (brew install openclaw-cli):

  1. Unhelpful Update Failure: Running openclaw update on a Homebrew-managed installation fails with:

    Update refused: package manager owner is unknown; no changes were made. Run this OpenClaw install through its active npm, pnpm, or Bun global shim, or reinstall it with that package manager, then retry.
    

    This misleads users into thinking their installation is broken or needs to be reinstalled via npm/pnpm/bun, rather than explaining that Homebrew manages the package lifecycle.

  2. LaunchAgent Service Breakdown on Upgrade: When openclaw gateway install sets up the macOS LaunchAgent (~/Library/LaunchAgents/ai.openclaw.gateway.plist), resolveCliEntrypointPathForService() resolves symlinks to physical realpaths. For Homebrew, this hardcodes the versioned Cellar path (e.g. /opt/homebrew/Cellar/openclaw-cli/2026.7.1/...). When Homebrew subsequently upgrades the formula, the old Cellar version directory is deleted, causing the LaunchAgent service to fail on start/restart with ENOENT, while leaving orphaned gateway processes crashing on lazy-loaded modules and holding SQLite locks.

Why This Change Was Made

  1. In src/infra/brew.ts and src/cli/update-cli/shared.ts, we recognize Homebrew formula package roots (/Cellar/openclaw-cli/ and /opt/openclaw-cli/) without altering the internal GlobalInstallManager union or SQLite state schema. When openclaw update runs against a Homebrew installation, it now provides clear, actionable instructions directing the user to run brew upgrade openclaw-cli followed by openclaw gateway restart. Crucially, detection is scoped strictly to the openclaw-cli formula layout to preserve global npm packages under HOMEBREW_PREFIX (such as /opt/homebrew/lib/node_modules/openclaw).
  2. In src/daemon/program-args.ts, the shared Homebrew resolver rewrites version-pinned /Cellar/openclaw-cli/<version>/... entrypoints to the unversioned, stable Homebrew opt symlink (/<brew-prefix>/opt/openclaw-cli/libexec/...). Because Homebrew atomically updates this symlink on every upgrade, the service plist definition remains permanently valid across future formula upgrades.

User Impact

  • Clearer update workflow: Operators using Homebrew receive explicit guidance to use brew upgrade openclaw-cli instead of an obscure "package manager unknown" failure. Global npm installs under HOMEBREW_PREFIX continue to use npm.
  • Resilient daemon services: macOS LaunchAgent (and systemd) service definitions survive Homebrew formula upgrades without becoming invalid or requiring manual service reinstallation.

Evidence

Maintainer follow-up: a3caace. All six commits by @maxsxu were rebased with authorship preserved. This includes Max's corrected assertion (f44bd5c8e, rebased as 5dd4152246d) and typed skipped outcome (aaf669bea, rebased as 3ec47e80732).

Owner and regression coverage

The shared resolver in src/infra/brew.ts validates the formula layout directly beneath a standard Homebrew prefix, HOMEBREW_PREFIX, or the prefix returned by the existing executable resolver's brew --prefix. The separate update detector and daemon-local matching policy are removed. Service argument construction applies the mapping once for both Gateway and node services; install, restart repair, and candidate handoff consume that owner.

The added service regression failed on the previous code for two unrelated/nested Cellar paths and passes with the repair. Tests cover standard and custom prefixes, a fake brew on PATH, failed prefix discovery, and unchanged npm, pnpm, Bun, Windows, and Git-checkout path shapes. Existing-profile coverage proves the contributor's typed outcome already records origin.nextAction in history, update status --json, and the bounded 1,500-character report. Fresh skipped profiles remain free of a newly created database.

Validation on this head

  • Focused suites through node scripts/run-vitest.mjs: 12 files, 507 tests passed across update/Homebrew helpers, program arguments, launchd, service install/reinstall, restart repair, candidate service commands, and the install-plan owner.
  • pnpm check:changed: passed, including production/test typechecking, core lint, and repository guards. Two existing max-lines warnings remain in untouched src/cron/service/timer.test.ts and src/infra/sqlite-worker-broker.ts.
  • pnpm build: passed (full build, including declarations and Control UI).
  • git diff --check: passed.
  • Fresh committed-branch Codex review with --mode branch --base origin/main --max-priority P1: scoped-clean, no actionable P0/P1 findings.

Built CLI boundary proof

Used this branch's built CLI in a temporary formula layout, with HOMEBREW_PREFIX set to the fixture prefix, an isolated OPENCLAW_STATE_DIR, and a free port. A simulated OS-account home and fake launchctl kept service installation inside the fixture; no host Gateway was started or changed.

openclaw update --json --yes
  status: skipped
  reason: unmanaged-package-install
  run.origin.nextAction: brew upgrade openclaw-cli; openclaw gateway restart

openclaw update status --json
  lastRun.runId matches the update run
  lastRun.origin.nextAction retains both commands

openclaw gateway install --json --force --runtime-path <node> --port <free-port>
  ok: true
  ProgramArguments includes:
    <temporary-prefix>/opt/openclaw-cli/libexec/lib/node_modules/openclaw/dist/index.js
  ProgramArguments contains no old openclaw-cli Cellar path

After retiring the simulated 2026.9.4 keg and retargeting opt to 2026.9.5:
  the saved stable entrypoint still executes --version successfully

This is a simulated package/service boundary proof. A real brew upgrade cycle and real native-service restart were not exercised. Existing published updaters retain their installed behavior; the first Homebrew upgrade still uses Homebrew directly.

Executor decision and change size

Automatic brew upgrade openclaw-cli execution is deferred. The existing runPackageInstallUpdate / runGlobalPackageUpdateSteps seam requires private staging, candidate validation before activation, and a retained PackageUpdateTransaction for rollback and completion. Running Brew in place would bypass those contracts. Formula metadata, staged admission, keg/link activation and rollback, and candidate handoff are estimated at 180–300 production lines, beyond the approximately 60-line executor allowance; that estimate is not an implemented measurement.

Final diff: production +46/−1 (net +45), tests +212/−0, docs +20/−0. The additional 21 production lines beyond the initial 24-line target supply prefix validation and bounded custom-prefix discovery while removing duplicate matching policy. No options, schema, dependency, suppression, or baseline changes.

ClawSweeper follow-up

The exact-head review (revision 10, review comment) reports no correctness findings. Its remaining “Add data-model compatibility proof” checklist item is skipped as inapplicable: this diff changes no SQLite schema, migration, manager union, or serialized record shape. Homebrew admission reuses the existing UpdatePreMutationError, unmanaged-package-install reason, and origin.nextAction field. The existing-profile regression covers persisted skipped history, status JSON, and report guidance; the fresh-profile case verifies no database is created. The review's own technical analysis confirms the prior data-model warning is unsupported by the diff.

Exact-head CI: run 35337287646, green with zero pending checks at a3caace6b037dfa1404a2de0f7b8f7d6e7f6607b. No CI rerun was requested.

@clawsweeper

clawsweeper Bot commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime cli CLI command changes size: S labels Sep 7, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 7, 2026
@clawsweeper

clawsweeper Bot commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 18, 2026, 7:06 AM ET / 11:06 UTC (Revision 10).

ClawSweeper review

What this changes

The PR gives Homebrew installations appropriate update guidance and generates stable service paths that survive formula version changes.

Merge readiness

⛔ Blocked before merge - 1 item remains

This PR remains useful: current main and v2026.9.4 lack the Homebrew-specific repair. Earlier findings are resolved, and the previous data-model migration warning is unsupported by the actual diff. No blocking correctness defect was identified.

Priority: P2
Reviewed head: a3caace6b037dfa1404a2de0f7b8f7d6e7f6607b

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused repair with resolved earlier findings, useful CLI evidence, and retained native-service proof.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (terminal): Retaining the prior completed review’s accepted macOS restart/health evidence after old-keg removal, supplemented by this head’s built-CLI trace for skipped output, persisted guidance, and stable service arguments. The current fixture uses fake launchctl; its post-retirement version output proves path survival only, not a new native-service run.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (terminal): Retaining the prior completed review’s accepted macOS restart/health evidence after old-keg removal, supplemented by this head’s built-CLI trace for skipped output, persisted guidance, and stable service arguments. The current fixture uses fake launchctl; its post-retirement version output proves path survival only, not a new native-service run.
Evidence reviewed 10 items Verified change ownership: The test merge has the pinned base followed by the exact PR head as its raw parents. Its delta contains precisely the eight introduced paths; unrelated endpoint drift is not attributed to this PR.
One formula-path owner: The resolver recognizes openclaw-cli formula layouts beneath validated Homebrew prefixes. Both update admission and packaged service argument construction consume it; ordinary npm, pnpm, Bun, source, and Windows paths retain their existing handling.
Previous findings resolved: Homebrew admission throws the existing UpdatePreMutationError with the existing unmanaged-package-install reason. Tests are registered outside other callbacks and cover successful skipped output, existing history, status JSON, report guidance, and no new database for fresh profiles. No SQLite schema, manager union, or serialized record shape changes.
Findings None None.
Security None None.

How this fits together

The update CLI identifies the installation’s package manager before changing files. Gateway and node service installation generate the commands that operating-system services execute on startup.

flowchart TD
  A[Installed OpenClaw path] --> B[Homebrew formula recognition]
  B --> C[Update admission]
  C --> D[Skipped result and Brew guidance]
  B --> E[Service command generation]
  E --> F[Stable opt entrypoint]
  F --> G[Gateway or node service]
Loading

Before merge

  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.
Agent review details

Security

None.

PR surface

Source +45, Tests +212, Docs +20. Total +277 across 8 files.

View PR surface stats
Area Files Added Removed Net
Source 3 46 1 +45
Tests 4 212 0 +212
Docs 1 20 0 +20
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 8 278 1 +277

Review metrics

Metric Value Why it matters
Production versus regression coverage Production +46/−1; tests +212/−0 The production growth has an explicit justification: shared prefix validation and bounded custom-prefix discovery.

Stored data model

Persistent data-model change detected: migration/backfill/repair: src/cli/update-cli/shared.ts. Confirm migration or upgrade compatibility proof before merge.

Technical review

Best possible solution:

Keep Homebrew responsible for package replacement while one shared resolver supplies stable service paths and actionable skipped-update guidance.

Do we have a high-confidence way to reproduce the issue?

Yes, from source: current main can retain a versioned Homebrew entrypoint in service arguments, which becomes invalid when that keg is removed. No current-main runtime reproduction was executed here.

Is this the best way to solve the issue?

Yes. The patch extends the existing update-admission and service-command owners without introducing another package executor or changing stored schema contracts.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 2db54d773ea7.

Labels

Label justifications:

  • P2: This is a bounded repair to Homebrew update guidance and service entrypoint survival.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): Retaining the prior completed review’s accepted macOS restart/health evidence after old-keg removal, supplemented by this head’s built-CLI trace for skipped output, persisted guidance, and stable service arguments. The current fixture uses fake launchctl; its post-retirement version output proves path survival only, not a new native-service run.
  • proof: sufficient: Contributor real behavior proof is sufficient. Retaining the prior completed review’s accepted macOS restart/health evidence after old-keg removal, supplemented by this head’s built-CLI trace for skipped output, persisted guidance, and stable service arguments. The current fixture uses fake launchctl; its post-retirement version output proves path survival only, not a new native-service run.

Evidence

What I checked:

  • Verified change ownership: The test merge has the pinned base followed by the exact PR head as its raw parents. Its delta contains precisely the eight introduced paths; unrelated endpoint drift is not attributed to this PR. (4eef3e4565dd)
  • One formula-path owner: The resolver recognizes openclaw-cli formula layouts beneath validated Homebrew prefixes. Both update admission and packaged service argument construction consume it; ordinary npm, pnpm, Bun, source, and Windows paths retain their existing handling. (src/infra/brew.ts:85, a3caace6b037)
  • Previous findings resolved: Homebrew admission throws the existing UpdatePreMutationError with the existing unmanaged-package-install reason. Tests are registered outside other callbacks and cover successful skipped output, existing history, status JSON, report guidance, and no new database for fresh profiles. No SQLite schema, manager union, or serialized record shape changes. (src/cli/update-cli/update-command-install-layout.test.ts:188, a3caace6b037)
  • Current main still needs the repair: Fetched main lacks the formula resolver and still inserts the selected CLI entrypoint directly into service arguments. Existing symlink preference cannot synthesize the Homebrew opt alias from a versioned Cellar invocation. (src/daemon/program-args.ts:216, 2db54d773ea7)
  • Latest supplied release comparison: The v2026.9.4 source also writes the selected entrypoint directly without Homebrew normalization. This service repair is not already shipped in that release. (src/daemon/program-args.ts, 3a9d69db306c)
  • Current-head production CLI evidence: The supplied complete PR body, sourceRevision c3019b2671192b97762d4d5a93dbc12c6165ca32d79d24c61211864578f28cd3, records built-CLI skipped output and retained status guidance, generated stable service arguments, and execution through the saved entrypoint after simulated keg retirement. It explicitly identifies fake launchctl and simulated package replacement; the version command proves entrypoint survival, not native-service health. (a3caace6b037)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • odysseus0: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • fuller-stack-dev: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (9 earlier review cycles; latest 8 shown)
  • reviewed 2026-09-07T08:48:06.778Z sha 7da7b6150c68f4b0ff76377e6117d0b06e778ddc :: needs real behavior proof before merge. :: [P1] Restrict Homebrew detection to the owning formula | [P2] Register the Homebrew test outside the existing test callback
  • reviewed 2026-09-07T09:06:23.056Z sha ca0940deea105c261d7c83f7cfc1faf6d4262f3c :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-07T09:31:21.639Z sha 655a7976bd04da7d4d4db11fa00a9f9513a40eb1 :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-07T12:08:39.412Z sha 6c3c8e29cf3ed5120604f544cbca2ba50287b52c :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-07T12:41:26.535Z sha 9de0f5ad515ff294e1d55caadb7427fc60ae1d4e :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-07T13:17:47.963Z sha 9de0f5ad515ff294e1d55caadb7427fc60ae1d4e :: blocked before merge. :: none
  • reviewed 2026-09-18T09:45:30.731Z sha f44bd5c8ebdeca465a5e2e0b9f9d94dbc5631454 :: blocked before merge. :: [P2] [P2] Preserve the typed skipped outcome for Homebrew installs
  • reviewed 2026-09-18T10:12:34.094Z sha aaf669bea6df49ddbb184ebc7b51549955c0cc8c :: blocked before merge. :: none

@maxsxu

maxsxu commented Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Sep 7, 2026
@maxsxu
maxsxu force-pushed the max/homebrew-support branch from ca0940d to 655a797 Compare September 7, 2026 09:24
@maxsxu

maxsxu commented Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@maxsxu

maxsxu commented Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 7, 2026
@fuller-stack-dev fuller-stack-dev self-assigned this Sep 14, 2026
@maxsxu
maxsxu force-pushed the max/homebrew-support branch from 9de0f5a to e43ef75 Compare September 18, 2026 08:49
@maxsxu

maxsxu commented Sep 18, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@maxsxu

maxsxu commented Sep 18, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper clawsweeper Bot added the status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. label Sep 18, 2026
@maxsxu

maxsxu commented Sep 18, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 18, 2026
maxsxu and others added 7 commits September 18, 2026 03:17
Use UpdatePreMutationError with unmanaged-package-install reason for Homebrew
install roots to ensure skipped update outcome reporting and clean exit.
Reuse Homebrew discovery for formula-prefix validation and map managed service entrypoints once to the stable opt path. Preserve npm, pnpm, Bun, Windows and source-checkout paths. Prove skipped guidance reaches existing update history, status JSON and the bounded report without creating state for fresh profiles.

Follow-up to openclaw#141011. Preserve all six contributor commits, including the typed skipped outcome and corrected assertion. Homebrew execution remains deferred because the package executor requires staged validation and retained rollback ownership.

Co-authored-by: Max Xu <[email protected]>
@steipete
steipete force-pushed the max/homebrew-support branch from aaf669b to a3caace Compare September 18, 2026 10:57
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation size: M and removed size: S labels Sep 18, 2026
@steipete
steipete merged commit 8db38db into openclaw:main Sep 18, 2026
231 checks passed
@steipete

Copy link
Copy Markdown
Contributor

Merged via squash.

@maxsxu
maxsxu deleted the max/homebrew-support branch September 18, 2026 12:25
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 19, 2026
…t paths (openclaw#141011)

Homebrew-managed installations now return the existing typed skipped-update outcome with guidance to run brew upgrade openclaw-cli and then openclaw gateway restart. Existing update history, status JSON, and reports retain that guidance without changing their data model.

A shared formula-path resolver validates the Homebrew prefix and maps versioned Cellar entrypoints to the stable opt path used by Gateway and node services. Homebrew keeps ownership of package replacement, and ordinary npm, pnpm, Bun, Windows, and source paths retain their existing behavior. Thanks to @maxsxu for the Homebrew repair.

Validation: 507 focused tests, changed-file checks, full build, scoped-clean Codex review, and green exact-head CI run 35337287646. The built-CLI fixture verified persisted guidance and entrypoint survival after simulated keg retirement; it did not run a real Homebrew upgrade or native-service restart.
Co-authored-by: Peter Steinberger <[email protected]>
Co-authored-by: Max Xu <[email protected]>
RomneyDa added a commit that referenced this pull request Sep 21, 2026
Backport the Homebrew updater ownership and stable opt-path repair from upstream PR #141011 / commit 8db38db.

Co-authored-by: Max Xu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes docs Improvements or additions to documentation gateway Gateway runtime P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants