feat(commands): add /test-pr — prepare an open PR for local human testing - #41
Merged
Conversation
…ting Adds a project-agnostic /test-pr <n> command + prepare-pr.sh helper that checks out an open PR's head into an isolated, detached, ready-to-run worktree (deps built via the new gates.json humanTest.prepare) and prints humanTest.launch. Motivation: reviewers testing bot PRs from the main working tree run code that does NOT contain the unmerged change, then report 'the fix doesn't work'. This gives a one-shot, stale-proof way to run the actual PR branch in isolation. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0193Wc7aqPQvNqVZjcndBaf6
robercano
approved these changes
Jul 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a project-agnostic
/test-pr <pr-number>command and itsprepare-pr.shhelper.Given a PR number it:
humanTest.worktreeDir/pr-<n>(default.worktrees/pr-<n>) — isolated from the main checkout and from any agent worktree already on that branch;humanTest.prepare(install/build) inside it and printshumanTest.launchfor the reviewer to run.New
.claude/gates.jsonconvention (humanTest.prepare/launch/worktreeDir) makes it project-agnostic; example added toexamples/ts-solidity-foundry/gates.jsonand documented indocs/USAGE.md.Why
Reviewers testing bot PRs from their main working tree run code that does not contain the unmerged change, conclude "the fix doesn't work", and bounce the PR — a real loop we just hit. This gives a one-shot, stale-proof way to run the actual PR branch, at the exact pushed SHA, in isolation.
Notes
main. Detached checkout avoids git's "branch already checked out" error.🤖 Generated with Claude Code