Repository navigation
feat(review-by-harness): clean up review worktrees once incorporated - #291
Merged
Merged
Conversation
run.sh left the worktree, its branch and refs/review-by-harness/pr<N> behind after every review (ten refs from merged PRs had piled up), and dev-process-lite said to remove the worktree without saying when, while assess-run still read the report from inside it. cleanup.sh archives .review-round, keeps a fix diff that is not yet on the PR branch, and --prune clears reviews of merged or closed PRs without touching open ones. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ne integration and Cursor run ids run.sh force-removed review-pr<N>-<harness> on start, so two sessions reviewing the same PR deleted each other's worktree, and a second round silently dropped a fix pass's uncommitted diff. Both scripts now take a per-PR, per-harness flock, and run.sh refuses to reset over a fix diff. dev-process-lite now says how worker branches become the reviewed PR and what a Cursor overseer names its run directory. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex (gpt-6.2-sol, high) found 14 issues; all verified. cleanup.sh no longer writes inside the PR-controlled worktree, keeps the worktree when archiving fails, archives binary-safe diffs and new files against the reviewed commit (so a fix the harness committed counts), finds reviews from any checkout, asks GitHub about origin's repo, deletes only the branch of a worktree it removed, holds the ref while any run holds a lock, and runs on Bash 3. run.sh marks a fix pass before it starts. dev-process-lite scopes the closeout cleanup to the run's own reviews, covers independent PRs, and asks for a session name only from Claude. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex round 2 (gpt-6.2-sol, high) at c3073fb found 12 issues; all verified. Cleanup now leaves PR state UNKNOWN unless origin resolves to a GitHub repo (SSH-over-443 included, REVIEW_GH_REPO to override), keeps an older review whose reviewed commit cannot be established, touches only worktrees run.sh made, reads worktree paths with spaces, refuses an archive inside the worktree it removes, publishes an archive only when complete, no longer prunes unrelated worktree registrations, holds a per-PR lock with run.sh over the shared ref, and reports failed branch and ref deletions. run.sh ignores PR-tracked scratch metadata. Cursor run ids get a random suffix. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
skills/review-by-harness/cleanup.sh: removes a review's worktree,review-pr<N>-<harness>branch andrefs/review-by-harness/pr<N>once findings are incorporated.--archive DIRwrites a complete archive outside the checkout first (report, reviewed commit, binary-safe fix diff, new files). A fix on an open PR is kept until--discard.--pruneis maintenance for merged/closed PRs only.run.sh: per-PR, per-harnessflockso concurrent reviews can't delete each other's worktree; a per-PR lock over the shared ref; refuses to reset over an earlier fix pass's changes (fix-started,reviewed-head).Evidence for the gap: the shared checkout held 11
refs/review-by-harness/prNrefs for merged PRs 263 to 290 (pruned with this script).Independent review
No third round (owner rule: at most two). Round 2 findings were local hardening, none changed the design; each fix has a bats test.
Test plan
bash tests/bats/run.sh review-by-harness-cleanup.bats: 24 testsbash tests/bats/run.sh: exit 0 at ab5fca7 (includes fix(secrets): append missing keys instead of rebuilding the store #289)🤖 Generated with Claude Code