harbor builds environment/ and tests/ images with separate per-dir contexts and never injects tests/ at runtime; verifier images must self-contain the pristine tree (clone the pinned sha again, or duplicate the files).
When authoring harbor (swe-bench-shaped) task dirs: the environment image builds with context = /environment/ (Dockerfile at environment/Dockerfile), and a separate-mode verifier (environment_mode = "separate") builds with context = /tests/ (harbor trial.py _verifier_env_build_context returns tests_dir; docker.py sets context_dir = environment_dir). There is NO runtime injection of the host tests/ dir into the verifier container — paths.verifier_dir in the mount list is the trial OUTPUT dir, not the task's tests/. Consequence: a verifier that needs a pristine copy of the project tree must obtain it inside tests/Dockerfile itself.
Fix pattern: for tasks derived from real repos, git clone the same pinned base commit in BOTH environment/Dockerfile and tests/Dockerfile (this is why swe-bench task sets clone twice). For hermetic/self-contained tasks, ship the source tree as files in each build context (environment/app/ and tests/app/) and guard the duplication with an oracle/nop check — drift breaks the agent-patch apply and fails loudly.