## 作成 LocalTicketBackend によって作成されました。 --- ## Intake summary Marked ready by `yoi ticket state`. --- ## State changed Marked ready by `yoi ticket state`. --- ## State changed Ticket を `yoi ticket` が queued にしました。 --- ## State changed State changed to `inprogress`. --- ## Implementation report Changed Worker cleanup execution to stop the selected Worker before Runtime deletion. Root cause: - Runtime `delete_worker` rejects active Workers with `worker is running and must be stopped before deletion`. - The cleanup plan can present a Worker as cleanup-eligible when the browser-facing projected state is not `running` (for example execution rejected/unconnected) while Runtime status is still active. - Cleanup execution previously called Runtime delete directly, causing `workspace_cleanup_worker_runtime_delete_rejected`. Changes: - `cleanup_runtime_worker_for_execution` now calls `stop_worker` first with a cleanup reason. - If stop is rejected, the cleanup fails with `workspace_cleanup_worker_runtime_stop_rejected` and preserves Runtime diagnostics. - Only after accepted stop does cleanup call Runtime delete and then delete the Backend registry row. - Unknown-worker during stop/delete remains idempotent for stale Backend registry cleanup. Manual observation: - Direct Runtime DELETE for worker 1 returned HTTP 400: `worker 1 is running and must be stopped before deletion`. - Direct Runtime stop followed by delete succeeded, confirming the required operation sequence. Validation: - `cargo fmt --check` - `git diff --check` - `cargo check -q` - `cargo test -q -p yoi-workspace-server` - targeted cleanup execution test - `nix build .#yoi --no-link` --- ## State changed State changed to `done`. --- ## State changed Ticket を closed にしました。 --- ## 完了 Ticket `00001KXDWAXTS` (`Stop Worker before cleanup deletion`) はすでに `state: done` に到達していたため、workspace Dashboard から close しました。 この Close action によって、実装作業、state 変更、Orchestrator/Companion launch、worker invocation は開始されていません。 ---