2.9 KiB
2.9 KiB
作成
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
Worker lifecycle と Workdir lifecycle を分離した。
変更点:
stop_workerからmaterializer.cleanup(binding)を削除し、Worker stop/delete で Workdir 実体を削除しないようにした。- live execution map の
working_directoryfield は stop cleanup 用だけだったため削除した。 spawn_workerの failure rollback 対象を「この spawn request で新規 materialize した binding」だけに限定した。- rollback は
cleanup(binding)ではなくcleanup_working_directory(id)を使い、worktree 実体だけでなく record root も消して corrupted 残骸を残さないようにした。 - 既存 Workdir bind の spawn failure では Workdir を cleanup しない。
追加テスト:
stopping_and_deleting_worker_preserves_bound_working_directoryspawn_failure_with_existing_working_directory_preserves_workdirspawn_failure_with_new_materialization_rolls_back_workdir_record
検証:
cargo test -p worker-runtime --features ws-server,fs-store stopping_and_deleting_worker_preserves_bound_working_directory --quietcargo test -p worker-runtime --features ws-server,fs-store spawn_failure_with_existing_working_directory_preserves_workdir --quietcargo test -p worker-runtime --features ws-server,fs-store spawn_failure_with_new_materialization_rolls_back_workdir_record --quietcargo test -p worker-runtime --features ws-server,fs-store worker_backend --quietcargo fmt --checkgit diff --check
State changed
Ticket を closed にしました。
完了
Worker stop/delete no longer cleans up Workdir materialization. Spawn failure rollback is limited to newly materialized Workdirs and uses Workdir cleanup by id so rollback does not leave corrupted records. Existing Workdir binds survive spawn failures.