fix: tighten uv version parser and platform-gate SYSTEMROOT in test client#411
Merged
karthiknadig merged 1 commit intomainfrom Apr 6, 2026
Merged
Conversation
…lient (follow-up to #410)
Test Coverage Report (Linux)
Coverage unchanged. |
Performance Report (Linux) ➖
Legend
|
Performance Report (macOS)
Legend
|
Test Coverage Report (Windows)
Coverage unchanged. |
Performance Report (Windows) ➖
Legend
|
There was a problem hiding this comment.
Pull request overview
This PR follows up on PR #410 by tightening input validation and improving cross-platform test isolation behavior.
Changes:
- Harden
uvversion parsing so major/minor components must be strictly numeric, and only the patch (3rd+) component may carry a pre-release suffix. - Update the JSONRPC test client process spawn to only set
SYSTEMROOTon Windows and only when it exists, avoiding empty-string injection on other platforms.
Show a summary per file
| File | Description |
|---|---|
crates/pet/tests/jsonrpc_client.rs |
Refactors test server spawn to platform-gate SYSTEMROOT and avoid setting it to "" on non-Windows. |
crates/pet-uv/src/lib.rs |
Strengthens version component validation and adds a regression test for non-numeric 2-component minor versions. |
Copilot's findings
- Files reviewed: 2/2 changed files
- Comments generated: 0
roblourens
approved these changes
Apr 6, 2026
benvillalobos
approved these changes
Apr 6, 2026
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
Addresses two unresolved Copilot review comments from merged PR #410.
Changes
uv version parser: Major and minor components are now explicitly validated as purely numeric. Pre-release suffix (e.g.,
0a4,0rc1) is only allowed on the patch component (3rd+). Previously3.12abcpassed validation because the minor was the "last" component and only needed to start with a digit. Added test case for this scenario.SYSTEMROOT in test client: Platform-gated with
#[cfg(windows)]and only set whenstd::env::var("SYSTEMROOT")succeeds. Previously usedunwrap_or_default()which silently set it to empty string on non-Windows or when missing.Follow-up to #410