Skip to content

fix: tighten uv version parser and platform-gate SYSTEMROOT in test client#411

Merged
karthiknadig merged 1 commit intomainfrom
fix/410-followup-review-comments
Apr 6, 2026
Merged

fix: tighten uv version parser and platform-gate SYSTEMROOT in test client#411
karthiknadig merged 1 commit intomainfrom
fix/410-followup-review-comments

Conversation

@karthiknadig
Copy link
Copy Markdown
Member

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+). Previously 3.12abc passed 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 when std::env::var("SYSTEMROOT") succeeds. Previously used unwrap_or_default() which silently set it to empty string on non-Windows or when missing.

Follow-up to #410

@karthiknadig karthiknadig requested a review from Copilot April 6, 2026 23:44
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 6, 2026

Test Coverage Report (Linux)

Metric Value
Current Coverage 73.5%
Base Branch Coverage 73.5%
Delta 0% ➖

Coverage unchanged.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 6, 2026

Performance Report (Linux) ➖

Metric PR (P50) PR (P95) Baseline (P50) Delta Change
Server Startup 1ms 1ms 1ms 0ms 0%
Full Refresh 96ms 139ms 77ms 19ms 20.0%

Results based on 10 iterations. P50 = median, P95 = 95th percentile.


Legend
  • 🚀 Significant speedup (>100ms faster)
  • ✅ Faster than baseline
  • ➖ No significant change
  • 🔺 Slower than baseline (>100ms)
  • ⚠️ Significant slowdown (>500ms)

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 6, 2026

Performance Report (macOS)

Metric PR (P50) PR (P95) Baseline (P50) Delta
Server Startup 72ms 549ms 51ms 21ms
Full Refresh 146ms 31821ms 95ms 51ms

Results based on 10 iterations. P50 = median, P95 = 95th percentile.


Legend
  • 🚀 Significant speedup (>100ms faster)
  • ✅ Faster than baseline
  • ➖ No significant change
  • 🔺 Slower than baseline (>100ms)
  • ⚠️ Significant slowdown (>500ms)

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 6, 2026

Test Coverage Report (Windows)

Metric Value
Current Coverage 69.73%
Base Branch Coverage 69.73%
Delta 0% ➖

Coverage unchanged.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 6, 2026

Performance Report (Windows) ➖

Metric PR (P50) PR (P95) Baseline (P50) Delta Change
Server Startup 13ms 16ms 9ms 4ms 44.4%
Full Refresh 201ms 410ms 148ms 53ms 35.8%

Results based on 10 iterations. P50 = median, P95 = 95th percentile.


Legend
  • 🚀 Significant speedup (>100ms faster)
  • ✅ Faster than baseline
  • ➖ No significant change
  • 🔺 Slower than baseline (>100ms)
  • ⚠️ Significant slowdown (>500ms)

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR follows up on PR #410 by tightening input validation and improving cross-platform test isolation behavior.

Changes:

  • Harden uv version 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 SYSTEMROOT on 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

@karthiknadig karthiknadig enabled auto-merge (squash) April 6, 2026 23:52
@karthiknadig karthiknadig merged commit 05d75c6 into main Apr 6, 2026
34 checks passed
@karthiknadig karthiknadig deleted the fix/410-followup-review-comments branch April 6, 2026 23:54
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.

4 participants