Skip to content

fix: ignore Python install manager target files (Fixes #483) - #484

Merged
Karthik Nadig (karthiknadig) merged 1 commit into
mainfrom
bug/issue-483
Jul 24, 2026
Merged

fix: ignore Python install manager target files (Fixes #483)#484
Karthik Nadig (karthiknadig) merged 1 commit into
mainfrom
bug/issue-483

Conversation

@karthiknadig

@karthiknadig Karthik Nadig (karthiknadig) commented Jul 24, 2026

Copy link
Copy Markdown
Member

Summary

  • require Windows Python executable matches to end at the .exe suffix
  • exclude Python Install Manager .__target__ metadata files from discovery
  • add regression coverage for unversioned and versioned target files

Validation

  • cargo test -p pet-python-utils executable::tests::is_
  • .\scripts\rust-precommit.ps1

Fixes #483

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

github-actions Bot commented Jul 24, 2026

Copy link
Copy Markdown

Performance Report (Linux) ➖

Metric PR (P50) PR (P95) Baseline (P50) Delta Change
Server Startup 1ms 1ms 1ms 0ms 0%
Full Refresh 63ms 164ms 56ms 7ms 10.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

github-actions Bot commented Jul 24, 2026

Copy link
Copy Markdown

Test Coverage Report (Linux)

Metric Value
Current Coverage 80.3%
Base Branch Coverage 80.0%
Delta .3% ✅

Coverage increased! Great work!

@github-actions

github-actions Bot commented Jul 24, 2026

Copy link
Copy Markdown

Performance Report (macOS)

Metric PR (P50) PR (P95) Baseline (P50) Delta
Server Startup 48ms 646ms 56ms -8ms
Full Refresh 86ms 30234ms 96ms -10ms

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

github-actions Bot commented Jul 24, 2026

Copy link
Copy Markdown

Test Coverage Report (Windows)

Metric Value
Current Coverage 77.07%
Base Branch Coverage 77.06%
Delta 0.01% ✅

Coverage increased! Great work!

@github-actions

github-actions Bot commented Jul 24, 2026

Copy link
Copy Markdown

Performance Report (Windows) ✅

Metric PR (P50) PR (P95) Baseline (P50) Delta Change
Server Startup 8ms 10ms 10ms -2ms -20%
Full Refresh 118ms 1322ms 152ms -34ms -22.4%

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)

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 updates PET’s Python executable name detection (used during environment discovery) to avoid false positives on Windows, specifically excluding Python Install Manager .__target__ metadata files and tightening the Windows .exe match.

Changes:

  • Anchor the Windows executable regex to require the filename to end with .exe.
  • Ensure .exe.__target__ files are excluded from executable-name matching on Windows.
  • Add regression tests covering both unversioned and versioned .__target__ filenames.
Show a summary per file
File Description
crates/pet-python-utils/src/executable.rs Tightens Windows executable name matching and adds regression tests to prevent treating .__target__ files as runnable Python executables.

Review details

  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Low

@karthiknadig
Karthik Nadig (karthiknadig) marked this pull request as ready for review July 24, 2026 20:28
@karthiknadig
Karthik Nadig (karthiknadig) merged commit 8296b5a into main Jul 24, 2026
38 checks passed
@karthiknadig
Karthik Nadig (karthiknadig) deleted the bug/issue-483 branch July 24, 2026 20:32
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.

Windows executable detection tries to run 'python3.exe.__target__' etc

4 participants