Skip to main content
Manus에서 모든 스킬 실행
원클릭으로

worktree-historical-test-replay-missing-dirs

스타2
포크0
업데이트2026년 7월 8일 12:17

Fix `pytest exit 4` ("file or directory not found") when running a test command in a git worktree checked out at an OLD commit. Use when: (1) you're doing historical replay (incident replay, mutation testing, git bisect with tests) and the suite errors out in 1-2 seconds with no test execution, (2) the test command works fine at HEAD but fails at pre-fix SHAs, (3) `pytest scripts/overnight/tests/ goal/tests/ --tb=no -q` returns "ERROR: file or directory not found: scripts/overnight/tests/" at an old SHA, (4) you're building tooling that runs the project's canonical test command across multiple historical SHAs. The fix is NOT to add the missing dir back — it didn't exist then. The fix is to filter the test-dir list at each SHA to only those that exist in that commit's tree, then invoke pytest with the filtered list. If none survive, classify the SHA as "unrunnable" rather than failing the whole replay.

설치

Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.

SKILL.md
readonly