You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tighten Stellar CLI version parsing to require valid SemVer 2.0.0 core and suffix identifier syntax while retaining the existing optional v prefix.
Reject malformed versions with leading zeroes in core components, empty suffix identifiers, malformed dotted metadata, and numeric prerelease identifiers with leading zeroes.
Add focused regression coverage for valid and invalid SemVer outputs.
Reconcile the remaining useful coverage from contributor PR test(diagnostics): expand stellar cli version diagnostic fixtures (#100) #228 without copying its broad fixture library: add explicit unsupported-floor cases, structured/proxy-error output, non-zero exit codes (including valid stdout on failure), and ENOENT/EACCES secret-redaction cases.
Scope and safety
Does not change the supported numeric baseline (>=27.1.0) or the official stellar version --only-version invocation.
Does not inspect identities, keys, networks, or local configuration.
Changes are committed on maintainer/stellar-version-semver-hardening-2026-11-13.
GitHub Actions is running the repository quality, platform, CodeQL, scope/ownership, and smoke checks. No passing result is claimed until those checks complete.
Summary by CodeRabbit
Bug Fixes
Stellar CLI version checks now accept valid semantic versions, including prerelease and build metadata, and reject malformed versions.
Diagnostic output avoids exposing sensitive error and stderr details.
Tests
Added coverage for unsupported versions, invalid or unexpected output, and command execution failures.
No actionable comments were generated in the recent review.
Walkthrough
The Stellar version parser now enforces semantic-version syntax and returns the normalized core version. New tests cover valid and malformed versions, unsupported versions, command failures, unrecognized output, and sensitive-text exclusion.
Changes: Stellar diagnostics
Layer / File(s)
Summary
Version parsing and diagnostic coverage src/diagnostics/stellar.ts, tests/stellar-diagnostic-semver.test.ts, tests/stellar-diagnostic-failure-matrix.test.ts
The parser rejects leading zeros in core components and accepts valid prerelease and build metadata. Tests cover normalized versions, malformed output, versions below the supported floor, command failures, and omission of sensitive text from serialized diagnostics.
The change makes Stellar CLI version detection stricter, so malformed version output is now reported as unrecognized. Valid versions keep reporting the normalized core version, and new tests cover the main failure cases. No merge-blocking risk is evident.
Pre-merge checks: 4
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title names the change: stricter SemVer validation of Stellar CLI version output in diagnostics. The raw summary confirms parseStellarVersion now enforces semantic-version syntax, rejecting lead…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title names the change: stricter SemVer validation of Stellar CLI version output in diagnostics. The raw summary confirms parseStellarVersion now enforces semantic-version syntax, rejecting leading zeros in core components, and the added tests cover valid and malformed versions. The title is specific and matches the main change, so it passes.
Finishing Touches
Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
File: No configuration file from this repository applied
Commit: Unavailable
Layers: defaults
Review profile: CHILL
Plan: Advanced
Run ID: afa2207b-0e15-4a4f-a762-4a3620a82024
Commits
Reviewing files that changed from the base of the PR and between dde43ac and 22e09bb.
Files selected for processing: 3
src/diagnostics/stellar.ts
tests/stellar-diagnostic-failure-matrix.test.ts
tests/stellar-diagnostic-semver.test.ts
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
Already reviewed the last commit. Use @coderabbitai full review to rerun a review of the entire changeset.
Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
vprefix.Scope and safety
>=27.1.0) or the officialstellar version --only-versioninvocation.Verification
maintainer/stellar-version-semver-hardening-2026-11-13.Summary by CodeRabbit