fix(tooling): enforce pinned uv in local recipe guards - #204
Conversation
- Reject missing or mismatched uv versions with actionable diagnostics. - Reuse the canonical version guard across uv-backed validation helpers. Closes #203
📝 WalkthroughWalkthroughThe Justfile centralizes ChangesPinned
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related issues
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #204 +/- ##
=======================================
Coverage 97.86% 97.86%
=======================================
Files 8 8
Lines 4969 4969
=======================================
Hits 4863 4863
Misses 106 106
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
scripts/tests/test_justfile_discoverability.py (1)
54-70: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winAdd success and missing-executable guard tests.
This test covers only a version mismatch. Add a successful
_ensure-uvinvocation with the configureduv. Add aPATHfixture withoutuvand assert themissingdiagnostic. This protects both required guard states.As per coding guidelines, “Test both adversarial inputs and well-conditioned inputs.”
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@scripts/tests/test_justfile_discoverability.py` around lines 54 - 70, Extend the guard tests near test_uv_guard_reports_expected_and_actual_versions with a success case using the configured uv executable and a missing-executable case using a PATH fixture that contains no uv. Assert the successful _ensure-uv invocation exits successfully, and assert the missing case fails with the expected “missing” diagnostic while preserving the existing mismatch coverage.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@scripts/tests/test_justfile_discoverability.py`:
- Around line 54-70: Extend the guard tests near
test_uv_guard_reports_expected_and_actual_versions with a success case using the
configured uv executable and a missing-executable case using a PATH fixture that
contains no uv. Assert the successful _ensure-uv invocation exits successfully,
and assert the missing case fails with the expected “missing” diagnostic while
preserving the existing mismatch coverage.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 2801db61-28d2-4c83-9036-24b08bf8dca2
📒 Files selected for processing (2)
justfilescripts/tests/test_justfile_discoverability.py
Closes #203
Summary by CodeRabbit
Bug Fixes
uvversion.Tests
uvhandling.