From 4de79b7cd2c7d6ff7105397eb72b8309f10a0069 Mon Sep 17 00:00:00 2001 From: PBNZ <93853627+PBNZ@users.noreply.github.com> Date: Wed, 12 Aug 2026 22:36:06 +1200 Subject: [PATCH 1/2] fix(standard): branch-landed check is content-based, not ancestry-based 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 `; `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 --- CHANGELOG.md | 9 +++++++++ docs/CHECKPOINT.md | 13 ++++++++----- .../repo-standard/standard/session-end-checklist.md | 13 +++++++++++++ 3 files changed, 30 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e16160..1f89b0a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed + +- 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. + ## [0.5.0] - 2026-07-20 ### Added diff --git a/docs/CHECKPOINT.md b/docs/CHECKPOINT.md index ae490f2..655df6f 100644 --- a/docs/CHECKPOINT.md +++ b/docs/CHECKPOINT.md @@ -3,10 +3,13 @@ Resume state: what a fresh session needs to pick this repo up. Keep every line current — the pre-commit checklist has the tripwire, and stale entries are worse than none. -- Last updated: 2026-07-20 -- Status: DONE -- In progress: nothing — board-commissioning batch (#21–#23, PR #24, ADR-0008) merged and - closed; release 0.5.0 cut (board-commissioning standards) -- Next step: paused — nothing pending +- Last updated: 2026-08-12 +- Status: IN PROGRESS +- In progress: two branches ready for local review — `fix/author-identity` (#25 + #26, + ADR-0009: handle-over-real-name defaults, repokit-check identity check) and + `fix/session-end-branch-check` (#28: content-based branch-landed check); owner pushes and + opens the PRs (`Refs #NN`, no closing keywords) +- Next step: review both branches, push, open two PRs, merge, verify, close #25/#26/#28; + `[Unreleased]` then holds a shippable standards batch — cut 0.6.0 One line per fact, current state only — history lives in `CHANGELOG.md` and git. diff --git a/plugins/repokit/skills/repo-standard/standard/session-end-checklist.md b/plugins/repokit/skills/repo-standard/standard/session-end-checklist.md index 03f4dc6..cf6caff 100644 --- a/plugins/repokit/skills/repo-standard/standard/session-end-checklist.md +++ b/plugins/repokit/skills/repo-standard/standard/session-end-checklist.md @@ -5,6 +5,19 @@ a minute; a session doesn't end "clean" with any box undecided. - [ ] **No undecided branches** — `git branch -a --no-merged`: for each hit, merge it, delete it, or open an issue that owns it. No silent survivors. + **`--no-merged` over-reports on rebase- and squash-merging repos** (both on by default on + GitHub): it tests ancestry ("is this tip reachable from HEAD"), not content ("did this change + land"), and both merge methods rewrite the commit — so a landed branch is reported unmerged + forever, and `git branch -d` refuses it by the same test. That is the one case where `-D` is + the correct tool, *after* confirming the change landed: + - the branch had a PR: `gh pr list --state merged --head ` lists it → landed; + - no PR: `git log --oneline --cherry main...` — 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. + Then `git branch -D `. Never `-D` a branch that fails both checks. + Kill the remote half of the noise once per repo: `gh repo edit --delete-branch-on-merge` + auto-deletes merged PR branches, and `git fetch --prune` then clears the local `[gone]` + tracking stubs. - [ ] **Straight-to-main commits are one concern each** — if a commit subject needs an "and", split before pushing (the no-PR formulation of "one concern per PR"). - [ ] **Resume-state updated** — `docs/CHECKPOINT.md` (or the declared substitute) carries From 93da0691244cdf2c56e41ab63f79d0cc0cd772e4 Mon Sep 17 00:00:00 2001 From: PBNZ <93853627+PBNZ@users.noreply.github.com> Date: Thu, 13 Aug 2026 00:13:56 +1200 Subject: [PATCH 2/2] docs: refresh checkpoint to post-push state (review follow-up) Copilot review on PR #30: the checkpoint described pre-PR actions that are already done. Now states the open PRs and the remaining owner steps. Identical content lands via PR #29 so the second merge stays clean. Refs #28 Co-Authored-By: Claude Fable 5 --- docs/CHECKPOINT.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/CHECKPOINT.md b/docs/CHECKPOINT.md index 655df6f..01c042f 100644 --- a/docs/CHECKPOINT.md +++ b/docs/CHECKPOINT.md @@ -3,13 +3,13 @@ Resume state: what a fresh session needs to pick this repo up. Keep every line current — the pre-commit checklist has the tripwire, and stale entries are worse than none. -- Last updated: 2026-08-12 +- Last updated: 2026-08-13 - Status: IN PROGRESS -- In progress: two branches ready for local review — `fix/author-identity` (#25 + #26, - ADR-0009: handle-over-real-name defaults, repokit-check identity check) and - `fix/session-end-branch-check` (#28: content-based branch-landed check); owner pushes and - opens the PRs (`Refs #NN`, no closing keywords) -- Next step: review both branches, push, open two PRs, merge, verify, close #25/#26/#28; - `[Unreleased]` then holds a shippable standards batch — cut 0.6.0 +- In progress: standards batch in review — [PR #29](https://github.com/PBNZ/repo-kit/pull/29) + (#25 + #26, ADR-0009: handle-over-real-name defaults, repokit-check identity check) and + [PR #30](https://github.com/PBNZ/repo-kit/pull/30) (#28: content-based branch-landed check); + CI green, Copilot review addressed on both +- Next step: owner merges #29 and #30 and closes #25/#26/#28 after verifying; then cut 0.6.0 — + rename `[Unreleased]`, bump `plugin.json` + `marketplace.json`, tag `v0.6.0`, push One line per fact, current state only — history lives in `CHANGELOG.md` and git.