Skip to content

fix(pr): review all changed files in large PRs - #106217

Merged
steipete merged 1 commit into
mainfrom
codex/fix-pr-review-changed-file-count
Jul 13, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/fix-pr-review-changed-file-count

Conversation

@steipete

Copy link
Copy Markdown
Contributor

Related: #105937

What Problem This Solves

Fixes an issue where maintainers reviewing PRs with more than 100 changed files could receive incomplete path metadata. During #105937, scripts/pr review-init reported 100 files for a 342-file PR, so path-based behavioral-review guards could miss runtime files beyond the first page. The command also printed an empty PR URL.

Why This Change Was Made

The PR helper now paginates the changed-files REST endpoint, preserves the existing file metadata shape, and verifies both the PR head SHA and expected file count before accepting the result. Any force-push, API cap, or incomplete page set fails closed. Review initialization prints the URL captured in the same metadata snapshot.

User Impact

No product runtime impact. Maintainers can review large PRs with complete changed-file coverage, accurate counts, and a usable PR link.

AI-assisted: yes (Codex). I reviewed the complete patch and understand the changes.

Evidence

  • Before: raw GitHub CLI metadata for refactor: remove dead plugin loader exports #105937 reported changedFiles: 342 but returned only 100 entries in files; review-init printed an empty pr_url.
  • After: a live pr_meta_json 105937 probe returned 342/342 paths, from scripts/deadcode-exports.baseline.mjs through test/scripts/test-live-shard.test.ts.
  • Blacksmith Testbox run 29237199694: pnpm test test/scripts/pr-metadata.test.ts — 3/3 passed on exact head 05f75b8bdecc2d44c4a401193756a471b3c12eaa.
  • Regression coverage: multi-page collection, incomplete-page rejection, and PR-head-change rejection.
  • bash -n scripts/pr-lib/worktree.sh scripts/pr-lib/review.sh
  • git diff --check
  • Fresh structured autoreview: clean, no accepted/actionable findings.

@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: S maintainer Maintainer-authored PR labels Jul 13, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

Land-ready proof for 05f75b8bdecc2d44c4a401193756a471b3c12eaa:

  • Blacksmith Testbox run 29237199694: pnpm test test/scripts/pr-metadata.test.ts — 3/3 passed on exact head.
  • Live probe against refactor: remove dead plugin loader exports #105937 returned all 342 changed paths, including the former tail file.
  • bash -n scripts/pr-lib/worktree.sh scripts/pr-lib/review.sh passed.
  • git diff --check passed.
  • Fresh structured autoreview: clean, no accepted/actionable findings.
  • Repo-native review artifacts: READY FOR /prepare-pr, zero findings; best-fix judgment recorded.

Known hosted-CI gap: run 29237327268 hit TS1117 duplicate locale keys in 20 ui/ files already present on main. This PR changes only scripts/pr-lib/{review,worktree}.sh and test/scripts/pr-metadata.test.ts; the unrelated locale regression is already covered by #106212 and generated refresh #106214.

@steipete
steipete merged commit 22daf8f into main Jul 13, 2026
105 of 114 checks passed
@steipete
steipete deleted the codex/fix-pr-review-changed-file-count branch July 13, 2026 09:02
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR scripts Repository scripts size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant