bugfix(cli): add version to output (#1314)#2807
Merged
bgm-malbeclabs merged 1 commit intomainfrom Feb 5, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes a JSON rendering issue where version warnings were being inserted into JSON output, causing malformed responses. The fix introduces structured version status information that is included in JSON responses and printed to stderr for table output.
Changes:
- Added
VersionStatusenum andget_version_statusfunction to provide structured version checking - Modified
status,routes, andlatencycommands to include version information in JSON responses - Version warnings now print to stderr for table output to avoid breaking structured output
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| smartcontract/cli/src/checkversion.rs | Adds VersionStatus enum and get_version_status function with comprehensive unit tests |
| client/doublezero/src/command/status.rs | Wraps status response with version information for JSON output |
| client/doublezero/src/command/routes.rs | Wraps routes response with version information for JSON output |
| client/doublezero/src/command/latency.rs | Wraps latency response with version information for JSON output |
| CHANGELOG.md | Documents the addition of version field to JSON output |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
snormore
approved these changes
Feb 4, 2026
24b76b3 to
85e237b
Compare
85e237b to
baafe3d
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 of Changes
This PR fixes a json rendering issue when the client is out of date. If the client was out of date and the user tried to return the status as json the json would be malformed as the version warning would be stuffed in.
Now it looks like this:
current:
compatible:
incompatible:
Closes #1314
Testing Verification
Unit tests have been added that show the output conforms to the expected result.