Respect provider installation ownership when updating - #461
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When provider CLIs were managed by mise, Tcode still offered
npm install -gor the provider’s self-updater. Resolve the selected executable’s installation owner before looking for updates, and use that owner’s package, registry/channel, version constraints, and execution context. Local Claude, Codex, Pi, and OpenCode installations now all resolve to their actual mise tool keys.The services version-check module owns installation discovery and the structured update plan. It verifies manager metadata and executable/package identity for mise, Homebrew, JavaScript global package managers, Volta, supported system package managers, and known native installations. Unknown provenance and unsupported activation schemes remain manual; privileged commands require a terminal. Not every recognized manager has a reliable latest-version query, and those cases do not fall back to npm’s version feed.
Runtime retains the displayed plan, revalidates it before execution, rejects stale checks after configuration changes or update starts, and refreshes provider status after an update. Built-in update actions no longer appear on custom profiles that may launch another installation. The UI displays a compact command and copies its full execution context; both locales and the visual contract are updated. Protocol additions accept older serialized messages.
Regression coverage replaces the retired path-substring/source-guessing contract with ownership fixtures: mise aliases and shims, nested runtime installations, actual package manifests and Windows shims, package-manager roots and registries, pins/holds, native update policy, and unverified wrappers. Runtime tests protect stale-result invalidation, and literal older protocol input protects compatibility. Obsolete process/UI forwarding helpers are removed with their callers.
Validation performed on this commit’s contents:
cargo fmt --all --checkcargo clippy --workspace --all-targets --locked -- -D warningscargo build --workspace --lockedRUST_TEST_THREADS=1 cargo test --workspace --locked— 1,249 passed, 6 existing ignoredcargo test -p tcode-services --locked version_check::provider_updates— 20 passedcargo macheteRUSTFLAGS='-D warnings'mise upgrade --yes -- <tool>command. No provider was upgraded.git diff --checkA default-parallel workspace run hit the existing remote handshake watchdog test (
upgrade_stall_uses_the_remaining_handshake_budget); its isolated rerun and the final serial workspace run passed. The macOS build emitted the existing linker unwind-table warning. The local Android check could not start because no NDK is installed; The final-commit CI run covers Android, Windows, and Linux successfully. Other package managers are covered by recorded/fake-runner fixtures, not live upgrades. No GUI end-to-end test was run.Final commit
d32ce43971e54452556645e6b3ec3765e03c2517: CI run 35352048990 passed all six checks: scope planning, dependency hygiene, macOS, Linux, Windows, and Mobile/Web (including iOS, Web, and Android). No CI rerun or code fix was needed.