Skip to content

[4.41/HK1] Housekeeping: prune stale pre-4.31 remote branches #186

Closed

Description

@patrick-chinchill

Summary

origin has 101 non-main branches, and every one of them predates the 4.41 wave. Their last commits run from 2026-04-06 to 2026-06-21; all but three (the 0.4.31.1-era chore/0.4.31.1-slack-fixes, fix/slack-138-…, fix/slack-95-…, all squash-merged) predate the 4.31 release. Pruning them before the wave makes the new sync/4.41-* branches easy to find. One-off repo hygiene: no code, no PR (except an optional docs note).

Upstream changes

None. This task is housekeeping for this repository only.

Current Python behavior

Snapshot from 2026-09-29, taken after git fetch --prune origin:

  • git branch -r lists 102 branches including main (excluding origin/HEAD). By prefix: claude/* 40, fix/* 15, feat/* 8, test/* 6, wt30/* 4, release/* 4, integ/* 4, and 20 others.
  • git branch -r --merged origin/main lists 34 fully merged branches: bump-a3, cleanup/remove-old-duplicate-tests, coverage-and-docs, docs/comprehensive-documentation, fix-action-shas, fix-lazy-crypto, fix-lint, fix-permissions, fix/acquire-lock-toctou-race, fix/all-remaining-gaps, fix/fixture-xfails, fix/launch-must-fix-items, fix/markdown-streaming-audit-fixes, fix/merge-conflict-and-release, fix/mock-open-modal, fix/port-bugs-batch, fix/pr-review-comments, fix/slack-client-cache-bugs, fix/slack-surface-upload-confirmation, fix/systematic-scan-port-bugs, fixtures-and-postgres-fix, process/test-fidelity-enforcement, release-a10, release-a11, release-a5, release-a6, release-a8, security-fixes, ship, test/100pct-fidelity, test/core-sdk-parity, test/faithful-translations, test/port-ts-coverage-tests, test/slack-client-cache.
  • git branch -r --no-merged origin/main lists 67 branches. 57 of them have a MERGED PR, meaning they were squash-merged so their commits are not ancestors of main. 2 have only CLOSED PRs and 8 have no PR (table below).
  • Repo setting delete_branch_on_merge is false (gh api repos/Chinchill-AI/chat-sdk-python --jq .delete_branch_on_merge), so merged heads pile up. main is branch-protected.

Unmerged branches without a merged PR. Each needs a maintainer decision.

Branch Last commit Ahead of main PR
claude/type-cleanup-0.4.26.1 2026-04-17 19 no PR
claude/improve-sync-process-docs 2026-05-21 1 no PR
claude/markdown-parser-swap-spike 2026-05-28 6 #100 CLOSED
claude/release-0.4.27.1 2026-05-29 2 no PR
release/0.4.27.1 2026-05-29 2 #120 CLOSED
release/0.4.27.2 2026-05-29 3 no PR
wt30/fixes 2026-06-13 16 no PR
wt30/slack 2026-06-13 15 no PR
wt30/telegram 2026-06-13 12 no PR
wt30/twilio 2026-06-13 13 no PR

Notes:

Unmerged by ancestry but PR MERGED (squash). 57 branches, low risk.
Branch Last commit PR
fix/comprehensive-quality-audit 2026-04-09 #36
feat/contextvar-resolver-and-docs 2026-04-10 #38
release/v0.4.25 2026-04-10 #41
sync/upstream-v4.25.0 2026-04-10 #40
feat/ioredis-prefix-71 2026-04-24 #73
feat/options-load-50 2026-04-24 #66
feat/plan-tests-55 2026-04-24 #75
feat/rehydrate-attachment-52 2026-04-24 #67
feat/streaming-tests-56 2026-04-24 #74
feat/teams-cert-58 2026-04-24 #65
get-participants-54 2026-04-24 #64
release/0.4.26.2 2026-04-24 #77
test/async-sleep-sweep 2026-04-24 #76
claude/review-pr-1003-placement-pmA7S 2026-05-07 #82
claude/port-external-select-option-groups-J7S7H 2026-05-09 #84
claude/wizardly-heisenberg-VLInV 2026-05-23 #99
claude/port-slack-socket-mode-J7S7H 2026-05-27 #86
claude/port-slack-team-id-teams-dm-graph-J7S7H 2026-05-27 #85
claude/port-teams-native-dm-streaming-J7S7H 2026-05-27 #88
claude/sync-upstream-release-J7S7H 2026-05-27 #83
claude/accept-dict-streamchunks-slack-github-gchat 2026-05-28 #105
claude/parser-chat-completeness 2026-05-28 #101
claude/port-adapter-bugfix-sweep-J7S7H 2026-05-28 #89
claude/port-adapter-init-logs-and-not-found-context 2026-05-28 #104
claude/port-chat-getuser-J7S7H 2026-05-28 #90
claude/port-queue-debounce-concurrency 2026-05-28 #114
claude/port-slack-dynamic-bot-token-J7S7H 2026-05-28 #87
claude/release-0.4.27 2026-05-28 #106
claude/wizardly-euler-gDArT 2026-05-28 #103
claude/bump-python-floor-3.12 2026-05-29 #111
claude/fix-contributing-python-floor 2026-05-29 #115
claude/flip-slack-verifier-precedence 2026-05-29 #113
claude/nifty-fermat-tnfiX 2026-05-29 #107
claude/port-chat-ai-module-move 2026-05-29 #116
claude/port-messenger-adapter-scaffolding 2026-05-29 #118
claude/sync-upstream-4.29 2026-05-29 #108
claude/port-chat-ai-tools 2026-05-30 #122
claude/port-dm-routing-docs 2026-05-30 #121
claude/port-gchat-fail-closed-verifier 2026-05-30 #130
claude/port-github-eager-bot-id 2026-05-30 #128
claude/port-linear-token-encryption 2026-05-30 #129
claude/port-messenger-adapter 2026-05-30 #124
claude/port-slack-socket-token-timing 2026-05-30 #126
claude/port-streaming-doc-fixups 2026-05-30 #123
claude/port-telegram-attachments 2026-05-30 #119
claude/port-slack-web-client 2026-06-01 #127
claude/upbeat-goodall-4djz9p 2026-06-14 #134
feat/teams-file-attachments 2026-06-14 #125
claude/port-message-subject 2026-06-17 #131
claude/pr133-dm-threading-fix 2026-06-17 #137
integ/wt30-fixes 2026-06-18 #141
integ/wt30-slack 2026-06-18 #139
integ/wt30-telegram 2026-06-18 #140
integ/wt30-twilio 2026-06-18 #142
chore/0.4.31.1-slack-fixes 2026-06-21 #177
fix/slack-138-empty-dm-thread-ts-fetch 2026-06-21 #175
fix/slack-95-grid-startstream-team-id 2026-06-21 #176

Scope

  • Re-run the inventory: git fetch --prune origin, then --merged / --no-merged, then gh pr list --state all --limit 500 --json number,headRefName,state. Post the refreshed tables as a comment here if they changed.
  • Delete the fully merged branches: git push origin --delete <branch> for each branch in git branch -r --merged origin/main, excluding main.
  • Get a maintainer ack in this issue for the unmerged set. The proposed default is to delete the 57 squash-merged branches and the 2 CLOSED-PR branches, and to delete the 8 no-PR branches only after the maintainer has looked at git log origin/main..origin/<b> for each.
  • After the ack, delete the approved set.
  • Ask the maintainer to enable "Automatically delete head branches" (admin action; do not change settings from automation).
  • Optional: add one line to docs/UPSTREAM_SYNC.md § "How to Sync an Upstream Release" saying that wave branches use sync/<version>-<id> and are deleted on merge.

Out of scope

Porting notes

  • Irreversible for branches with no other ref: before deleting a no-PR or CLOSED-PR branch, record its head SHA in a comment here (restore: git push origin <sha>:refs/heads/<name>).
  • Delete one branch at a time or from a reviewed list; no pattern deletes. main must never appear in a delete list.

Tests

None. Verify with git ls-remote --heads origin | wc -l before and after, and include both counts in the closing comment.

Acceptance criteria

  • All --merged branches except main are deleted.
  • The unmerged set is deleted per the maintainer ack, and every deleted no-PR or CLOSED-PR branch has its SHA recorded here.
  • No tags were touched (git ls-remote --tags origin is the same before and after).
  • If the docs note is added, docs/UPSTREAM_SYNC.md is updated and the full validation command from CLAUDE.md passes. No CHANGELOG entry is needed (no release impact), and there is no consumer-visible behavior change.

Dependencies

None. This can start immediately. Do it before or alongside #185.

Verify first

  • Re-check PR states. A branch may have gained or lost a PR since this 2026-09-29 snapshot.

Metadata

  • Effort: S (no code).
  • Consumer impact: none. Downstream consumers pin by tag or SHA, not by these branches. Before deleting, confirm that no consumer pins one of these branch names.
  • Suggested branch: n/a (sync/4.41-hk1 only if the optional docs note is added).

Part of #184.

Activity

  1. patrick-chinchill commented on Oct 1, 2026

    @patrick-chinchill
    CollaboratorAuthor

    Pruning stale remote branches (2026-10-01)

    All 102 non-main branches on origin are being deleted. None has an open PR: 91 have merged PRs, 2 have only closed PRs, and 9 never had a PR, including wip/4.41-sl4-full, a 4.41-wave WIP snapshot that #286/#307 superseded.

    Recovery: any branch can be restored from the head SHA below:

    git push origin <sha>:refs/heads/<branch>
    

    The maintainer also has a local git bundle of every head: ~/chat-sdk-python-remote-branches-2026-10-01.bundle, 3.3 MB, verified.

    The repo setting delete_branch_on_merge is still false. I didn't change it; turning it on would stop merged heads piling up again.

    Manifest (102 branches)
    Branch Head SHA Last commit PRs
    bump-a3 6c2f65bda8114d0db39917c0eed1f376a7523424 2026-04-06 #6 MERGED
    chore/0.4.31.1-slack-fixes ddaf94d020f1405ddee93cc366430271e626b5e0 2026-06-21 #177 MERGED
    claude/accept-dict-streamchunks-slack-github-gchat ed1deaf0ab0d315fcaa8b763c6e1ddf86c4fcbec 2026-05-28 #105 MERGED
    claude/bump-python-floor-3.12 66128014fe3effb120262e516fd259ebbffd0648 2026-05-29 #111 MERGED
    claude/fix-contributing-python-floor a9ee5f3bb196ac019c72ccbb416993254beb9eb1 2026-05-29 #115 MERGED
    claude/flip-slack-verifier-precedence e80faeeec559258fbc7b4103c1d1de4e89b4a0da 2026-05-29 #113 MERGED
    claude/improve-sync-process-docs a7587abf927d732d474506b0460697cae5961a8e 2026-05-21 no PR
    claude/markdown-parser-swap-spike e317741915fe00ca84d05bb920516ffa388f08d4 2026-05-28 #100 CLOSED
    claude/nifty-fermat-tnfiX f5c6b6bfe44344b5fd413cdf7cb00228f099ee66 2026-05-29 #107 MERGED
    claude/parser-chat-completeness 4fda9b438a6acc5c9722a65d005a7182f3f23c12 2026-05-28 #101 MERGED
    claude/port-adapter-bugfix-sweep-J7S7H 2d1f4cd56309626c8d987e16f6c4b926cf8d69b2 2026-05-28 #89 MERGED
    claude/port-adapter-init-logs-and-not-found-context fcdfbea2eee332d50a68e8457c3734019e13a2d3 2026-05-28 #104 MERGED
    claude/port-chat-ai-module-move bf66edb6da99443a83f00190ada210883dc9391d 2026-05-29 #116 MERGED
    claude/port-chat-ai-tools fb8c50ac785cc93f49a2539ce3d7641f01359151 2026-05-30 #122 MERGED
    claude/port-chat-getuser-J7S7H 64e089683cd7fca1603f4232dba56d13042218ab 2026-05-28 #90 MERGED
    claude/port-dm-routing-docs 0054978689ae7b996f7f9640c4c65558d456aac9 2026-05-30 #121 MERGED
    claude/port-external-select-option-groups-J7S7H 99a52a4c3a8fe94f15a5b2dbffd2df41bedadb94 2026-05-09 #84 MERGED
    claude/port-gchat-fail-closed-verifier 89cedd2c8e20c6f4f9d48ea6cfaa7d404a56a8e3 2026-05-30 #130 MERGED
    claude/port-github-eager-bot-id c8919355768cb9890a05844e0f34077d23774823 2026-05-30 #128 MERGED
    claude/port-linear-token-encryption 2be4fdbe2ecca768d127c78ad83a85e3fde56700 2026-05-30 #129 MERGED
    claude/port-message-subject ac956e130ab349ac032af09f21a8ea3cc990cc67 2026-06-17 #131 MERGED
    claude/port-messenger-adapter 14052713c1ce4bfe133210002aa01b674a7da148 2026-05-30 #124 MERGED
    claude/port-messenger-adapter-scaffolding 3ad373a14b45a41dad7096f3cff2f790e4988fe2 2026-05-29 #118 MERGED
    claude/port-queue-debounce-concurrency ebcb877f57883a4d3ba9456161597a293f022d85 2026-05-28 #114 MERGED
    claude/port-slack-dynamic-bot-token-J7S7H 49a7752ba9929d75755105bb3a1335397cc39c53 2026-05-28 #87 MERGED
    claude/port-slack-socket-mode-J7S7H 1f3aa3c797acd9c8de6ad5e5024ae8a0d5eab7cb 2026-05-27 #86 MERGED
    claude/port-slack-socket-token-timing 87f1ced2275c0a0a09f5749a3b919c8a2a1303c0 2026-05-30 #126 MERGED
    claude/port-slack-team-id-teams-dm-graph-J7S7H ab15302bf7e61ea75182f06f75247591a1e6c8f3 2026-05-27 #85 MERGED
    claude/port-slack-web-client eff1a007ca5b8abaf5fe9ab90a82fc39437eb82a 2026-06-01 #127 MERGED
    claude/port-streaming-doc-fixups f6d05dc3cea063324f3482379755546e931756e9 2026-05-30 #123 MERGED
    claude/port-teams-native-dm-streaming-J7S7H a6b9c7856a65ffa71bf00976b96ab61dd6484867 2026-05-27 #88 MERGED
    claude/port-telegram-attachments c5502e79380259f902e5dea2c64bfbfd72db872a 2026-05-30 #119 MERGED
    claude/pr133-dm-threading-fix c94e87c8bfec521d8684cfe912879c2452e6e340 2026-06-17 #137 MERGED
    claude/release-0.4.27 fee58ac6af63dcab54974c6ab1a34a20b35f0943 2026-05-28 #106 MERGED
    claude/release-0.4.27.1 e45069f686206158f79e56d90d43229b3e028301 2026-05-29 no PR
    claude/review-pr-1003-placement-pmA7S 84cfb3879cd3b86bbc7e0ddf62b3cc06b0a3f05e 2026-05-07 #82 MERGED
    claude/sync-upstream-4.29 5c2f7c6758102d4a94deba6905b969d1761dfc02 2026-05-29 #108 MERGED
    claude/sync-upstream-release-J7S7H 36a3f8496b4ec1f62279d921f2ded5e7f6425f13 2026-05-27 #83 MERGED
    claude/type-cleanup-0.4.26.1 bd9b3a10c096ecaac5ef54ab52499041aa4a7a0e 2026-04-17 no PR
    claude/upbeat-goodall-4djz9p 44c44fd57d8e231cdf2d0b60160e37b8d835f57c 2026-06-14 #134 MERGED
    claude/wizardly-euler-gDArT 7ab59a97d75d3ff9381ab2bb31ef74beed6b7f08 2026-05-28 #103 MERGED
    claude/wizardly-heisenberg-VLInV 0bb035324174b215f3a2a9853444ed4dc741fe86 2026-05-23 #99 MERGED
    cleanup/remove-old-duplicate-tests e2cae2e03f0435fdd26cedf8cbecabf438a79ae4 2026-04-07 #34 MERGED
    coverage-and-docs 94cbf9c26aea90fc154b053b88990fa56a6f4343 2026-04-06 #24 MERGED
    docs/comprehensive-documentation a94deec2f5dea309ff2dec55fdd273514983d890 2026-04-06 #11 MERGED
    feat/contextvar-resolver-and-docs d26bb0d103608ea9002a3a40e076aaa90b3b725d 2026-04-10 #38 MERGED, #37 CLOSED
    feat/ioredis-prefix-71 ac591514ec3811cda4871c2079063661dfe5f5ed 2026-04-24 #73 MERGED
    feat/options-load-50 1776b7d50ad860205255f1e5f1bc285a6e003a0e 2026-04-24 #66 MERGED
    feat/plan-tests-55 b3fe67035f25fdcdf614a2efe381bb42049661cb 2026-04-24 #75 MERGED
    feat/rehydrate-attachment-52 7224871dcfe63a383418629c2e4fac0385178d1f 2026-04-24 #67 MERGED
    feat/streaming-tests-56 05095e63070e6817c7d28ee494cfc04875ee051e 2026-04-24 #74 MERGED
    feat/teams-cert-58 53b29482e08afc66a4d3b2ddd5e3ca94d68452a6 2026-04-24 #65 MERGED
    feat/teams-file-attachments e3e2bcceca49fd51f1b14cb137c9bab57d3f898c 2026-06-14 #125 MERGED
    fix-action-shas e61b33dd5aea6bcc065521769a84ac2a2d650390 2026-04-06 #2 MERGED
    fix-lazy-crypto 420e7989eff985099b7ae32b67c6ffba5f7581e6 2026-04-06 #4 MERGED
    fix-lint 31057e7421b89306ed87a1f3cf984f7c0c18434d 2026-04-06 #5 MERGED
    fix-permissions 5100ece9b81ff7b10c253acd0acffd27991a46bb 2026-04-06 #3 MERGED
    fix/acquire-lock-toctou-race 232608958354c2c42ea490fae398c60b4815ab63 2026-04-06 #20 MERGED
    fix/all-remaining-gaps 2982290d5a562a38774459428712c20a38c9c3c3 2026-04-07 #35 MERGED
    fix/comprehensive-quality-audit 20614f8639751a32f34d2dc8ee24fecd3fffc3ec 2026-04-09 #36 MERGED
    fix/fixture-xfails 2b5c26b20665dcb10238fc6f9c9a6c0170e1d2fe 2026-04-06 #22 MERGED
    fix/launch-must-fix-items 68e05957fbf59bf388b5843cd3c2ce2827d8396c 2026-04-06 #7 MERGED
    fix/markdown-streaming-audit-fixes ab35767141f8ce0b4eb4c0333dde07df54728e0b 2026-04-06 #12 MERGED
    fix/merge-conflict-and-release 885587501c2d78cd2f751c2ded5dcc9161806fff 2026-04-07 #31 MERGED
    fix/mock-open-modal d4d9ce963747d4117bc2f41644bb9a954beee55e 2026-04-07 #28 MERGED
    fix/port-bugs-batch 0788d1efd53aebc2930c8d2c4ebaf03c425635df 2026-04-06 #14 MERGED
    fix/pr-review-comments 9519a81e08b1dc2ea2d00ad436bbef948198ac6d 2026-04-06 #13 MERGED
    fix/slack-138-empty-dm-thread-ts-fetch 9d8791d7f76856f8455ae48967d7d30432a9eb4e 2026-06-21 #175 MERGED
    fix/slack-95-grid-startstream-team-id b82620441099ff190e2425384a76e2c12893ab1e 2026-06-21 #176 MERGED
    fix/slack-client-cache-bugs e5f49c355217f45bc06e3ff2349bc0473c51030f 2026-04-06 #8 MERGED
    fix/slack-surface-upload-confirmation 823dbd403ac4df1b45a701ab03c9bdcd91032334 2026-05-29 #117 MERGED
    fix/systematic-scan-port-bugs 938291006c0e0045914eb64610f3d1858b3490e1 2026-04-06 #16 MERGED
    fixtures-and-postgres-fix 4fac8f60a882b53bf4a4ea89166d7ba58a0626e9 2026-04-06 #21 MERGED
    get-participants-54 1523d275a195581bc517d91e561919eaf0ee1e29 2026-04-24 #64 MERGED
    integ/wt30-fixes c113931a10e5627cfe2b5230630570daabb99fba 2026-06-18 #141 MERGED
    integ/wt30-slack 03bbea29eae36a22a94aa40508de08a71368451e 2026-06-18 #139 MERGED
    integ/wt30-telegram d797f2c5328978f9f3524faa1e3a1640774225fb 2026-06-18 #140 MERGED
    integ/wt30-twilio 341c7904a6a50e1f4c71290213f04de73af021f8 2026-06-18 #142 MERGED
    process/test-fidelity-enforcement 925adea1d065311c1dc73c78a7197b4eb1fd64a2 2026-04-07 #30 MERGED
    release-a10 c83e5c41be3b9e96ade08ba960989480ab00e38e 2026-04-07 #32 MERGED
    release-a11 5f009647a7ef3a02d9509cb2635745a8a43e1557 2026-04-07 #33 MERGED
    release-a5 ea60898e77e0b03e67dda05499d7918ca187a8b0 2026-04-06 #15 MERGED
    release-a6 3101ac4cd762b5aeaf0cf74a9ffc67fdd34606c1 2026-04-06 #17 MERGED
    release-a8 5f1f086d96f9f312de9201b3fc4c25565b9e143a 2026-04-07 #26 MERGED
    release/0.4.26.2 e337f037c7fd71883fcbef94a10c979fc61dd1dd 2026-04-24 #77 MERGED
    release/0.4.27.1 e45069f686206158f79e56d90d43229b3e028301 2026-05-29 #120 CLOSED
    release/0.4.27.2 151af5bfb75c846fc20a81413cad8336468d7e13 2026-05-29 no PR
    release/v0.4.25 42006c6b885ee1f90abdaf8223eee093e057c5d9 2026-04-10 #41 MERGED
    security-fixes ddb4042199f9edb51e8cffcad9557c478d9dffe0 2026-04-06 #1 MERGED
    ship 42aff67c18be7ace5990a1d577723000abc6fa00 2026-04-06 #10 MERGED
    sync/upstream-v4.25.0 5dab59a283211911b3344eaffd0b6c30c90a37a0 2026-04-10 #40 MERGED
    test/100pct-fidelity 7ca9f08c05f9a1cbef661ea191cfa88fe182fe94 2026-04-07 #29 MERGED
    test/async-sleep-sweep 7883a733c4358b597cb8ed3cdfe3b26a1445f605 2026-04-24 #76 MERGED
    test/core-sdk-parity 00a072590b103be8407b3fa2c6d5dc83755e333c 2026-04-07 #25 MERGED
    test/faithful-translations 4f0f515bef0be50701e369a0dc1b44dc1400f7ad 2026-04-07 #27 MERGED
    test/port-ts-coverage-tests 96c8b41b7e332553f58ef9a0e0ac83d15d578925 2026-04-06 #23 MERGED
    test/slack-client-cache 2dbeba7e26f0f9652bc2aa91b924e042dfdb5531 2026-04-06 #9 MERGED
    wip/4.41-sl4-full c0788056b592a90121e01e74aba77905190ab1eb 2026-09-30 no PR
    wt30/fixes b9b516e41b5d717f7d8e89d91e418e53010f430a 2026-06-13 no PR
    wt30/slack 0b005c8c8c7e801c3d8ba1f563e249570c66743d 2026-06-13 no PR
    wt30/telegram 8f290d19021f6ba967c41602da782d3ea80901a9 2026-06-13 no PR
    wt30/twilio a8d05d1cfe254bbc4bd5ae31b31fac5044a699a4 2026-06-13 no PR
  2. patrick-chinchill commented on Oct 1, 2026

    @patrick-chinchill
    CollaboratorAuthor

    Done: all 102 stale branches were deleted, and origin now has only main. Deletions had to go one ref per push, because GitHub rejects a single push that deletes many refs at once ("repository rule violations"). Recovery details (head SHAs, git push origin <sha>:refs/heads/<branch>, and the local bundle) are in the comment above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions