2.7 KiB
2.7 KiB
Worker workspace identity / WorkspaceBackend boundary を実装・レビュー・merge・検証した。
実装内容:
- Worker-held
workspace_root: PathBufidentity を削除し、path-freeWorkerWorkspaceContext,WorkspaceId,WorkspaceClientに置き換えた。 - Worker は
workspace_contextとfilesystem_authorityを分離して保持し、local filesystem authority はWorkerFilesystemAuthority::{None, Local(LocalWorkingDirectory)}に閉じ込めた。 - Worker constructors / restore / spawn paths を workspace context と filesystem authority の分離形に更新した。
- Runtime 側に
RuntimeWorkspaceBackendRefを追加し、host-owned local backend binding から narrow Worker workspace context を注入するようにした。 workspace_id/clientが存在しても local filesystem authority を意味しないようにした。- no-filesystem Workers では memory/workflow local layouts を workspace path fallback せず unavailable/fail-closed にした。
- legacy metadata
workspace_rootは compatibility/local filesystem hint として、WorkerFilesystemAuthority::Local由来の場合だけ扱うようにした。 - tests で path-free workspace identity/client と local cwd/root の分離、filesystem authority なしの workspace client、local path-returning Worker workspace accessor 不在、constructor/restore/spawn behavior を確認した。
Review:
- Reviewer approved with no blockers。
- Evidence included path-free Worker context, no Worker
workspace_root()accessor, Runtime/host backend materialization boundary, workspace-client-without-filesystem tests, fail-closed local workspace features, and legacy metadata confinement。 - Non-blocking note:
set_active_with_workspace_contextpreserves existing metadata fields when passedNone; future no-workspace reuse of an existing Pod name may want explicit clearing semantics to avoid stale UI hints。
Merge / validation:
- Merge commit:
391f11fc merge: workspace backend worker context。 - Final validation passed:
rg -n 'workspace_root' crates/worker crates/worker-runtime crates/client crates/workspace-server || truerg -n 'worker\\.workspace_root|pub fn workspace_root|fn workspace_root' crates/worker crates/worker-runtime crates/client crates/workspace-server || truegit diff --checkcargo test -p worker --lib --testscargo test -p worker-runtime --features ws-server,fs-storecargo test -p yoi-workspace-server --libcargo check -p yoicd web/workspace && deno task checkcd web/workspace && deno task testyoi ticket doctornix build .#yoi --no-link
- Validation log:
/run/user/1000/yoi/yoi-orchestrator/bash-output/workspace-backend-final-validation-1783732052.txt