Skip to content

Reject ambiguous uv output before repository updates #228

Description

@acgetchell

Summary

Reject ambiguous multi-version uv --version output before just update changes repository dependencies or installed Cargo tools.

Current State

  • _ensure-stable-uv-version runs early and rejects prerelease, embedded, and missing leading versions.
  • Its prefix regex still accepts output such as uv 9.9.9 using runtime 3.14.0.
  • update-cargo-tool-pins requires exactly one stable X.Y.Z token, so the same output fails only after update-dependencies or cargo install-update has mutated state.

Proposed Changes

  • Make the update preflight enforce the reconciler's exact single-stable-version contract, preferably by reusing the reconciler parser or an equivalent tested boundary.
  • Keep accepting a newer stable uv than the tracked pin so reconciliation can advance uv_version.
  • Preserve the exact pinned-version guard used by ordinary uv-backed commands.
  • Add regression coverage for ambiguous, missing, prerelease, and embedded output plus dry-run ordering before both mutation points.

Maintainer-Requested Scope Expansion

PR #229 also owns the related Windows and Python-tooling reliability work requested during implementation:

  • Make repository-owned Python subprocess and text-file operations behave consistently on Windows.
  • Enforce complete annotations, type-only imports, and the full configured Ruff policy across support scripts and Semgrep Python fixtures.
  • Put fixture lint directly in just ci, with regression coverage preventing the aggregate gate from omitting it or narrowing its rule set.
  • Record intentional fixture violations as exact Ruff per-file ignores.
  • Exclude deliberately invalid Semgrep fixtures from CodeRabbit's general review and disable its duplicate docstring-percentage check; repository-owned Ruff, ty, and Semgrep remain authoritative.

Benefits

  • Completes the early-failure guarantee introduced by the current stable-uv preflight.
  • Prevents partially applied dependency or installed-tool updates from the remaining ambiguous-output case.
  • Keeps the Just command contract aligned with the atomic pin reconciler.

Validation

  • Run the focused Just/reconciler tests.
  • Run just --fmt --check and just check.

Related Work

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpythonPull requests that update Python codetestingIssues that come up in testingvalidation

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions