Skip to content

fix(tooling): enforce pinned uv in local recipe guards - #204

Merged
acgetchell merged 1 commit into
mainfrom
fix/203-uv-version-guard
Aug 2, 2026
Merged

fix(tooling): enforce pinned uv in local recipe guards#204
acgetchell merged 1 commit into
mainfrom
fix/203-uv-version-guard

Conversation

@acgetchell

@acgetchell acgetchell commented Aug 2, 2026

Copy link
Copy Markdown
Owner
  • Reject missing or mismatched uv versions with actionable diagnostics.
  • Reuse the canonical version guard across uv-backed validation helpers.

Closes #203

Summary by CodeRabbit

  • Bug Fixes

    • Improved validation of the configured uv version.
    • Error messages now identify both the expected and detected versions when validation fails.
    • Standardized tool setup checks for improved reliability.
  • Tests

    • Added coverage to verify tool discovery and pinned uv handling.

- Reject missing or mismatched uv versions with actionable diagnostics.
- Reuse the canonical version guard across uv-backed validation helpers.

Closes #203
@acgetchell acgetchell self-assigned this Aug 2, 2026
@acgetchell
acgetchell enabled auto-merge August 2, 2026 04:02
@coderabbitai

coderabbitai Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The Justfile centralizes uv checks in _ensure-uv. The guard validates the executable path and configured version. Tool recipes depend on the guard, and regression tests verify dependencies and mismatch output.

Changes

Pinned uv guard

Layer / File(s) Summary
Implement and wire the uv guard
justfile
_ensure-uv resolves uv, checks the configured version, and reports mismatches. Actionlint, shellcheck, shfmt, and yamllint reuse the guard.
Validate recipe metadata and mismatch handling
scripts/tests/test_justfile_discoverability.py
Tests verify shared prerequisites, version-check usage, and diagnostics from a mismatched fake uv executable.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related issues

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes enforcing the configured pinned uv version in local recipe guards.
Linked Issues check ✅ Passed The changes enforce the configured uv version, reuse _ensure-uv across uv-backed helpers, preserve checks, and add focused regression tests for issue #203.
Out of Scope Changes check ✅ Passed All changes support issue #203 by updating recipe guards and adding focused tests for pinned uv behavior.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/203-uv-version-guard

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Aug 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.86%. Comparing base (6a3c762) to head (938aff6).
✅ All tests successful. No failed tests found.

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           
Flag Coverage Δ
unittests 97.86% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@coderabbitai coderabbitai Bot 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.

🧹 Nitpick comments (1)
scripts/tests/test_justfile_discoverability.py (1)

54-70: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Add success and missing-executable guard tests.

This test covers only a version mismatch. Add a successful _ensure-uv invocation with the configured uv. Add a PATH fixture without uv and assert the missing diagnostic. 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

📥 Commits

Reviewing files that changed from the base of the PR and between 6a3c762 and 938aff6.

📒 Files selected for processing (2)
  • justfile
  • scripts/tests/test_justfile_discoverability.py

@acgetchell
acgetchell merged commit 5e05170 into main Aug 2, 2026
19 checks passed
@acgetchell
acgetchell deleted the fix/203-uv-version-guard branch August 2, 2026 04:14
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.

Enforce the configured uv version in local recipe guards

1 participant