You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Users can install or rename the executable to a local command such as chris-code while still using the GitHub Release self-updater. The updater should treat the release payload name as an implementation detail and replace the executable path the user is actually running.
This is specifically for renamed local binaries in the cbusillo/code distribution. It is not a rebrand and should not require publishing duplicate release assets for every local command name.
Finish Line
Running chris-code update --yes from a directly managed install downloads the standard code-<target> release payload and installs it over the existing chris-code executable path, with update-check/update output naming the real local command and target path instead of hard-coding code.
Current Status
State: Implemented locally on branch fix/lab-updater-identity; awaiting review/PR.
Next action: Review the branch diff, then open a PR when ready.
Blocked by: None
Waiting for: Review/PR creation.
Last verified: 2026-05-30 with cargo test -p code-cli --bin code update, cargo test -p code-tui updates::tests::upgrade_resolution, git diff --check on touched files, and ./build-fast.sh.
Scope
In: Detect the invoked/local command name, preserve the actual executable install target, extract the existing release payload, and install it over the renamed executable path.
In: Treat /usr/local/bin as a direct self-update location only when the canonical executable target is an unmanaged binary; package-manager paths reached through symlinks remain refused.
In: Update updater copy/hints such as Run code update-check and TUI upgrade copy such as code update --yes so they use the detected command name where possible.
In: Pass an explicit command name from JS/npm wrappers when available, alongside the existing CODE_BINARY_PATH handoff, for display/diagnostics only.
In: Tests for renamed direct binaries, install-source classification, /usr/local/bin, and symlink behavior.
Out: Publishing separate release archives named after downstream/local binary names.
Out: Rebranding crate names, package names, config dirs, or the code executable default.
Out: Supporting self-update for package-manager managed installs that are currently refused, such as Homebrew/npm/cargo installs.
Out: Using sudo or privilege escalation for updates; permission failures should produce clear manual-install guidance.
Acceptance Criteria
A directly managed executable named chris-code can self-update using the standard release manifest and payload.
The updater replaces the canonical install target path and does not require the local filename to equal code.
A real unmanaged binary at /usr/local/bin/chris-code is eligible for direct self-update when permissions allow.
A symlink invocation updates the canonical executable target and keeps the symlink itself intact.
A symlink that resolves into Homebrew/npm/cargo/package-manager-owned paths is still refused.
Permission failures in /usr/local/bin do not escalate; they produce clear manual-install guidance.
update-check, update, doctor, and TUI upgrade prompts include the actual local command name and install target path where useful.
Command-name fallback order is explicit: CODE_COMMAND_NAME, then argv/current-exe basename, then install-target basename.
The npm/JS wrapper exports CODE_COMMAND_NAME to the native binary without breaking CODE_BINARY_PATH; this is diagnostic/display identity only and does not make npm-managed installs self-updateable.
Archive extraction still trusts the release manifest/payload name, not the local command name.
Objective
Users can install or rename the executable to a local command such as
chris-codewhile still using the GitHub Release self-updater. The updater should treat the release payload name as an implementation detail and replace the executable path the user is actually running.This is specifically for renamed local binaries in the
cbusillo/codedistribution. It is not a rebrand and should not require publishing duplicate release assets for every local command name.Finish Line
Running
chris-code update --yesfrom a directly managed install downloads the standardcode-<target>release payload and installs it over the existingchris-codeexecutable path, with update-check/update output naming the real local command and target path instead of hard-codingcode.Current Status
State: Implemented locally on branch
fix/lab-updater-identity; awaiting review/PR.Next action: Review the branch diff, then open a PR when ready.
Blocked by: None
Waiting for: Review/PR creation.
Last verified: 2026-05-30 with
cargo test -p code-cli --bin code update,cargo test -p code-tui updates::tests::upgrade_resolution,git diff --checkon touched files, and./build-fast.sh.Scope
/usr/local/binas a direct self-update location only when the canonical executable target is an unmanaged binary; package-manager paths reached through symlinks remain refused.Run code update-checkand TUI upgrade copy such ascode update --yesso they use the detected command name where possible.CODE_BINARY_PATHhandoff, for display/diagnostics only./usr/local/bin, and symlink behavior.codeexecutable default.sudoor privilege escalation for updates; permission failures should produce clear manual-install guidance.Acceptance Criteria
chris-codecan self-update using the standard release manifest and payload.code./usr/local/bin/chris-codeis eligible for direct self-update when permissions allow./usr/local/bindo not escalate; they produce clear manual-install guidance.update-check,update,doctor, and TUI upgrade prompts include the actual local command name and install target path where useful.CODE_COMMAND_NAME, then argv/current-exe basename, then install-target basename.CODE_COMMAND_NAMEto the native binary without breakingCODE_BINARY_PATH; this is diagnostic/display identity only and does not make npm-managed installs self-updateable.chris-code/renamed executable behavior,/usr/local/bin, symlink behavior, install-source classification, and existingcode-<target>archive extraction.Relationships
Validation
code-rs/cli/src/update.rsfor renamed binary paths, symlink canonicalization, install-source classification, and archive extraction.code-rs/tui/src/updates.rsif upgrade display text changes there../build-fast.sh.Decisions
code-<target>assets.chris-codeas install target/command identity, not release payload identity.CODE_COMMAND_NAMEas the Every Code-owned wrapper-to-native command identity variable./usr/local/binfor direct unmanaged binaries, but never usesudoor privilege escalation.Open Questions