Fix cleanup-worktrees.sh stale repo list #195
Labels
No labels
domain:backend
domain:devops
domain:frontend
status:approved
status:in-progress
status:needs-fix
status:qa
type:bug
type:devops
type:feature
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ldraney/claude-custom#195
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Type
Bug
Lineage
Standalone — discovered during worktree lifecycle enforcement brainstorm (2026-03-28).
Spec:
pal-e-platform/docs/superpowers/specs/2026-03-28-worktree-lifecycle-enforcement-design.mdPlan:
pal-e-platform/docs/superpowers/plans/2026-03-28-worktree-lifecycle-enforcement.md— Task 3Repo
forgejo_admin/claude-customWhat Broke
REPO_DIRSinhooks/cleanup-worktrees.sh(lines 15-25) lists 2 stale repo names that no longer exist on disk (pal-e-api,pal-e-sdk) and is missing 13 active repos. Stale worktrees in those repos are never cleaned up by the SessionStart hook.Repro Steps
hooks/cleanup-worktrees.shREPO_DIRSarray on lines 15-25 (9 entries)pal-e-apidoes not exist on disk (MISSING)pal-e-sdkdoes not exist on disk (MISSING)pal-e-mcpDOES exist on disk — keep it (NOT renamed)palworld-serverDOES exist on disk — keep itExpected Behavior
REPO_DIRSshould list all 22 active repos. Stale worktrees in any repo should be caught by the SessionStart cleanup.Environment
hooks/cleanup-worktrees.shAcceptance Criteria
pal-e-api,pal-e-sdkpal-e-platform,pal-e-mcp,pal-e-app,pal-e-services,claude-custom,basketball-api,palworld-serverpal-e-docs,pal-e-docs-sdk,pal-e-deployments,westside-app,westside-contracts,mcd-tracker-api,mcd-tracker-app,minio-sdk,minio-api,pal-e-mail,minio-playground,mcd-tracker-playground,tmux-custom,pal-e-docs-playground,westside-playgroundRelated
project-pal-e-agency— agent infrastructure projectworktree-workflow— SOP this supportsreview-509-2026-03-27— identified 5 errors in original scopeScope Review: NEEDS_REFINEMENT
Review note:
review-509-2026-03-27The issue has correct template structure and full traceability, but contains incorrect file targets that would break the hook if followed literally.
Critical fixes needed:
pal-e-mcpshould NOT be removed from REPO_DIRS —~/pal-e-mcpexists on disk (Forgejo remote:forgejo_admin/pal-e-mcp). The claim it was "renamed to pal-e-docs-mcp" is wrong.pal-e-docs-mcpshould NOT be added — that directory does not exist.pal-e-mcpis already in the array and should stay.palworld-serverdirectory exists on disk despite being called "inactive" — clarify disposition.Scope gap:
pal-e-mail,minio-playground,mcd-tracker-playground,tmux-custom,pal-e-docs-playground,westside-playground. Target count of 15 may be an undercount.Scope Review: READY
Review note:
review-509-2026-03-27-v2All 5 errors from v1 review have been corrected. All 22 repos independently verified on disk. Ticket is ready for execution.