Skip to content

chore(harness): remove session-start stale-branch sensor (dead code)#65

Merged
fullstackjam merged 1 commit into
mainfrom
chore/remove-stale-branch-sensor
May 16, 2026
Merged

chore(harness): remove session-start stale-branch sensor (dead code)#65
fullstackjam merged 1 commit into
mainfrom
chore/remove-stale-branch-sensor

Conversation

@fullstackjam
Copy link
Copy Markdown
Collaborator

Summary

The session-start stale-branch sensor (added in #63) was introduced when ship-pr used gh 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-session git 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)
  • CI green (will validate before merge per the new ship-pr flow).

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.
@github-actions github-actions Bot added the docs label May 16, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@fullstackjam fullstackjam merged commit 28ca202 into main May 16, 2026
13 checks passed
@fullstackjam fullstackjam deleted the chore/remove-stale-branch-sensor branch May 16, 2026 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant