Repository navigation
Check Pro releases via the cloud-worker proxy on a Pro build (#1888) - #1933
Merged
Merged
Conversation
The update check read nodespace-core's public releases/latest for every build, so a Pro user was never told a new Pro build exists — Pro ships from the private nodespace-sync repo, which the client can't read directly. Now the release source is chosen by build variant: a Pro build (is_pro_build(), keyed on the compiled-in NODESPACE_PRO_SUPABASE_URL) queries the cloud-worker GET /pro/latest-version proxy (cloud#1888 / PR #111), which returns only a version string; a community build keeps using the public core endpoint. Same semver comparison and same non-blocking banner either way. - is_pro_build() promoted to pub(crate) so the update check reads the Pro-ness discriminator off the same source as daemon setup (no duplicate cfg). - PRO_LATEST_URL mirrors commands::pro_sync's worker-URL selection (debug → 127.0.0.1:8787, release → pro.nodespace.ai). - fetch_pro_latest_version()/pro_version_from_json() parse the worker's {version} and swallow every failure to None (offline, timeout, 503-unconfigured, 5xx, bad body), so a Pro client whose endpoint isn't deployed yet just sees "no update known" — startup is never blocked or errored. Tests: pro_version_from_json parses {version}, rejects {error}/empty/non-json; feeds the existing semver compare. update_check suite 10/10 green; app lib compiles clean. Remaining for #1888: deploy the worker + set the read-only PRO_RELEASES_TOKEN secret (infra, needs the token value). Live end-to-end validation waits on that deploy — noted, not blocking. Co-authored-by: Claude Opus 4.8 <[email protected]>
Contributor
Author
|
APPROVE (self-review; right-sized single pass — best-effort, fail-safe read-only check).
|
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.
What
The client half of #1888 — a Pro build now checks for updates against the private
nodespace-syncreleases (via the cloud-worker proxy shipped in cloud PR #111), instead of the public core repo it can't update from.The release source is chosen by build variant:
is_pro_build(), keyed on the compiled-inNODESPACE_PRO_SUPABASE_URL) →GET /pro/latest-versionon the worker (returns only a version string).nodespace-corereleases endpoint.Same semver comparison, same non-blocking banner either way.
How
is_pro_build()promoted topub(crate)so the update check reads the Pro discriminator off the same source as daemon setup (no duplicatedcfg).PRO_LATEST_URLmirrorscommands::pro_sync's worker-URL selection (debug → 127.0.0.1:8787,release → pro.nodespace.ai).fetch_pro_latest_version()/pro_version_from_json()parse the worker's{version}and swallow every failure toNone(offline, timeout, 503-unconfigured, 5xx, malformed) — so a Pro client whose endpoint isn't deployed yet simply sees "no update known"; startup is never blocked or errored.Tests
pro_version_from_jsonparses{version}, rejects{error}/empty/non-json, and feeds the existing semver compare.Remaining for #1888
Deploy the worker + set the read-only
PRO_RELEASES_TOKENsecret (infra, needs the token value). Live end-to-end validation waits on that deploy — noted, not blocking. With this merged, #1888 is code-complete: once the endpoint is deployed and the secret set, Pro users get the banner with no further code.🤖 Generated with Claude Code