fix(server): parse CLI version in update preflight#4389
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
ApprovabilityVerdict: 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. |
e855e04 to
312fa3b
Compare
Dismissing prior approval to re-evaluate 312fa3b
Summary
t3 v<version>outputVerification
vp test run apps/server/src/cloud/selfUpdate.test.tsvp fmt --check apps/server/src/cloud/selfUpdate.ts apps/server/src/cloud/selfUpdate.test.tsvp lint apps/server/src/cloud/selfUpdate.ts apps/server/src/cloud/selfUpdate.test.tsvp run --filter t3 typecheckNote
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
--versionstdout as a bare semver string. It parses the trailingv<version>token (e.g. fromt3 v0.0.29) before comparing to the requested pin, so Effect CLI’sformatVersionoutput 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>outputThe update preflight check was comparing the raw stdout of
--versiondirectly to the target version string, but Effect CLI emits output liket3 v0.0.28rather 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.