chore(harness): remove session-start stale-branch sensor (dead code)#65
Merged
Conversation
The sensor in .claude/hooks/session-start.sh was introduced when ship-pr used `gh pr merge --auto` — merges happened asynchronously after the session ended, so a feature branch could linger checked out into the next session and the sensor nagged the user to clean it up. PR #64 dropped --auto. Merges are now synchronous and cleanup is Step 8 of the ship-pr loop, which always runs before the session can end on a shipped PR. The sensor's trigger condition can no longer occur in normal flow, so it's dead code paying for a per-session `git fetch`. - session-start.sh restored to the pre-#63 shape (cache warming only). - ship-pr SKILL.md drops the 'sensor will catch lingering branches' fallback paragraph; the cleanup step is now described as part of the loop, not optional. - docs/HARNESS.md drops the sensor row from the controls table and adds a note in 'What's intentionally NOT in the harness' explaining the removal — so a future agent doesn't re-add it without also re-adding --auto.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
Summary
The session-start stale-branch sensor (added in #63) was introduced when
ship-prusedgh pr merge --auto. With auto-merge, merges happened asynchronously after the Claude session ended, so a feature branch could linger checked out into the next session — the sensor nagged the user to clean it up.#64 dropped
--auto. Merges are now synchronous and cleanup is Step 8 of the in-session loop, which always runs before the session ends on a shipped PR. The sensor's trigger condition can no longer occur in normal flow, so it's dead code paying for a per-sessiongit fetch.Changes:
.claude/hooks/session-start.sh— restored to pre-chore(harness): encode post-merge cleanup into ship-pr + session-start #63 shape (cache warming only on Claude Code on the web)..claude/skills/ship-pr/SKILL.md— dropped the "if the user closes the session before reaching Step 8 the sensor will catch it" fallback paragraph; cleanup is now described as part of the loop, not optional.docs/HARNESS.md— removed the sensor row from the controls table; added an entry under "What's intentionally NOT in the harness" explaining the removal, so a future agent doesn't re-add the sensor without also re-adding--auto.Test plan
bash -n .claude/hooks/session-start.sh(syntax)