A detached worktree of rev in which the unit’s module is deleted or replaced.
The worktree lies in a temporary directory outside the repository, so scoring never writes into the working tree. Every phase of scoring takes a worktree of its own: what a candidate writes while it runs (a consumer, a conftest.py, a test file) dies with the worktree and cannot reach a later phase.
AbstractContextManager[Path]: Entering it gives the project inside the worktree (the worktree itself for a project at the top of the repository); the worktree is removed again on exit, also after an error.