fix(providers): allow a separate CLI path for updates#23890

open1
main
GitHub fork: fix/provider-maintenance-path
opened17h agobyKKarl-VonRichter
View on GitHubTwo-way sync enabledPR last imported 16h ago

Problem

When Codex or Claude's Binary path points to a launcher for routing or account setup, Update now resolves installation ownership from that launcher. It can disable the update action or invoke the launcher with update, even though the underlying CLI has a supported installation. A launcher that expects session configuration can fail when invoked for maintenance.

Changes

Add an optional Maintenance binary path for Codex and Claude. Sessions keep their configured Binary path; version advisories and Update now resolve the explicitly selected CLI through the existing installation resolver. For example, a session can use ~/bin/codex-launcher while updates target ~/.local/bin/codex.

The drivers expand the maintenance path on the destination server. Existing installation ownership checks, fresh resolution, update locks and verification through the session binary remain in place. An empty override uses the session binary again; a missing explicit path yields no update action. The shared settings schema exposes the option in web/desktop Settings, and the user guide explains how to configure or clear it. Mobile uses the same server-side update execution; its account settings do not expose this advanced path.

Scope and approval

This uses CONTRIBUTING.md's focused configuration route for an established capability: choosing which installed executable the existing Codex/Claude updater maintains. It addresses launcher-backed provider updates without adding a provider, installer, update scheduler or new default behavior. The contract, two driver call sites, shared resolver, regression and user guide all support that one option. Searches for existing maintenance-path and launcher-update reports found no matching open PR or issue.

Evidence

A disposable fixture used a runtime wrapper that rejects update but forwards --version to a native CLI. This is fixture execution on macOS, not a live provider upgrade:

text
1Default updater: runtime-wrapper -> exit 9
2Explicit updater: native-package-tool update
3native updater executed
4Runtime executable: runtime-wrapper --version -> 2.0.0
5Missing override update action: null
6Blank override updater: runtime-wrapper

The regression asserts the maintenance executable/arguments independently from the runtime wrapper, refusal of a missing override, and fallback when it is cleared. The original regression failed before the resolver change because it selected the wrapper instead of the native executable.

The shared settings form was checked in headless Chromium with synthetic launcher/native paths. The before capture uses upstream 11adcb0e; the after capture uses this patch. Both provider overrides could be entered and cleared while their Binary paths stayed on the launchers. These are component fixtures using the real form and stylesheet, not full-app or packaged-desktop captures. The fixture and reproduction notes are attached separately from the source patch.

Before

Before: Codex and Claude settings have a runtime binary path only

After

After: Codex and Claude can maintain their native CLIs while keeping launcher paths

Tests

On head f80a5b3c6b002f906d030d50816ccf4aafa3ef1c, rebased onto upstream 11adcb0e25a04785f70d01c3f2a858889683007e:

  • vp run check:changed 11adcb0e25a04785f70d01c3f2a858889683007e passed formatting, lint, Knip, generated GraphQL checks, type checks for 29 affected packages and 88 tests in three files.
  • The disposable resolver/executable fixture above passed; it updated only its temporary native CLI state and left the configured runtime wrapper in use.
  • A temporary browser fixture passed on both revisions; the patched revision verified entry/clearing for both maintenance paths with unchanged session launcher paths. The fixture is attached with the screenshots, not committed.
  • Full-app settings navigation, native Windows/Linux execution and a packaged desktop build were not verified. The new shell-fixture regression uses the existing Windows skip boundary.

Model: GPT-6.1-sol. Harness: Codex, running in T3 Code.

Checks

All checks passed

Added 1 commit

  • fix(providers): update underlying CLIs behind runtime launchersf80a5b3
Synced from GitHub

Approvability

Verdict: Needs Human Approval

Macroscope's review found this PR requires human approval — Adds an optional maintenance executable for Claude and Codex, changing production update resolution while preserving existing defaults and session launch paths. The capability spans shared provider-core and provider settings/driver code maintained by other contributors, so it warrants human review.

You can add or adjust custom eligibility rules. Learn more.

Synced from GitHub

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
📥 Commits

Reviewing files that changed from the base of the PR and between 52bb5c8c4e0908e4ef10428c12258be55b964f39 and f80a5b3c6b002f906d030d50816ccf4aafa3ef1c.

📒 Files selected for processing: 6
  • apps/server/src/provider/Drivers/ClaudeDriver.ts
  • apps/server/src/provider/Drivers/CodexDriver.ts
  • docs/user/install.md
  • packages/contracts/src/settings.ts
  • packages/provider-core/src/server/maintenanceResolver.test.ts
  • packages/provider-core/src/server/maintenanceResolver.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

📝 Walkthrough

Codex and Claude settings now support an optional maintenance binary path. Their drivers pass it to the maintenance resolver, which prefers a non-empty maintenance path over the session binary path.

Changes: Maintenance binary selection

Layer / File(s)Summary
Add the setting and resolver selection
packages/contracts/src/settings.ts, packages/provider-core/src/server/maintenanceResolver.ts
Codex and Claude settings include an optional maintenance binary path. The resolver uses its non-empty value before falling back to the existing binary path.
Connect provider drivers and document path behavior
apps/server/src/provider/Drivers/ClaudeDriver.ts, apps/server/src/provider/Drivers/CodexDriver.ts, packages/provider-core/src/server/maintenanceResolver.test.ts, docs/user/install.md
Both drivers pass the configured path to the resolver. The test checks native-path selection and fallback behavior. Installation guidance describes the setting and its effect on updates.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~12 minutes

Change: Feature

Possibly related issues

  • Issue 22810: The maintenance path can let users select a native Claude installation for updates. This does not add Chocolatey shim detection or the issue’s other requested handling.

Suggested reviewers: juliusmarminge, maria-rcks

Merge Risk: ⚪ Minimal · up to f80a5

No actionable merge-blocking risk was found in the reviewed change.

Pre-merge checks: Passed 4
Check nameStatusExplanation
Title checkPassedThe title "fix(providers): allow a separate CLI path for updates" matches the main change: an optional maintenance binary path for Codex and Claude that lets updates target a CLI different from the se…
Description checkPassedThe description follows the template well. It has Problem, Changes, Scope and approval, Evidence, and Tests sections. The Problem section explains the launcher-related update failure. The Changes sect…
Linked Issues checkPassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes checkPassedCheck skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "fix(providers): allow a separate CLI path for updates" matches the main change: an optional maintenance binary path for Codex and Claude that lets updates target a CLI different from the session's launcher-based binary path. It is a conventional commit title in plain language, and it is specific enough for a teammate scanning history.

Full details: Description check

Explanation

The description follows the template well. It has Problem, Changes, Scope and approval, Evidence, and Tests sections. The Problem section explains the launcher-related update failure. The Changes section describes the new maintenance binary path option and where it applies. The Scope section cites the focused configuration route in CONTRIBUTING.md and explains why the change stays within an established capability. Verification lists the commands, the disposable macOS resolver fixture, and the browser fixture. It also states what was not verified, including full-app settings navigation, native Windows and Linux execution, and a packaged desktop build. It names the model and harness as the template requests. The template asks for a linked triaged issue or maintainer-approved discussion for scope. The author cites a focused-configuration exemption and says no matching issue exists, which the template allows, but the reviewer should confirm that the exemption applies.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.