Skip to content

fix(roadmap): plan-check reads the shared FETCH_HEAD #5255

Closed

Description

@dan-petty

Problem Description

devops roadmap plan-check <pr> fetches refs/pull/<n>/head and then reads FETCH_HEAD (src/devops_cli/roadmap/plan_check.py:485-486). All worktrees of a checkout share FETCH_HEAD. When another agent or process fetches between the two commands, plan-check reads the tree of a different commit. It then reports a false problem, such as "The head holds no change folder".

The command already holds the head SHA of the pull request (facts.head_sha), so it does not need FETCH_HEAD.

Reproduction Steps

  1. In one worktree, run uv run devops roadmap plan-check 5105 --json.
  2. At the same time, run git fetch in another worktree of the same checkout.
  3. On 2026-11-12, the first run of step 1 reported "The head holds no change folder". A second run gave [], and the plan reader read the head OK.

Expected vs Actual Behavior

Expected: plan-check reads the tree of the head SHA that the pull request names, for example git fetch origin <sha> or refs/pull/<n>/head:<private ref> and then rev-parse of that SHA. A parallel fetch does not change the result.

Actual: a parallel fetch can give a false problem.

Environment Diagnostics

Main at 0a14161 (release 0.123.0). Several agents work in worktrees of one checkout.

Logs, Traces, or Terminal Output

Plan PR #5105 at head 23dc194: first run "The head holds no change folder"; second run [].

Source: #5105

Activity

  1. added
    source/agent
    type/bug
    scope/roadmap
    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-review
    and removed
    status/new
    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
  6. devops-cli-service commented on Nov 15, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-15 13:55 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/roadmapsource/agenttype/bugvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions