Skip to content

test: add pet-homebrew locator coverage#394

Merged
karthiknadig merged 3 commits intomainfrom
feature/issue-393-pet-homebrew-tests
Apr 6, 2026
Merged

test: add pet-homebrew locator coverage#394
karthiknadig merged 3 commits intomainfrom
feature/issue-393-pet-homebrew-tests

Conversation

@karthiknadig
Copy link
Copy Markdown
Member

Adds focused pet-homebrew unit tests as a small follow-up slice from the broader coverage plan.

  • Cover Homebrew locator metadata and Linuxbrew identification
  • Cover non-Homebrew, virtualenv, and Conda rejection paths
  • Cover Homebrew path classification and HOMEBREW_PREFIX bin discovery
  • Keep this PR scoped to pet-homebrew only

Fixes #393
Part of #389

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

github-actions bot commented Apr 5, 2026

Test Coverage Report (Linux)

Metric Value
Current Coverage 73.2%
Base Branch Coverage 72.0%
Delta 1.2% ✅

Coverage increased! Great work!

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 5, 2026

Performance Report (Linux) ➖

Metric PR (P50) PR (P95) Baseline (P50) Delta Change
Server Startup 1ms 1ms 1ms 0ms 0%
Full Refresh 78ms 136ms 75ms 3ms 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 5, 2026

Performance Report (macOS)

Metric PR (P50) PR (P95) Baseline (P50) Delta
Server Startup 70ms 701ms 67ms 3ms
Full Refresh 137ms 31199ms 142ms -5ms

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 5, 2026

Performance Report (Windows) ➖

Metric PR (P50) PR (P95) Baseline (P50) Delta Change
Server Startup 9ms 12ms 8ms 1ms 12.5%
Full Refresh 146ms 379ms 143ms 3ms 2.1%

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 5, 2026

Test Coverage Report (Windows)

Metric Value
Current Coverage 69.41%
Base Branch Coverage 68.72%
Delta 0.69% ✅

Coverage increased! Great work!

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

Adds focused unit tests to the pet-homebrew locator crate to improve branch coverage for Homebrew/Linuxbrew identification and helper logic, aligning with the broader workspace coverage plan.

Changes:

  • Add unit tests for Homebrew path recognition and symlink template behavior in sym_links.
  • Add locator-level tests for Homebrew kind/category metadata, Linuxbrew identification, and rejection of non-Homebrew/virtualenv/Conda inputs.
  • Add tests for HOMEBREW_PREFIX-driven prefix bin discovery behavior.
Show a summary per file
File Description
crates/pet-homebrew/src/sym_links.rs Adds tests for Homebrew/Linuxbrew path classification and symlink helper branches.
crates/pet-homebrew/src/lib.rs Adds locator-focused tests for identification and rejection paths (non-homebrew, venv, conda).
crates/pet-homebrew/src/environment_locations.rs Adds tests for HOMEBREW_PREFIX bin discovery logic.

Copilot's findings

  • Files reviewed: 3/3 changed files
  • Comments generated: 2

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 adds targeted unit tests to the pet-homebrew crate to improve branch coverage for Homebrew/Linuxbrew environment identification and related helper functions, aligning with the broader coverage plan while staying crate-scoped.

Changes:

  • Add unit tests for Homebrew path recognition and known-symlink helper behavior.
  • Add unit tests for the Homebrew Locator metadata and try_from rejection/acceptance paths (including Linuxbrew identification).
  • Add unit tests for HOMEBREW_PREFIX bin discovery logic, plus tempfile as a dev-dependency.
Show a summary per file
File Description
crates/pet-homebrew/src/sym_links.rs Adds unit tests for Homebrew path classification and symlink template helper behavior.
crates/pet-homebrew/src/lib.rs Adds unit tests for Homebrew locator kind/category and try_from accept/reject paths.
crates/pet-homebrew/src/environment_locations.rs Adds unit tests for HOMEBREW_PREFIX-driven bin discovery behavior.
crates/pet-homebrew/Cargo.toml Adds tempfile dev-dependency to support filesystem-backed tests.

Copilot's findings

  • Files reviewed: 4/4 changed files
  • Comments generated: 1

@karthiknadig karthiknadig marked this pull request as ready for review April 6, 2026 01:35
@karthiknadig karthiknadig enabled auto-merge (squash) April 6, 2026 01:35
@karthiknadig karthiknadig merged commit 130b29f into main Apr 6, 2026
30 checks passed
@karthiknadig karthiknadig deleted the feature/issue-393-pet-homebrew-tests branch April 6, 2026 01:51
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.

Add branch-focused tests for pet-homebrew locator

3 participants