1.6 KiB
1.6 KiB
| title | state | created_at | updated_at | assignee | queued_by | queued_at |
|---|---|---|---|---|---|---|
| Type Workdir cleanup plan status | done | 2026-07-13T12:45:21Z | 2026-07-13T12:56:55Z | null | yoi ticket | 2026-07-13T12:46:05Z |
背景
Runtime と workspace-server はどちらも Rust であり、Runtime catalog の Workdir status / cleanliness は worker-runtime の typed enum として共有できる。それにもかかわらず cleanup plan は file_status: String / cleanliness: String に落として判定しており、WorkingDirectoryStatusKind::NotFound が notfound になるバグを起こした。
Rust 内部の cleanup policy 判定では文字列化せず、typed enum / 明示的 parse 境界に閉じる。
要件
CleanupWorkdirCandidate.file_statusを文字列ではなく typed enum にする。CleanupWorkdirCandidate.cleanlinessを文字列ではなく typed enum にする。- Runtime observation 由来の Workdir status / cleanliness は
worker-runtimeの型から typed に変換する。 - DB registry 由来の status / cleanliness は明示的な parse 境界で typed に変換し、未知値は
unknownとして扱う。 - cleanup action 判定は string match ではなく enum match にする。
- JSON API では従来通り snake_case string として serialize される。
受け入れ条件
not_foundWorkdir が型付き判定でworkdir_record_deleteになる。cleanWorkdir が型付き cleanliness 判定でworkdir_clean_cleanupになる。- Rust 内部 cleanup policy に
format!("{:?}").to_lowercase()や status string match が残らない。 - workspace-server tests と Nix build が通る。