Repository navigation
Closed
0 / 10 of 1 issue completed
Copy link
Labels
effort/mediumEffort Mediumpriority/p2-mediumPriority P2: standard workscope/githubGitHub Projects v2, Views, Milestones, Labels, and PR automationsource/agentFiled by an agenttype/bugType bug: the code does not do what it mustvalue/mediumValue Medium
Description
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:
src/devops_cli/roadmap/stage/stage_ready.py(near line 114) reads the plan pull request diff withget_pr_diff, andsrc/devops_cli/release/merge_candidate.py(near line 244) readspulls/{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.- After PR fix(review): review a pull request at the merge base of its base branch #5387,
devops review pranddevops ai analyze prcompare<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=1givesstatus: behindand 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}/fileslist (the merged state is fixed), and keep the compare read for an open pull request.
Acceptance criteria
- A test with a payload
base.shathat is not the merge base shows that stage readiness and the merge candidate read only the changes of the pull request. It fails onmain(devops ci fail-to-pass). - A test with a pull request that a merge commit merged shows that
devops review prreads 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
Collapse Sub-issuesSub-issues
Loading 1 sub-issues
Metadata
Metadata
Assignees
Labels
effort/mediumEffort Mediumpriority/p2-mediumPriority P2: standard workscope/githubGitHub Projects v2, Views, Milestones, Labels, and PR automationsource/agentFiled by an agenttype/bugType bug: the code does not do what it mustvalue/mediumValue Medium
Activity
dan-petty commentedon Nov 13, 2026
Both fix stale-base PR change reads, but #5346 fixed the review command while the candidate fixes stage readiness and merge candidate.dan-petty commentedon Nov 13, 2026
Scope split, checked on 2026-11-13:
5388-pr-change-reads-merge-basemoves the Jev diff of stage readiness and the file read of the release merge candidate to the compare of the base branch and the head commit.devops review pranddevops ai analyze prfrombase.refis only in the open change of fix(review): Review a pull request at the merge base of its base branch #5346. Onmain,devops review prreads the pulls diff, which holds the files of a merged pull request, so the gap is not onmain. A fix onmainnow stacks on an open pull request. fix(review): read a merged pull request from its merged state #5397 starts after the change of fix(review): Review a pull request at the merge base of its base branch #5346 merges.refactor(github): define get_compare_diff once (#5405)
devops-cli-service commentedon Nov 13, 2026
Released in v0.127.1: https://github.com/dan-petty/devops-cli/releases/tag/v0.127.1
devops-cli-service commentedon Nov 13, 2026
Live since 2026-11-13 12:38 UTC