Skip to content

fix(preview): sanitize channel-derived versions for plugin installs#16222

Draft
anduimagui wants to merge 2 commits intoanomalyco:devfrom
anduimagui:opencode/desktop-workspace-semver-fix
Draft

fix(preview): sanitize channel-derived versions for plugin installs#16222
anduimagui wants to merge 2 commits intoanomalyco:devfrom
anduimagui:opencode/desktop-workspace-semver-fix

Conversation

@anduimagui
Copy link

@anduimagui anduimagui commented Mar 5, 2026

Issue for this PR

Closes #16224

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

This fixes preview version generation when the channel/branch name contains / (for example opencode/lucky-forest), which produced a non-semver prerelease label and broke plugin dependency installs in desktop dev/new workspace flows.

The patch sanitizes preview channel/version strings to semver-safe tokens and adds a pluginVersion guard in config install logic so invalid preview versions automatically fall back to *.

How did you verify your code works?

  • Ran bun run dev:desktop from repo root; desktop startup proceeded through predev/build and launched without the semver install failure.
  • Ran bun test src/version.test.ts in packages/script.
  • Ran bun test test/config/config.test.ts -t pluginVersion in packages/opencode.

Screenshots / recordings

N/A (non-UI fix).

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions github-actions bot added needs:compliance This means the issue will auto-close after 2 hours. needs:issue labels Mar 5, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

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.

@github-actions github-actions bot removed needs:issue needs:compliance This means the issue will auto-close after 2 hours. labels Mar 5, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@anduimagui anduimagui force-pushed the opencode/desktop-workspace-semver-fix branch from 8ca6602 to d823cd7 Compare March 5, 2026 19:54
@anduimagui anduimagui force-pushed the opencode/desktop-workspace-semver-fix branch from d823cd7 to b42cec4 Compare March 5, 2026 20:13
@anduimagui anduimagui marked this pull request as draft March 5, 2026 20:39
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.

Bug: desktop dev/new workspace flow fails when preview channel contains slash

1 participant