Skip to content

ci: pr-status misses a moved base's change to a file the pull request renames #4152

Closed

Description

@schlessera

Context

Found while implementing #4114 (PR #4151).

bun scripts/pr-status.ts <pr> --expect-base <sha> reports in baseGained.overlapsThisPr which of the files a moved base gained the pull request also changes. It matches the base's files against the paths the pull request changes (changedFiles in scripts/pr-status.ts, as of PR #4151; before it, the files field of gh pr view).

Both sources name a file the pull request renames by its new path only. Observed with gh 2.103.3 on merged PR #3483, which renamed experiments/turn-surface-capture.parked.ts to experiments/turn-surface-capture.test.ts:

  • gh pr view 3483 --json files lists experiments/turn-surface-capture.test.ts and not the old path.
  • gh api repos/<owner>/<repo>/pulls/3483/files lists the entry with status: "renamed", filename the new path and previous_filename the old one.

A base that moved by changing the old path lists that old path in its comparison. It matches nothing in the pull request's list, so overlapsThisPr does not name it, although the pull request renames the very file the base changed. That is one of the overlaps most likely to need a rebase.

This is independent of the size of the pull request, and it is not the truncation #4114 fixed.

Scope

  • Count a renamed file's previous path as changed by the pull request when computing baseGained.overlapsThisPr.

Out of scope

  • The other direction, a base that renames a file the pull request edits: the comparison's own entries would need the same treatment and a decision on which path to print. File separately if wanted.
  • Any other field pr-status prints.
  • scripts/integrate.ts and scripts/review-receipt.ts: they read the Git diff.

Acceptance criteria

  • When the base gained a change to a path that the pull request renames away from, pr-status --expect-base names that path in baseGained.overlapsThisPr. A test in scripts/skill-tests/pr-status.test.ts fails before the change.
  • A pull request with no renamed file prints the same output as before.

Verification

  • bun run test:skills

Contract impact

None. Repository tooling only.

Activity

  1. added
    type: fixSomething is broken and must behave the way it is documented.
    area: ciCI workflows, the gates they run, release scripts, packaging.
    on Nov 17, 2026
  2. self-assigned this
    on Nov 17, 2026
  3. 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

area: ciCI workflows, the gates they run, release scripts, packaging.type: fixSomething is broken and must behave the way it is documented.

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions