fix(cli): resolve wright self-update through the R2 release distribution - #457
Merged
Merged
Conversation
Self-update resolved the latest release through the GitHub Releases API and downloaded artifacts from github.com release-download URLs, so routine `wright update` depended on GitHub API availability and rate limits even though the supported R2 distribution publishes the same contract. Latest resolution now reads the plain-text latest/version pointer and pinned installs download the immutable releases/<version>/ archive and checksum under WRIGHT_INSTALL_BASE_URL (default https://releases.wrightkit.dev/wright), matching install.sh/install.ps1. The GitHub latest-release endpoint, tag_name JSON parsing, and WRIGHT_API_URL are removed; GitHub Release URLs remain a documented manual recovery path only. Fixes #455
…ase URL The provider resolver kept two independent override URLs (WRIGHT_OPY_PROVIDER_LATEST_URL plus a WRIGHT_OPY_PROVIDER_BASE_URL that embedded the /releases prefix). Both collapse into the same single-base R2 contract the installers and self-update now share: one base URL, a latest/version pointer and immutable releases/<version>/ artifacts under it. The published routes and default distribution (releases.wrightkit.dev/opy-rs) are unchanged; only the override surface and resolver internals are simplified. Refs #455
Teakowa
enabled auto-merge (squash)
September 30, 2026 13:35
Teakowa
approved these changes
Sep 30, 2026
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.
Summary
wright update/wright update --checknow resolve the latest stable version from the plain-textlatest/versionpointer on the R2 distribution (WRIGHT_INSTALL_BASE_URL, defaulthttps://releases.wrightkit.dev/wright), andwright update self --version <VERSION>downloads the immutablereleases/<version>/archive +.sha256— the same routesinstall.sh/install.ps1consume.releases/latestAPI endpoint,tag_nameJSON parsing, and theWRIGHT_API_URLoverride. GitHub Release download URLs remain a documented manual recovery path; there is no automatic GitHub fallback.WRIGHT_OPY_PROVIDER_BASE_URL(defaulthttps://releases.wrightkit.dev/opy-rs) withlatest/version+releases/<version>/under it, replacing the separateWRIGHT_OPY_PROVIDER_LATEST_URL+/releases-suffixed base knobs. Published routes are unchanged.WRIGHT_OPY_PROVIDER_BASE_URLpreviously pointed at the/releases-suffixed artifact root; it now points at the namespace root (…/opy-rs). Test/advanced hook only — anyone overriding it must drop the/releasessuffix.wright/wright-lspreplacement, downgrade refusal, package-manager provenance, smoke checks, and completion refresh are unchanged.docs/cli/update.md,docs/release.md, anddist/README.mdto describe the shared R2 contract.Test plan
cargo fmt --all -- --check,cargo clippy --workspace --all-targets --all-features -- -D warningscargo test --workspace --all-targets --all-features— all suites passtests/update.rs(21 tests): asserts the exact request sequence —latest/versionthenreleases/<version>/<archive>+.sha256— so a GitHub API path would 404; covers pinned-version routes, malformed latest pointer (GitHub-shaped JSON rejected), missing-archive download failure, checksum mismatch, package-manager skip/refuse, and no-modification paths.opy_provider.rstests exercise the single-base contract against the mock/opy-rs/latest/version+/opy-rs/releases/routes.install.sh/install.ps1/docs/release.mdcontract; residual notes are documented above (override semantics) or pre-existing.Fixes #455