feat(story-200): auto-prune worktrees when stories are archived
- Add `prune_worktree_sync` to worktree.rs: removes a story's worktree if it exists, delegating to `remove_worktree_sync` (best-effort, failures logged internally) - Update `sweep_done_to_archived` to accept `git_root` and call `prune_worktree_sync` after promoting a story from 5_done to 6_archived - Add Part 2 to the sweep: scan 6_archived and prune any stale worktrees for stories already there (catches items archived before this feature) - All worktree removal failures are logged but never block file moves - Add 5 new tests: prune noop, prune real worktree, sweep-on-promote, sweep-stale-archived, sweep-not-blocked-by-removal-failure Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
---
|
||||
name: "Auto-prune worktrees for archived stories in watcher sweep"
|
||||
---
|
||||
|
||||
# Story 200: Auto-prune worktrees for archived stories in watcher sweep
|
||||
|
||||
## User Story
|
||||
|
||||
As a developer, I want stale worktrees to be automatically cleaned up when their story is promoted to archived, so that disk space doesn't silently fill up over time.
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
- [ ] When sweep_done_to_archived moves a story to 6_archived, its worktree (if any) is removed via remove_worktree_sync
|
||||
- [ ] Worktrees for stories already in 6_archived at sweep time are also cleaned up (catches previously missed items)
|
||||
- [ ] Worktree removal failures are logged but do not block the story file move or other cleanup
|
||||
- [ ] Existing tests pass and new unit tests cover the worktree pruning logic
|
||||
|
||||
## Out of Scope
|
||||
|
||||
- TBD
|
||||
@@ -0,0 +1,20 @@
|
||||
---
|
||||
name: "Make watcher sweep interval configurable via project.toml"
|
||||
---
|
||||
|
||||
# Story 201: Make watcher sweep interval configurable via project.toml
|
||||
|
||||
## User Story
|
||||
|
||||
As a developer, I want to configure the watcher sweep interval and done-retention period in project.toml, so that I can tune how quickly stories are promoted to archived based on my team's workflow.
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
- [ ] project.toml supports optional sweep_interval_secs and done_retention_secs fields (with sensible defaults matching current hardcoded values: 60s and 4h)
|
||||
- [ ] The watcher reads these values at startup and uses them for SWEEP_INTERVAL and DONE_RETENTION
|
||||
- [ ] Changing project.toml hot-reloads the sweep config without restarting the server
|
||||
- [ ] Existing tests pass and new unit tests cover default and custom config values
|
||||
|
||||
## Out of Scope
|
||||
|
||||
- TBD
|
||||
@@ -0,0 +1,19 @@
|
||||
---
|
||||
name: "Make agent watchdog interval configurable via project.toml"
|
||||
---
|
||||
|
||||
# Story 202: Make agent watchdog interval configurable via project.toml
|
||||
|
||||
## User Story
|
||||
|
||||
As a developer, I want to configure the agent watchdog polling interval in project.toml, so that I can tune the orphan-detection frequency for my environment.
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
- [ ] project.toml supports an optional watchdog_interval_secs field (default 30s matching current hardcoded value)
|
||||
- [ ] AgentPool::spawn_watchdog reads the configured interval instead of using a hardcoded constant
|
||||
- [ ] Existing tests pass and new unit tests cover default and custom config values
|
||||
|
||||
## Out of Scope
|
||||
|
||||
- TBD
|
||||
@@ -0,0 +1,21 @@
|
||||
---
|
||||
name: "Move story to current before checking agent availability in start_agent"
|
||||
---
|
||||
|
||||
# Story 203: Move story to current before checking agent availability in start_agent
|
||||
|
||||
## User Story
|
||||
|
||||
As an agent operator, I want start_agent to move a story to 2_current/ even when all coders are busy, so that auto-assign picks it up when one becomes available — matching the promise in the error message.
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
- [ ] start_agent moves the story from 1_upcoming/ to 2_current/ before checking agent availability
|
||||
- [ ] When all coders are busy, start_agent returns a message indicating the story is queued in current and will be auto-assigned
|
||||
- [ ] auto_assign_available_work picks up the story when a coder finishes
|
||||
- [ ] If the story is already in 2_current/ or later, the move is a no-op (no error)
|
||||
- [ ] Existing tests pass and new tests cover the queued-in-current scenario
|
||||
|
||||
## Out of Scope
|
||||
|
||||
- TBD
|
||||
@@ -0,0 +1,19 @@
|
||||
---
|
||||
name: "Rename StorkIt branding to Story Kit"
|
||||
---
|
||||
|
||||
# Story 204: Rename StorkIt branding to Story Kit
|
||||
|
||||
## User Story
|
||||
|
||||
As a user, I want the application branding to say "Story Kit" instead of "StorkIt", so that the product name is displayed correctly.
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
- [ ] ChatHeader displays "Story Kit" instead of "StorkIt"
|
||||
- [ ] SelectionScreen heading displays "Story Kit" instead of "StorkIt"
|
||||
- [ ] All corresponding tests (unit and e2e) are updated to match
|
||||
|
||||
## Out of Scope
|
||||
|
||||
- TBD
|
||||
Reference in New Issue
Block a user