Skip to content

fix(server): parse CLI version in update preflight#4389

Merged
t3dotgg merged 1 commit into
mainfrom
t3code/fix-remote-update-version-check
Jul 23, 2026
Merged

fix(server): parse CLI version in update preflight#4389
t3dotgg merged 1 commit into
mainfrom
t3code/fix-remote-update-version-check

Conversation

@t3dotgg

@t3dotgg t3dotgg commented Jul 23, 2026

Copy link
Copy Markdown
Member

Summary

  • verify pinned runtimes against the CLI’s actual t3 v<version> output
  • make the self-update process-runner fake emit that same format
  • keep wrong-version coverage realistic

Verification

  • vp test run apps/server/src/cloud/selfUpdate.test.ts
  • vp fmt --check apps/server/src/cloud/selfUpdate.ts apps/server/src/cloud/selfUpdate.test.ts
  • vp lint apps/server/src/cloud/selfUpdate.ts apps/server/src/cloud/selfUpdate.test.ts
  • vp run --filter t3 typecheck

Note

Low Risk
Narrow change to post-install version verification and test doubles; no auth or data paths touched.

Overview
Self-update preflight no longer treats --version stdout as a bare semver string. It parses the trailing v<version> token (e.g. from t3 v0.0.29) before comparing to the requested pin, so Effect CLI’s formatVersion output does not falsely fail installs.

Tests make the fake process runner and wrong-version case emit t3 v… so preflight behavior matches production.

Reviewed by Cursor Bugbot for commit 312fa3b. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Fix version parsing in update preflight to handle CLI name v<version> output

The update preflight check was comparing the raw stdout of --version directly to the target version string, but Effect CLI emits output like t3 v0.0.28 rather than a bare version number. The fix extracts the version token using /\bv(\S+)\s*$/ before comparing, so installs are no longer incorrectly rejected and removed.

Macroscope summarized 312fa3b.

@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: d77453aa-339c-4070-96c4-33616080cc3d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch t3code/fix-remote-update-version-check

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Jul 23, 2026
macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Jul 23, 2026
@macroscopeapp

macroscopeapp Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved

Straightforward bug fix adapting version parsing to handle CLI output format change from '0.0.28' to 't3 v0.0.28'. Limited scope, clear intent, and tests updated accordingly.

You can customize Macroscope's approvability policy. Learn more.

@t3dotgg
t3dotgg force-pushed the t3code/fix-remote-update-version-check branch from e855e04 to 312fa3b Compare July 23, 2026 19:40
@macroscopeapp
macroscopeapp Bot dismissed their stale review July 23, 2026 19:40

Dismissing prior approval to re-evaluate 312fa3b

@t3dotgg t3dotgg changed the title fix(server): match CLI output in update preflight fix(server): parse CLI version in update preflight Jul 23, 2026
@t3dotgg
t3dotgg merged commit 88c69ff into main Jul 23, 2026
16 checks passed
@t3dotgg
t3dotgg deleted the t3code/fix-remote-update-version-check branch July 23, 2026 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant