Skip to content

fix(daemon): maintain worktree continuity across graceful shutdown#715

Merged
kys0213 merged 1 commit intomainfrom
feature/issue-679
Mar 30, 2026
Merged

fix(daemon): maintain worktree continuity across graceful shutdown#715
kys0213 merged 1 commit intomainfrom
feature/issue-679

Conversation

@kys0213
Copy link
Copy Markdown
Owner

@kys0213 kys0213 commented Mar 30, 2026

Summary

Ensure that items collected from DataSource are persisted to the database during graceful shutdown rollback, preventing loss of previous_worktree_path on restart.

Closes #679

Changes

  • Modified rollback_running_to_pending() to ensure item row exists in DB before updating its state
  • Prevents silent ItemNotFound failures when rolling back in-memory items without DB persistence

🤖 Generated with autopilot

…uity

Items collected from DataSource live in-memory only and may not exist
in the DB when rollback_running_to_pending() is called during graceful
shutdown. The UPDATE call would silently fail with ItemNotFound, losing
the previous_worktree_path on restart. Now the rollback ensures the
item row exists (via insert) before updating its worktree state.

Closes #679

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@kys0213 kys0213 added the autopilot:auto Autopilot auto PR label Mar 30, 2026
@kys0213 kys0213 merged commit 6717124 into main Mar 30, 2026
4 checks passed
@kys0213 kys0213 deleted the feature/issue-679 branch March 30, 2026 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autopilot:auto Autopilot auto PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(daemon): maintain worktree continuity across graceful shutdown

1 participant