From c32bab03a444f5952fd52055fb6ab2cb27d510b8 Mon Sep 17 00:00:00 2001 From: dave Date: Sun, 22 Mar 2026 18:17:43 +0000 Subject: [PATCH] storkit: delete 364_bug_worktree_cleanup_loops_on_orphaned_directories --- ...e_cleanup_loops_on_orphaned_directories.md | 30 ------------------- ...tdown_message_on_server_stop_or_rebuild.md | 20 ------------- 2 files changed, 50 deletions(-) delete mode 100644 .storkit/work/1_backlog/364_bug_worktree_cleanup_loops_on_orphaned_directories.md delete mode 100644 .storkit/work/1_backlog/366_story_bot_sends_shutdown_message_on_server_stop_or_rebuild.md diff --git a/.storkit/work/1_backlog/364_bug_worktree_cleanup_loops_on_orphaned_directories.md b/.storkit/work/1_backlog/364_bug_worktree_cleanup_loops_on_orphaned_directories.md deleted file mode 100644 index 9b2f0be..0000000 --- a/.storkit/work/1_backlog/364_bug_worktree_cleanup_loops_on_orphaned_directories.md +++ /dev/null @@ -1,30 +0,0 @@ ---- -name: "Worktree cleanup loops on orphaned directories" ---- - -# Bug 364: Worktree cleanup loops on orphaned directories - -## Description - -When a git worktree becomes orphaned (directory exists but git no longer recognises it as a valid worktree), the periodic worktree cleanup retries `git worktree remove` every minute and fails repeatedly with "fatal: not a working tree". This spams the logs indefinitely. - -## How to Reproduce - -1. Have a worktree created via storkit (e.g. for spike 329 or story 359) -2. The worktree becomes orphaned — git refs break but the directory remains -3. Observe server logs repeating the "not a working tree" warning every minute - -## Actual Result - -Cleanup loops forever, logging "fatal: '/workspace/.storkit/worktrees/...' is not a working tree" every minute without resolving the issue. - -## Expected Result - -If `git worktree remove` fails because git doesn't recognise the directory as a worktree, fall back to removing the orphaned directory directly (rm -rf) and clean up any stale git worktree metadata. - -## Acceptance Criteria - -- [ ] Orphaned worktree directories (exist on disk but not in git worktree list) are detected and removed -- [ ] Removal fallback uses rm -rf when git worktree remove fails with 'not a working tree' -- [ ] Stale .git/worktrees entries are pruned (git worktree prune) -- [ ] No repeated log spam for the same orphaned worktree diff --git a/.storkit/work/1_backlog/366_story_bot_sends_shutdown_message_on_server_stop_or_rebuild.md b/.storkit/work/1_backlog/366_story_bot_sends_shutdown_message_on_server_stop_or_rebuild.md deleted file mode 100644 index bdae382..0000000 --- a/.storkit/work/1_backlog/366_story_bot_sends_shutdown_message_on_server_stop_or_rebuild.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -name: "Bot sends shutdown message on server stop or rebuild" ---- - -# Story 366: Bot sends shutdown message on server stop or rebuild - -## User Story - -As a project owner in a chat room, I want the bot to send a message when the server is shutting down (via ctrl-c or rebuild_and_restart), so that I know the bot is going offline and won't wonder why it stopped responding. - -## Acceptance Criteria - -- [ ] Bot sends a shutdown message to active chat channels when the server receives SIGINT/SIGTERM (ctrl-c) -- [ ] Bot sends a shutdown message before rebuild_and_restart kills the current process -- [ ] Message indicates the reason (manual stop vs rebuild) -- [ ] Message is sent best-effort — shutdown is not blocked if the message fails to send - -## Out of Scope - -- TBD