workspace: remove worker lifecycle state

This commit is contained in:
2026-07-11 13:33:49 +09:00
parent 13f9e0fab8
commit b877c92975
6 changed files with 142 additions and 52 deletions
+2 -2
View File
@@ -1,8 +1,8 @@
---
title: 'Remove durable worker lifecycle_state'
state: 'inprogress'
state: 'done'
created_at: '2026-07-11T04:08:12Z'
updated_at: '2026-07-11T04:09:06Z'
updated_at: '2026-07-11T04:33:35Z'
assignee: null
queued_by: 'yoi ticket'
queued_at: '2026-07-11T04:09:06Z'
+34
View File
@@ -39,4 +39,38 @@ Ticket を `yoi ticket` が queued にしました。
State changed to `inprogress`.
---
<!-- event: implementation_report author: hare at: 2026-07-11T04:33:35Z -->
## Implementation report
Removed durable worker lifecycle state from the Backend worker registry.
- `WorkerRegistryRecord` no longer has `lifecycle_state`.
- Active worker_registry CREATE/INSERT/SELECT/read paths no longer include lifecycle state.
- Added schema migration v4 to rebuild legacy worker_registry tables without the old lifecycle column.
- Registry-only Worker projection now reports `archived` instead of stale `idle`/`running`/`stopped` values.
- Live Worker merge no longer lets registry data overwrite Runtime status/state.
- Cleanup planning uses live Runtime workers for running-linked detection; registry records only provide retention/link metadata.
- Removed lifecycle_state from frontend cleanup candidate types/display.
Validation:
- cargo test -q -p yoi-workspace-server
- cd web/workspace && deno task check
- cd web/workspace && deno task test
- cargo test -q
- git diff --check
- nix build .#yoi --no-link
---
<!-- event: state_changed author: "yoi ticket" at: 2026-07-11T04:33:35Z from: inprogress to: done reason: cli_state field: state -->
## State changed
State changed to `done`.
---