Skip to content

fix(github): the other pull request change readers still use a stale base #5388

Closed
0 of 1 issue completed

Description

@dan-petty

Problem

Two readers of pull request changes still use the payload base.sha or the pulls/{n}/files endpoint, and the new compare reads have one gap:

  1. src/devops_cli/roadmap/stage/stage_ready.py (near line 114) reads the plan pull request diff with get_pr_diff, and src/devops_cli/release/merge_candidate.py (near line 244) reads pulls/{n}/files. When a merge into the base branch moves the merge base, these reads can hold files that the pull request does not change, the defect that fix(github): Fix check-readiness base and monitor merged state #2530 (readiness, PR fix(github): correct readiness files and merged monitor output #5349) and fix(review): Review a pull request at the merge base of its base branch #5346 (review, PR fix(review): review a pull request at the merge base of its base branch #5387) fixed.
  2. After PR fix(review): review a pull request at the merge base of its base branch #5387, devops review pr and devops ai analyze pr compare <base.ref>...<head>. For a pull request that was merged with a merge commit or a fast-forward, the head is an ancestor of the base tip, so the comparison lists no files and the review is empty. Live: compare/main...f299667c9?per_page=1 gives status: behind and 0 files. This repository squash-merges, so the gap shows only in repositories that allow merge commits.

Proposed fix

  • Move the two readers of item 1 to the shared compare read of the GitHub client, after a live check that their merge base can move.
  • For a merged pull request, read the changes from its merge commit or from the pulls/{n}/files list (the merged state is fixed), and keep the compare read for an open pull request.

Acceptance criteria

  • A test with a payload base.sha that is not the merge base shows that stage readiness and the merge candidate read only the changes of the pull request. It fails on main (devops ci fail-to-pass).
  • A test with a pull request that a merge commit merged shows that devops review pr reads its files.

Existing tool considered

The GitHub compare and pulls APIs. No new tool. Cost: about 150,000 tokens, 2 hours elapsed.

Source: #5387

Sub-issues

Sub-issues

0 of 1 Issues completed
Loading 1 sub-issues

Activity

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

    @dan-petty
    OwnerAuthor
  3. added
    priority/p2-medium
    owner/agent
    status/in-progress
    and removed
    status/new
    on Nov 13, 2026
  4. dan-petty commented on Nov 13, 2026

    @dan-petty
    OwnerAuthor

    Scope split, checked on 2026-11-13:

  5. added
    status/in-review
    and removed
    status/in-progress
    on Nov 13, 2026
  6. removed
    status/in-review
    owner/agent
    on Nov 13, 2026
  7. devops-cli-service commented on Nov 13, 2026

    @devops-cli-service
    Contributor
  8. devops-cli-service commented on Nov 13, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-13 12:38 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/mediumpriority/p2-mediumscope/githubsource/agenttype/bugvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions