UV Shim Fallback - #39
Merged
Merged
Conversation
…ntain permissions' Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This pull request updates dependence’s internal package-management utilities to tolerate a broken uv shim by falling back to pip, and adds regression tests and supporting documentation/config to clarify contributor workflows and agent tooling.
Changes:
- Add
uv→pipfallback behavior to_iter_pip_listand_install_requirement_string, plus new subprocess-based regression tests. - Modernize some
isinstancetype checks using PEP 604 unions. - Add/expand developer & agent documentation, plus small repo/config/workflow updates (including a version bump).
Reviewed changes
Copilot reviewed 12 out of 13 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_utilities.py | Adds tests covering uv shim failure scenarios and expected pip fallback behavior. |
| src/dependence/_utilities.py | Implements fallback from uv to pip for pip list and install operations. |
| src/dependence/update.py | Minor typing/union modernization in an isinstance check. |
| src/dependence/freeze.py | Minor typing/union modernization in an isinstance check. |
| pyproject.toml | Version bump to 1.4.2. |
| docs/superpowers/specs/2026-07-29-uv-shim-pip-fallback-design.md | Adds design spec documenting the uv shim failure mode and fallback semantics. |
| docs/superpowers/plans/2026-07-29-uv-shim-pip-fallback.md | Adds implementation plan/checklist for the fallback change and verification steps. |
| AGENTS.md | Documents repo architecture, commands, conventions, and contributor guidance. |
| CLAUDE.md | Points agent tooling at AGENTS.md. |
| .github/workflows/test.yml | Sets explicit workflow permissions and adds a terminal “success” job. |
| .claude/settings.json | Enables the official Claude Superpowers plugin for the repo. |
| .claude/skills/fableplan/SKILL.md | Adds a repo-local skill for toggling “Fable Plan Mode”. |
| .gitignore | Ensures .claude can be committed (unignored). |
Comments suppressed due to low confidence (2)
tests/test_utilities.py:91
- Using
os.environ['PATH']can raiseKeyErrorin minimal environments wherePATHis unset. Useos.getenv('PATH', '')so the test setup is robust.
monkeypatch.setenv("PATH", f"{tmp_path}{os.pathsep}{os.environ['PATH']}")
tests/test_utilities.py:154
- Using
os.environ['PATH']can raiseKeyErrorin minimal environments wherePATHis unset. Useos.getenv('PATH', '')so the test setup is robust.
monkeypatch.setenv("PATH", f"{tmp_path}{os.pathsep}{os.environ['PATH']}")
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| else "#!/bin/sh\nexit 127\n" | ||
| ) | ||
| broken_uv.chmod(broken_uv.stat().st_mode | stat.S_IEXEC) | ||
| monkeypatch.setenv("PATH", f"{tmp_path}{os.pathsep}{os.environ['PATH']}") |
| ) | ||
| try: | ||
| output = check_output(uv_command) | ||
| except CalledProcessError: |
| try: | ||
| check_output(command, shell=shell) | ||
| except CalledProcessError as error: | ||
| except CalledProcessError as uv_error: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces several documentation updates and configuration changes to improve the developer experience and clarify project workflows. The most significant addition is a detailed implementation plan for adding a fallback from
uvtopipin thedependencepackage, ensuring robust package management even whenuvis unavailable or fails. Additional changes include new documentation for project architecture and conventions, updates to workflow permissions, and the introduction of a new Claude plugin and skill.Documentation and Project Architecture:
AGENTS.mddetailing the architecture, commands, and conventions of thedependenceproject, including its CLI structure, testing strategy, and guidelines for contributors.CLAUDE.mdas a reference pointer toAGENTS.mdfor agentic workers.docs/superpowers/plans/2026-07-29-uv-shim-pip-fallback.mdfor supporting fallback fromuvtopipin key package management functions, including test strategies, code changes, and release steps.Configuration and Workflow:
.github/workflows/test.ymlto explicitly setcontents: readpermissions and added asuccessjob that reports when all tests and linting pass. [1] [2].claude/settings.json.fableplanin.claude/skills/fableplan/SKILL.md, allowing per-user toggling of "Fable Plan Mode" for advanced planning and execution workflows.