Skip to content

ci: pr-status reads at most 100 changed files, so a moved base's overlap with a large PR can be missed #4114

Description

@schlessera

Context

Found while implementing #4110.

scripts/pr-status.ts reads a pull request's changed files with gh pr view <pr> --json ...,files,... (scripts/pr-status.ts:94-95) and uses the list to report which files a moved base gained that the pull request also changes (baseGained.overlapsThisPr, scripts/pr-status.ts:152-153).

gh pr view --json files returns at most 100 files. Observed with gh 2.103.3 on merged PR #3979, which changed 487 files: gh pr list --json changedFiles reported 487 and gh pr view 3979 --json files --jq '.files|length' printed 100.

On a pull request that changes more than 100 files, overlapsThisPr can therefore miss a real overlap and read as "the base moved, but not under this PR".

Scope

  • Read the complete changed-file list in scripts/pr-status.ts, or report that the list is incomplete when changedFiles exceeds the number of files returned, so that an empty overlapsThisPr is never read as "no overlap" on a truncated list.

Out of scope

  • scripts/integrate.ts and scripts/review-receipt.ts: they read the Git diff, not this list.
  • Any other field pr-status prints.

Acceptance criteria

  • For a pull request whose changed-file count exceeds what one gh pr view --json files call returns, pr-status --expect-base either names every overlapping file or states that the overlap list is incomplete. A test in scripts/skill-tests/pr-status.test.ts fails before the change.
  • A pull request with 100 files or fewer prints the same output as today.

Verification

  • bun run test:skills

Contract impact

None. Repository tooling only.

2026-11-17 triage at main 9e7429a91: re-pointed the gh pr view call and the overlapsThisPr line to their current positions. Re-observed the limit with gh 2.103.3: gh pr view 3979 --json files,changedFiles still returns 100 files against changedFiles 487.

Activity

  1. added
    type: fix
    area: ci
    priority: p2
    agent-ready
    on Nov 17, 2026
  2. self-assigned this
    on Nov 17, 2026
  3. schlessera commented on Nov 17, 2026

    @schlessera
    OwnerAuthor

    Claimed for implementation. Claim token: claim-c3e81ead. Branch: fix/4114-pr-status-complete-files.

    no path collisions on scripts/pr-status.ts or its test; closure-only reports from open drafts

  4. added this to the 0.45.0 milestone on Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

agent-readyarea: cipriority: p2type: fix

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions