Repository navigation
Description
Problem
devops pr check-readiness and devops pr ready cannot judge the change folder of a pull request that changes more than 300 files. They read the file list from the GitHub compare reply, which holds at most 300 files, and report the pull request as blocked.
Evidence
#7317 changes 503 files and adds its archived change folder. The tool reported "is not judged on its change folder" while GitHub reported the pull request as mergeable and clean.
Done when
- The check reads every changed file, for example with the paged list of the files of the pull request or with local git, and judges a pull request above 300 files. A test fails on the base.
Alternatives check of 2026-11-26: none.
Tool: none found.
Reason: Searches found only GitHub SDKs and CI actions that can page a PR file list; none judges a change folder, and the issue's own remedy is internal paging of the PR files endpoint or local git.
Lacks:
- No readiness verdict on a change folder
- Adds a GitHub SDK dependency for one paginated call
- CI action needs a workflow step outside the CLI
Proposed design
Problem statement
devops pr check-readiness and devops pr ready judge a pull request's change folder from the compare answer of the tip of its base branch and its head commit. GitHub lists at most 300 files of one comparison, so a pull request that changes more files (503 in #7317) is reported as not judged on its change folder, although GitHub reports it mergeable. The fix completes a compare answer that holds the limit with the local three-dot diff at the compare's own merge base, so the check reads every changed file while still reading the merge-base diff rather than the pull request's stale file list.
Acceptance criteria
Requirement: File list above the compare limit
The readiness check SHALL judge the change folder of a pull request that changes more than 300 files.
Scenario: 503 changed files
- WHEN the doubled GitHub session returns a compare answer of 300 files, and the doubled process edge answers the three-dot
git diff --name-status -z --find-renameswith 503 files whose last entry adds the archived change folder of the issue - THEN the verdict holds no blocker that the pull request is not judged on its change folder, and holds no blocker that it adds no file to the change folder
Requirement: Completion at the compare's merge base
The check SHALL complete a compare answer that holds CONST_GITHUB_COMPARE_FILES_LIMIT files with the three-dot diff of the merge base that the answer gives and the head commit.
Scenario: The git command
- WHEN a test runs the readiness check for a pull request whose compare answer holds 300 files and gives the merge base
abc123 - THEN the process edge records
git diff --name-status -z --find-renames abc123...<head-sha> --and the check holds the files of that answer
Requirement: No pulls files request
The readiness run MUST NOT read the changed files from the pulls files endpoint.
Scenario: A compare answer at the limit
- WHEN a test runs the readiness check for a pull request whose compare answer holds 300 files
- THEN the session receives no request whose path ends with
/pulls/<number>/files, and the changed files come from the three-dot diff
Requirement: Unreadable local diff
When the three-dot diff lists no file, the check SHALL report the file list as possibly truncated and MUST NOT report the change folder as absent.
Scenario: No checkout of the head
- WHEN the compare answer holds 300 files and the doubled process edge answers the three-dot
git diffwith a failed status and no output - THEN the verdict holds the truncation blocker that names 300 files and holds no blocker that the pull request adds no file to the change folder
Requirement: Git statuses read as GitHub statuses
The completion MUST give each file the status that the readiness rules read, a deleted file as removed and a rename's old path as its previous filename.
Scenario: A deleted active change folder
- WHEN the three-dot diff lists
D openspec/changes/1234-a-change/proposal.mdandA openspec/changes/archive/2026-11-28-1234-a-change/proposal.md - THEN the completion gives the first file the status
removedand the secondadded, and the verdict names the archived folder as the change the pull request adds
Requirement: Regression test on the base
The new test MUST fail on the base commit and pass with the fix.
Scenario: Test at the base commit
- WHEN the new test of the 503-file case runs against the base commit
- THEN the test fails because the check reports that the pull request is not judged on its change folder
Existing Tool Considered
git, the open tool the project already runs through list_changed_files (src/devops_cli/git/operations.py:597, command src/devops_cli/git/operations.py:580), covers the need: its --name-status -z --find-renames three-dot diff at the compare's merge base lists every changed file with its status and rename source, and it adds no dependency. What it lacks is a network read: it lists nothing when the checkout does not hold the head commit and the merge base. So the GitHub session (gidgethub, ADR 0006) still reads the compare for the merge base and the first 300 files, and an empty git list keeps the truncation blocker instead of judging a short list. The change is glue only: map ChangedFile.change_type onto GitHub's status vocabulary and pass the repository root that the readiness run already finds (src/devops_cli/github/merge_readiness.py:716). Written cost: about 20 000 tokens and 1.5 hours to build, keep and fix until it matches, with no SDK dependency and no workflow step, so the lacks of the alternatives block are not taken on.
Key questions
- How does the check read every changed file of a pull request that changes more than 300 files?: Keep the compare of the base branch and the head commit as the primary read. When the answer holds
CONST_GITHUB_COMPARE_FILES_LIMITfiles, complete the list with the local three-dot diff of the merge base that the compare answer gives and the head commit, throughlist_changed_files, which runsgit diff --name-status -z --find-renames <merge-base>...<head> --. A non-empty list replaces the truncated one; an empty list leaves today's truncation blocker. (best practice) [sources: openspec/specs/pr-merge-readiness/spec.md:154, src/devops_cli/github/merge_readiness.py:396, src/devops_cli/github/client.py:732, src/devops_cli/git/operations.py:597, src/devops_cli/git/operations.py:580]- Chosen: Compare, completed by the local three-dot diff at the compare's merge base. It reads the same merge-base diff the living requirement names, it needs no new dependency, and the three-dot diff is the one git command the project already runs for a changed file list.
- Rejected: Paged pull request files endpoint. It reads the pull request's own diff, whose base is stale after a merge commit moves the merge base, which is the false not-grounded blocker that fix(github): Fix check-readiness base and monitor merged state #2530 fixed; the living requirement forbids a pulls files request and the archived design rejects this fallback.
- Rejected: GitHub SDK or CI action. The alternatives block names both: they add a dependency or a workflow step and judge no change folder.
- What file cap does the compare reply have?: The compare answer holds at most 300 files of one comparison and has no paging, so the client marks a list of 300 or more as possibly truncated. The answer also gives the merge base commit, which the local completion uses. [sources: src/devops_cli/config/constants.py:1096, src/devops_cli/github/client.py:740, src/devops_cli/github/client.py:748, src/devops_cli/github/client.py:469]
- How does the test read the file list with no network?: The test doubles the GitHub session at its seam and the process seam that
list_changed_filesruns git through,run_subprocessinsrc/devops_cli/git/operations.py, and asserts the verdict. ADR 0007 allows doubling a process edge, and docs/TESTING.md states that every edge is faked through its seam. [sources: docs/adr/0007-tests-double-only-process-edges.md, docs/TESTING.md, src/devops_cli/git/operations.py:610, tests/support/fakes/process.py:167] - What does the check report when the local diff cannot complete the file list?: It keeps the truncation blocker, which names GitHub's limit of 300 files and the
git diffcommand to run in a checkout of the branch, and it reports no absent change folder. A partial list never yields a verdict. (best practice) [sources: src/devops_cli/roadmap/grounding.py:216, src/devops_cli/lang/en/messages.py:2018, openspec/changes/archive/2026-11-13-2530-readiness-compare-from-base-branch/design.md:31]- Chosen: Keep the truncation blocker. The check cannot know the whole list, and a wrong 'adds no file to the change folder' verdict is the failure the issue fixes.
- Rejected: Treat the 300-file answer as whole. It reports the wrong verdict on every pull request above 300 files.
- Rejected: Fall back to the pulls files endpoint. That endpoint's stale base is the false not-grounded blocker that fix(github): Fix check-readiness base and monitor merged state #2530 fixed, and the living requirement forbids it.
- Does the readiness run have a checkout whose git can list the merge-base diff?: Yes in the normal run:
assess_merge_readinessalready finds the repository root for the perimeter advisory, and the truncation message tells the reader to run the git diff in a checkout of the branch. When the checkout holds neither the head commit nor the merge base,list_changed_fileslists nothing and the blocker stays. [sources: src/devops_cli/github/merge_readiness.py:716, src/devops_cli/lang/en/messages.py:2019, src/devops_cli/git/operations.py:604]
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 26, 2026
Both fix check-readiness reading a wrong file list from the GitHub API, but #2530 fixes a stale base while the candidate fixes the 300-file cap.devops-cli-service commentedon Nov 26, 2026
The result in the alternatives block of the issue body changed. Before this check: no check. A person decides what the new result means for the item.
Searches (8)
Tools considered:
Searches run:
Sources:
devops-cli-service commentedon Nov 28, 2026
Next step: the stage job writes the plan of the item. See the section Proposed design of the body.
devops-cli-service commentedon Nov 29, 2026
Released in v0.242.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.242.0
devops-cli-service commentedon Nov 29, 2026
Live since 2026-11-29 03:13 UTC