"""Shared fixtures for the worktree test suite.

Worktree tests need a real git repo with at least one commit on a
ref we can pass as `base_ref` to `git worktree add`. The `seeded_repo`
fixture delegates to `attractor.testing.create_test_repo` so the
helper hosts use is exercised on every CI run.
"""

from pathlib import Path

import pytest

from attractor.testing import create_test_repo


@pytest.fixture()
def seeded_repo(tmp_path: Path) -> Path:
    """A repo at `tmp_path / repo/` with one commit on `main`.

    Returns the repo root path; tests instantiate the manager via
    `WorktreeManager(seeded_repo)`.
    """
    return create_test_repo(tmp_path / "repo")
