Skip to content

Check Pro releases via the cloud-worker proxy on a Pro build (#1888) - #1933

Merged
mstomar125 merged 1 commit into
mainfrom
issue-1888-pro-update-client
Aug 3, 2026
Merged

mstomar125 merged 1 commit into
mainfrom
issue-1888-pro-update-client

Conversation

@mstomar125

Copy link
Copy Markdown
Contributor

What

The client half of #1888 — a Pro build now checks for updates against the private nodespace-sync releases (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:

  • Pro build (is_pro_build(), keyed on the compiled-in NODESPACE_PRO_SUPABASE_URL) → GET /pro/latest-version on the worker (returns only a version string).
  • Community build → the existing public nodespace-core releases endpoint.

Same semver comparison, same non-blocking banner either way.

How

  • is_pro_build() promoted to pub(crate) so the update check reads the Pro discriminator off the same source as daemon setup (no duplicated 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, 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_json parses {version}, rejects {error}/empty/non-json, and feeds the existing semver compare.
  • update_check suite 10/10; app lib compiles clean; full pre-push gate green (frontend + rust + build + e2e).

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. 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

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]>
@mstomar125

Copy link
Copy Markdown
Contributor Author

APPROVE (self-review; right-sized single pass — best-effort, fail-safe read-only check).

  • Correct discriminator: reuses is_pro_build() (compiled-in NODESPACE_PRO_SUPABASE_URL), no duplicated cfg; URL mirrors pro_sync's debug/release selection.
  • Fails safe: every fetch/parse error → None → "no update known", so an undeployed endpoint or a 503 never blocks startup or errors. A community build path is unchanged.
  • No token/secret on the client; only a version string is ever read. Semver compare + banner reused (no new surface).
  • update_check 10/10, gate green (frontend flake cleared on re-run). Merging; deploy+secret is the only remaining [auto-update] Detect new PRO (nodespace-sync) releases too, not just free (nodespace-core) #1888 step.

@mstomar125
mstomar125 merged commit 73f79ad into main Aug 3, 2026
2 checks passed
@mstomar125
mstomar125 deleted the issue-1888-pro-update-client branch August 3, 2026 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant