fix(standard): content-based branch-landed check for rebase/squash merges - #30
Conversation
The session-end checklist's first item relied on `git branch -a --no-merged`, an ancestry test: on rebase- or squash-merging repos every landed branch is reported unmerged forever, `git branch -d` refuses it by the same test, and the only way to clear the box was the reflexive `git branch -D` habit the checklist should be training away. The item keeps `--no-merged` as the enumerator but names the over-report, prescribes confirming the change landed by content before force-deleting (`gh pr list --state merged --head <branch>`; `git log --cherry` for no-PR rebases), forbids `-D` when both checks fail, and closes the remote half with `gh repo edit --delete-branch-on-merge` plus `git fetch --prune`. The sentence quoted verbatim by agent-collaboration.md is unchanged. Refs #28 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Updates RepoKit’s repo-standard guidance to avoid false “unmerged branch” signals on repos that use rebase/squash merges, and records the change in project tracking docs.
Changes:
- Expands the session-end checklist branch hygiene item to explain why
--no-mergedover-reports on rebase/squash merges and to prescribe content-based confirmation before force-deleting. - Updates the repo’s resume-state checkpoint to reflect current in-progress work.
- Adds a changelog entry documenting the standard correction.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| plugins/repokit/skills/repo-standard/standard/session-end-checklist.md | Rewords the “No undecided branches” item to address rebase/squash merge behavior and provide safer cleanup steps. |
| docs/CHECKPOINT.md | Updates resume-state metadata and next steps to match current work. |
| CHANGELOG.md | Records the checklist correction under Unreleased. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| - the branch had a PR: `gh pr list --state merged --head <branch>` lists it → landed; | ||
| - no PR: `git log --oneline --cherry main...<branch>` — every commit marked `=` has a | ||
| patch-equivalent commit on `main` (the rebase case) → landed. A squash-merged multi-commit | ||
| branch still shows `+` here; judge that one by its PR. |
There was a problem hiding this comment.
Verified empirically before changing anything — the claim doesn't hold: --cherry is a synonym for --right-only --cherry-mark --no-merges (git-log docs), so the =/+ markers are shown. Reproduction (git 2.x, branch with two commits cherry-picked to main plus one unlanded):
$ git log --oneline --cherry main...feature
+ 6b54fca change 3 unlanded
= e8eb270 change 2
= 0502ff3 change 1
The item stays mechanically checkable as written, so no change made.
— 🤖 Claude Code (Fable 5), on behalf of @PBNZ
| - The session-end checklist's branch item no longer strands rebase/squash-merged branches | ||
| (#28): `git branch -a --no-merged` is named as an ancestry test that over-reports on those | ||
| merge methods, the item prescribes content-based confirmation before force-deleting | ||
| (`gh pr list --state merged --head`, or `git log --cherry` for no-PR rebases) with an | ||
| explicit "never `-D` a branch that fails both checks", and the remote half is closed by the | ||
| `gh repo edit --delete-branch-on-merge` + `git fetch --prune` recipe. |
There was a problem hiding this comment.
No mismatch to fix: the checklist item and the changelog reference the same command (git log --oneline --cherry), and --cherry implies --cherry-mark (it is a synonym for --right-only --cherry-mark --no-merges), so the =/+ marker interpretation matches what the command prints — see the reproduction in the sibling thread.
— 🤖 Claude Code (Fable 5), on behalf of @PBNZ
Refs #28 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
What & why
The session-end checklist's first item relied on
git branch -a --no-merged, an ancestry test that reports every rebase- or squash-merged branch as unmerged forever — blocking the safe-dand training the reflexive-Dhabit. The item now names the over-report, prescribes confirming a branch landed by content before force-deleting (gh pr list --state merged --head <branch>, orgit log --cherryfor no-PR rebases), forbids-Dwhen both checks fail, and closes the remote half withgh repo edit --delete-branch-on-merge+git fetch --prune. The sentenceagent-collaboration.mdquotes verbatim is unchanged.Refs #28
Checklist
Refs #NN(no auto-close keywords), if the repo tracks issues.feat: …,fix: …,docs: …).CHANGELOG.mdupdated under## [Unreleased]if user-visible.python scripts/*.py; see.github/workflows/validate.yml).docs/adr/for any notable decision. (No ADR — correction of an existing checklist item, mirrors the Correction: Project status options CAN be edited via API without breaking workflows - the option input accepts an id #23 precedent.)🤖 Generated with Claude Code