feature(branch_archive): move history worth keeping into the Gut, from anywhere - #283
Merged
Conversation
…m anywhere The org-wide audit found a branch the sweep must never delete and must not leave lying around either: a `master` carrying 442 commits from 2021-2022, orphaned by a later "history reset", sharing NO common ancestor with main and pinned by no tag. It is the only copy of that history. Deleting it is loss; keeping it is clutter. The Gut exists for exactly this, but `pyauto-gut` is a CLI and PyAutoGut ships no workflow, so the operation was laptop-only — the same gap this session closed for the sweep. This is deliberately NOT a mode of branch_sweep_all.yml. The sweep's question is "is this already in main?"; this workflow's is "is this safely in the Gut yet?". Sharing a code path would put an irreversible delete behind the wrong predicate. The ordering is the substance, not the plumbing: archive → VERIFY on the Gut → delete The verification is a fresh `ls-remote` against the Gut that also checks the landed SHA equals the branch's, not a reading of the push's exit code. A push that reports success but lands nothing — or lands under a different name — would otherwise be followed by an irreversible delete. Any mismatch aborts with the source branch untouched. The archive itself delegates to `pyauto-gut archive` rather than reimplementing the push, so the Gut keeps ownership of its own namespace and its own refusal-to-overwrite. Brain drives, Gut holds — the Heart/vitals template. Also guarded: the target must be a sweepable repo by the same body-map boundary the sweep uses; the archive name must be a plain slug so it cannot climb out of the namespace; and a repo's default branch is refused whatever it is called. Filing the condemned.md entry is left out on purpose. That is Mind state and a judgement — original project history should be held *undated*, so no later sweep ever voids it, and a workflow should not be deciding that. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KwqicJpMqmcT5RVbyNwdKq
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.
What the audit found
PyAutoHands carries a
masteralongsidemain. It is not a stale trunk from a rename:mainwas started fresh in June 2023.masteris the repo's original history, orphaned by that reset and the only copy of it. Deleting it makes 442 commits unreachable; leaving it is clutter. It is also the onlymasteracross all 25 sweepable repos — a one-off, not a pattern.The Gut exists precisely for this, but
pyauto-gutis a CLI and PyAutoGut ships no workflow, so the operation was laptop-only — the same gap this session closed for the sweep.Deliberately not a mode of the sweep
The sweep's question is "is this already in main?". This workflow's is "is this safely in the Gut yet?". Sharing a code path would put an irreversible delete behind the wrong predicate.
The ordering is the substance
The verification is a fresh
ls-remoteagainst the Gut that also checks the landed SHA equals the branch's — not a reading of the push's own exit code. A push that reports success but lands nothing, or lands under a different name, would otherwise be followed by an irreversible delete. Any mismatch aborts with the source branch untouched.The archive delegates to
pyauto-gut archiverather than reimplementing the push, so the Gut keeps ownership of its namespace and its refusal-to-overwrite. Brain drives, Gut holds — the Heart/vitals template.Other guards
archive/condemned/.Not included, on purpose
Filing the
condemned.mdentry. That is Mind state and a judgement: original project history should be held undated — nosweep-after— so no later sweep ever voids it. A workflow should not be deciding that.Checks
pytest tests/→ 510 passed ·check_skill_line_counts.sh→ OK ·repos_sync.py --check→ all 12 green.Slug guard exercised directly:
../escape,.hidden, empty andhas spacerejected;pyautohands-pre-2023-historyandok_name.1accepted.🤖 Generated with Claude Code
https://claude.ai/code/session_01KwqicJpMqmcT5RVbyNwdKq
Generated by Claude Code