Conversation
Performance Report (Linux) ✅
Legend
|
Test Coverage Report (Linux)
Coverage increased! Great work! |
Performance Report (macOS)
Legend
|
Test Coverage Report (Windows)
Coverage increased! Great work! |
Performance Report (Windows) ✅
Legend
|
There was a problem hiding this comment.
Pull request overview
This PR increases test coverage for the pet-linux-global-python locator and adjusts try_from() to avoid hydrating (scanning) the Linux global-python cache when the candidate executable is clearly not a global install path.
Changes:
- Move
find_cached(None)inLinuxGlobalPython::try_from()to occur only after the global-path guard passes. - Add focused unit tests covering Linux global environment construction, architecture mapping, symlink handling, and early rejection behavior.
- Add
tempfileas a dev-dependency for the new tests.
Show a summary per file
| File | Description |
|---|---|
| crates/pet-linux-global-python/src/lib.rs | Reorders cache hydration in try_from() and adds unit tests for get_python_in_bin() and try_from() early-reject paths. |
| crates/pet-linux-global-python/Cargo.toml | Adds tempfile under [dev-dependencies] to support new tests. |
| Cargo.lock | Updates lockfile to reflect the new dev-dependency linkage from pet-linux-global-python. |
Copilot's findings
- Files reviewed: 2/3 changed files
- Comments generated: 0
There was a problem hiding this comment.
Pull request overview
Improves pet-linux-global-python confidence and performance by adding targeted unit tests around Linux global environment construction and by avoiding unnecessary global-bin cache hydration when the candidate executable is clearly not in a supported global location.
Changes:
- Delay
find_cached(None)until after the global-path guard inLinuxGlobalPython::try_from()to avoid scanning/bin//usr/bin//usr/local/binfor non-global candidates. - Add focused unit tests for
get_python_in_bin()(arch mapping, symlink handling, and negative cases) and for early-return paths intry_from(). - Add
tempfileas a dev-dependency for the new tests and update lockfile.
Show a summary per file
| File | Description |
|---|---|
| crates/pet-linux-global-python/src/lib.rs | Moves cache hydration behind path rejection and adds unit tests covering env construction + symlink and rejection behaviors. |
| crates/pet-linux-global-python/Cargo.toml | Adds tempfile under dev-dependencies to support new unit tests. |
| Cargo.lock | Records tempfile as a dependency for pet-linux-global-python. |
Copilot's findings
- Files reviewed: 2/3 changed files
- Comments generated: 0 new
Summary:
Validation:
Refs #389