Skip to content

fix(infra): find the checkout of an infra repo from a worktree #5195

Closed

Description

@dan-petty

Problem Description

devops infra onboard, status and plan find the checkout of an infra repo at <repos.base_dir>/<owner>/<name> when the entry of infra.repos has no path. default_checkout in src/devops_cli/infra/onboard.py resolves a relative repos.base_dir (default repos) against the working folder of the process (Path.resolve()). In a git worktree of devops-cli, such as .data/agent/worktrees/<name>, the command looks for <worktree>/repos/<owner>/<name> and stops, although the checkout is at <main checkout>/repos/<owner>/<name>.

Other commands resolve the same setting in other ways: devops workspace resolves it against the project root (src/devops_cli/commands/workspace.py), and the data paths resolve under the main worktree (resolve_data_path). Agents work in worktrees, so each agent must give --path to every devops infra command.

Reproduction Steps

  1. Make a worktree of devops-cli under .data/agent/worktrees/<name>, with a checkout of an infra repo at <main checkout>/repos/<owner>/<name> and an entry of infra.repos with no path.
  2. In the worktree, run uv run devops infra status <owner>/<name> --ping.

Expected vs Actual Behavior

Expected: a relative repos.base_dir resolves to one folder from every worktree of the repository, as the data paths do (the main worktree), and the command finds the checkout.

Actual: the command stops with "No checkout of the infra repo / is at /repos//. Clone it there, or give its folder with --path."

Environment Diagnostics

  • DevOps CLI Version: 0.121.1 (origin/main at aeb33d6, 2026-11-12)
  • Python Version: 3.14.10
  • OS & Architecture: Debian devcontainer on WSL2, x86_64
  • Execution Environment: DevContainer

Logs, Traces, or Terminal Output

$ uv run devops infra status dan-petty/homelab --ping
✗ No checkout of the infra repo dan-petty/homelab is at <worktree>/repos/dan-petty/homelab. Clone it there, or give its folder with --path.

Found while building #5124.

Pre-Submission Checklist

  • I have verified that no sensitive credentials, private keys, or internal tokens are contained in this issue report.
  • I have checked existing issues and pull requests to ensure this is not a duplicate.

Activity

  1. added
    source/agent
    type/bug
    scope/infra
    status/new
    value/medium
    effort/low
    on Nov 12, 2026
  2. dan-petty commented on Nov 12, 2026

    @dan-petty
    OwnerAuthor
  3. added
    priority/p2-medium
    status/in-progress
    status/in-review
    and removed
    status/new
    status/in-progress
    on Nov 12, 2026
  4. removed
    status/in-review
    on Nov 15, 2026
  5. devops-cli-service commented on Nov 15, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-15 12:41 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/lowpriority/p2-mediumscope/infrasource/agenttype/bugvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions