Skip to main content

uv-worktree-venv-fallthrough

Fix for phantom Python test failures in fresh git worktrees of uv-managed projects, caused by `uv run` falling through to a PATH-resolved command (e.g. homebrew Python 3.9's pytest) when the worktree's `.venv` doesn't have the command installed. Use when: (1) `uv run pytest --collect-only -q` in a freshly-created worktree reports `ModuleNotFoundError: No module named 'msgspec'` (or any other project runtime dep) on test files that import the package; (2) you see `ImportError: cannot import name 'UTC' from 'datetime'` or `dataclass() got an unexpected keyword argument 'slots'` despite `pyproject.toml` requiring Python 3.10+/3.12+; (3) the same `uv run pytest` succeeds on the main worktree but fails on a sibling worktree; (4) `which pytest` (or `which ruff`, `which mypy`) inside the worktree resolves to `/opt/homebrew/bin/...` instead of `<worktree>/.venv/bin/...`; (5) you're orchestrating parallel agents in worktree-isolation mode and they report wildly inconsistent test results vs the main tree. Root cause is

설치로 이동

소스 정보

저장소
cajias/claude-skills
최근 소스 활동
2026년 7월 20일 07:29
감지된 SKILL.md 언어
영어
스타
0
포크
0

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.