Skip to content

fix: validate version field is valid semver#227

Open
bryan-anthropic wants to merge 1 commit intomainfrom
fix/semver-version-validation
Open

fix: validate version field is valid semver#227
bryan-anthropic wants to merge 1 commit intomainfrom
fix/semver-version-validation

Conversation

@bryan-anthropic
Copy link
Copy Markdown
Collaborator

Summary

  • Add semver validation to mcpb validate — non-semver version strings (e.g., "2024.03.31.01") now fail validation with a descriptive error
  • Uses the semver package (new direct dependency, already present transitively) instead of a fragile regex

Fixes #226

Context

Non-semver version strings pass mcpb validate and mcpb pack today, but cause fatal unrecoverable crashes in Claude Desktop at bootstrap (TypeError: Invalid Version). The app becomes bricked — it crashes on every launch and the broken extension cannot be uninstalled via UI.

MANIFEST.md already documents version as "Semantic version (semver)" but nothing enforced it until now.

Test plan

  • 4 new unit tests (reject calver, reject string, accept semver, accept prerelease+build)
  • E2E: mcpb pack with bad version fails before producing bundle
  • E2E: mcpb pack with good version succeeds, bundle unpacks, server responds to MCP initialize
  • All 15 validate tests pass

🤖 Generated with Claude Code

Non-semver version strings (e.g., "2024.03.31.01") pass validation today
but cause fatal unrecoverable crashes in Claude Desktop at bootstrap.
Add semver validation to catch these before pack/distribution.

Fixes #226

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

@claude claude bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Code review skipped — your organization's overage spend limit has been reached.

Code review is billed via overage credits. To resume reviews, an organization admin can raise the monthly limit at claude.ai/admin-settings/claude-code.

Once credits are available, reopen this pull request to trigger a review.

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.

Claude Desktop crashes on invalid semver in manifest version field

1 participant