Skip to content

fix(pr): keep older contributor worktree checkouts within OS argument limits - #129169

Merged
steipete merged 1 commit into
mainfrom
codex/fix-pr-worktree-arg-max
Aug 25, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/fix-pr-worktree-arg-max

Conversation

@steipete

Copy link
Copy Markdown
Contributor

Related: #120114

What Problem This Solves

Fixes an issue where maintainers reviewing older contributor pull requests could not check out the contributor branch when the intervening changes exceeded the operating system's command-line argument limit. PR #120114 reproduced the failure with 20,667 changed paths and an Argument list too long error, leaving its valid review-transition journal unrecoverable through the native maintainer workflow.

Why This Change Was Made

Keep recovery at its existing journal owner and stream NUL-delimited filenames to Git instead of expanding every filename into the shell argument list. Git's literal-pathspec mode preserves the previous literal-filename contract, and existing foreign-state, ignored-file, reserved-artifact, interrupted-transition, and exact-tree guards remain unchanged.

User Impact

No end-user product behavior changes. Maintainers can review and land older contributor branches without hitting platform argument limits or weakening worktree-containment safeguards.

Evidence

  • Before the production change, the existing real-Git containment regression failed with Argument list too long; after the change, the same regression passes with bounded arguments and a literal wildcard-containing filename.
  • node scripts/run-vitest.mjs test/scripts/pr-worktree-containment.test.ts --run: 12 passed.
  • pnpm exec oxfmt --check scripts/pr-lib/worktree.sh test/scripts/pr-worktree-containment.test.ts, bash -n scripts/pr-lib/worktree.sh, and git diff --check passed.
  • Production: +4/-7 (net -3). Tests: +9/-0.
  • Full-diff structured review and a separate read-only independent review reported no blocking findings.

@clawsweeper

clawsweeper Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: XS maintainer Maintainer-authored PR labels Aug 25, 2026
@steipete
steipete marked this pull request as ready for review August 25, 2026 08:46
@steipete
steipete merged commit bea9084 into main Aug 25, 2026
201 checks passed
@steipete
steipete deleted the codex/fix-pr-worktree-arg-max branch August 25, 2026 09:02
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

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: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant