Repository navigation
Refuse a Branch Delete Another Open Pull Request Uses and Drop the Hand-Form Delete - #2988
Conversation
…nd-Form Delete The cleanup subcommand reads open pull requests headed or based on the branch and refuses naming them. The drive-pr and merge-and-release skills drop the direct delete and report it to the maintainer where cleanup cannot run, so cleanup holds every check. A test now asserts the failed rules read prints its stderr and exit code. Fixes #2969 Fixes #2971 Fixes #2983 Co-Authored-By: Claude Opus 5.5 <[email protected]>
… Read Filter the open pull request read to heads in this repository, document the refusal in the cleanup usage, remove the drive-pr references to the deleted hand form, and test the unanswered, overflow, and fork cases. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
A recorded local strict-review pass covers head |
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🟡 Changes recommended
Three unresolved review findings remain.
2 open findings
What changed in this PR
This PR centralizes branch-deletion safety in pr_review.py cleanup and removes manual deletion fallbacks.
Changes:
- Checks open pull requests using the branch as head or base.
- Adds refusal and diagnostic tests.
- Updates canonical/generated skills and source digests.
Review findings:
scripts/pr_review.py:5916— P1 / moderate, 4 votes: count only same-repository head pull requests..agents/skills/drive-pr/SKILL.md:101— P2 / moderate, 2 votes: remove the unused pre-merge tip read..agents/skills/drive-pr/SKILL.md:123— P2 / nit, 1 vote: split the sentence to meet the 25-word prose limit.
| File | Description |
|---|---|
tests/test_pr_review.py |
Adds cleanup refusal and diagnostic coverage. |
scripts/pr_review.py |
Checks open pull requests before deletion. |
.github/skills/merge-and-release/SKILL.md |
Updates generated merge-and-release skill. |
.github/skills/drive-pr/SKILL.md |
Updates generated drive-pr skill. |
.claude-plugin/fleet-skills/skills/merge-and-release/SKILL.md |
Updates generated plugin skill. |
.claude-plugin/fleet-skills/skills/drive-pr/SKILL.md |
Updates generated plugin skill. |
.claude-plugin/fleet-skills/.source-digests/merge-and-release |
Refreshes source digest. |
.claude-plugin/fleet-skills/.source-digests/drive-pr |
Refreshes source digest. |
.agents/skills/merge-and-release/SKILL.md |
Removes manual deletion guidance. |
.agents/skills/drive-pr/SKILL.md |
Removes manual deletion guidance. |
🧠 Review effort: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #2988 +/- ##
==========================================
Coverage ? 60.92%
==========================================
Files ? 17
Lines ? 8996
Branches ? 0
==========================================
Hits ? 5481
Misses ? 3515
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
… Merge Step Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
A recorded local strict-review pass covers head |
…and Write-Guard Split Directory and Substitution Denies to Main (#3002) - #2986 makes `pr_review.py` count a Copilot finding named only in the overview file table, or only in a headline total larger than the open sections list, under `FINDINGS WITH NO THREAD`, so the gate reads a finding the round opened no thread or open-findings entry for - #2988 makes `pr_review.py cleanup` refuse a branch delete where another open pull request in the repository uses the branch as its head or base, naming them, and drops the hand-typed `git push origin --delete` fallback from `drive-pr` step 4 and `merge-and-release` step 8, so a seat that cannot run `cleanup` reports the delete to the maintainer. The failed-rules-read test now asserts the stub's stderr text and exit code - #2992 names `pr_review.py cleanup` as the branch delete in `backlog-burndown` and in `scripts/README.md`, with any nonzero exit, or a seat that cannot run it, reported to the maintainer - #2994 makes `gh-write-guard` deny an unquoted `-C`, `--git-dir`, or `--work-tree` value that word splitting may split, on every git subcommand, naming quoting the variable as the fix, deny a command word holding a `$` or a backtick where its subcommand is `push` or `commit`, and read the body of a double-quoted `$(...)` or backtick substitution, and of an unquoted backtick substitution, as a command, so a git push or commit hidden there reaches every check. A heredoc body inside such a substitution stays data - #3001 describes those readings in the two agent-safety READMEs After this merges, the host-safety installer payload changes, so the maintainer runs the installer after promotion. Closes #2982 Closes #2969 Closes #2971 Closes #2983 Closes #2987 Closes #2976 Closes #2977 Closes #2990 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Branch cleanup now checks that the branch still matches the pull request and is not used by another open pull request before deletion. If checks fail or cleanup cannot run, maintainers are asked to handle it; remotely pushed abandoned branches are not deleted automatically. * Review summaries now account for findings in file-table annotations and headlines, reducing the chance that unthreaded findings go uncounted. * **Safety** * Command safeguards now inspect command substitutions and reject ambiguous directory values and command forms that could conceal Git operations. <!-- end of auto-generated comment: release notes by coderabbit.ai -->

Summary
pr_review.py cleanupreads the open pull requests in the repository whose head or base is the branch, and refuses with exit 1 naming them. A fork's pull request on a same-named branch is not counted.drive-prstep 4 andmerge-and-releasestep 8 drop the hand-typedgit push origin --deletefallback. Wherecleanupcannot run, the skill reports the delete to the maintainer, socleanupis the one place holding the checks.CleanupCasekeeps the redirected stderr, and the failed rules read test asserts the stub'sHTTP 404text and therc=1in thestatus=UNREADline.Verification
The new refusal tests and the diagnostic assertions each fail with their code reverted. The full
tests.test_pr_reviewsuite, ruff, mypy, prose lint,build_dist.py --check,spec/validate.py, anddocker_lint.pypass.The local review's eight findings were fixed in the second commit. That commit was not given a second review pass.
scripts/README.mdand.agents/skills/backlog-burndown/SKILL.mdstill describe the old hand form and are outside this change's files, filed as #2987.Fixes #2969
Fixes #2971
Fixes #2983
🤖 Generated with Claude Code