Skip to content

fix: [AI-211] normalize Installation.VERSION and fix branding leaks - #213

Merged
anandgupta42 merged 2 commits into
mainfrom
fix/issue-211-version-upgrade
Mar 17, 2026
Merged

fix: [AI-211] normalize Installation.VERSION and fix branding leaks#213
anandgupta42 merged 2 commits into
mainfrom
fix/issue-211-version-upgrade

Conversation

@anandgupta42

Copy link
Copy Markdown
Contributor

What does this PR do?

Fixes version display and upgrade issues reported in #211:

  1. Version normalization: CI sets OPENCODE_VERSION from the git tag (e.g. v0.4.1), but Installation.latest() returns clean semver (0.4.1). The string comparison VERSION === target always failed, causing the upgrade command to "upgrade" to the same version. Fix: strip "v" prefix and trim whitespace at the VERSION definition site.

  2. Branding fixes: User-facing strings in upgrade toast, auth errors, provider messages, terminal-auth capability, and CLI descriptions still referenced "opencode" instead of "altimate".

  3. Cleanup: Removed redundant .replace(/^v/, "") in welcome.ts since VERSION is now pre-normalized.

Type of change

  • Bug fix (non-breaking change that fixes an issue)

Issue for this PR

Closes#211

How did you verify your code works?

  • 25 new tests added covering version normalization, upgrade comparison logic, terminal-auth branding, and broad scan for branding regressions
  • All 306 related tests pass (installation, branding, welcome, postinstall)
  • Full test suite: 3007 pass, 0 new failures
  • Multi-model code review (6 models: Claude, GPT 5.2 Codex, Gemini 3.1 Pro, Kimi K2.5, MiniMax M2.5, GLM-5) — unanimous APPROVE after convergence

Checklist

  • My code follows the guidelines of this project
  • I have performed a self-review of my own code
  • New and existing tests pass locally with my changes
  • I have added tests that prove my fix is effective

🤖 Generated with Claude Code

…des and fix branding leaks
- Strip "v" prefix from `OPENCODE_VERSION` at the source so `Installation.VERSION`
always matches `latest()` output (e.g. "0.4.1", never "v0.4.1")
- Add `.trim()` for defensive hardening against stray whitespace from CI
- Fix user-facing "opencode" references → "altimate" in upgrade toast, auth errors,
provider messages, terminal-auth capability, and CLI descriptions
- Remove redundant `.replace(/^v/, "")` in `welcome.ts` (VERSION is now pre-normalized)
- Add 25 new tests for version normalization, upgrade comparison, and branding regression
Closes#211
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@claude

claudeBot commented Mar 17, 2026

Copy link
Copy Markdown

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review to trigger a review.

@github-actions

Copy link
Copy Markdown

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

…tions
Wraps all changes in altimate_change start/end markers so the upstream
merge script preserves them when pulling from anomalyco/opencode.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@anandgupta42
anandgupta42 merged commit 3ba6021 into mainMar 17, 2026
7 checks passed
@anandgupta42
anandgupta42 deleted the fix/issue-211-version-upgrade branch March 25, 2026 02:14
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Altimate Upgrade has some issues

1 participant

@anandgupta42