diff --git a/.yoi/tickets/00001KX6Y6ZEA/item.md b/.yoi/tickets/00001KX6Y6ZEA/item.md index 7e4eb2cf..b555d218 100644 --- a/.yoi/tickets/00001KX6Y6ZEA/item.md +++ b/.yoi/tickets/00001KX6Y6ZEA/item.md @@ -1,9 +1,9 @@ --- title: 'Replace Worker workspace_root path with WorkspaceBackend' -state: 'inprogress' +state: 'closed' priority: 'P1' created_at: '2026-07-10T21:16:22Z' -updated_at: '2026-07-11T01:07:06Z' +updated_at: '2026-07-11T01:09:59Z' assignee: null queued_by: 'workspace-panel' queued_at: '2026-07-10T22:03:27Z' diff --git a/.yoi/tickets/00001KX6Y6ZEA/resolution.md b/.yoi/tickets/00001KX6Y6ZEA/resolution.md new file mode 100644 index 00000000..59e440d6 --- /dev/null +++ b/.yoi/tickets/00001KX6Y6ZEA/resolution.md @@ -0,0 +1,32 @@ +Worker workspace identity / WorkspaceBackend boundary を実装・レビュー・merge・検証した。 + +実装内容: +- Worker-held `workspace_root: PathBuf` identity を削除し、path-free `WorkerWorkspaceContext`, `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_context` preserves existing metadata fields when passed `None`; 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 || true` + - `rg -n 'worker\\.workspace_root|pub fn workspace_root|fn workspace_root' crates/worker crates/worker-runtime crates/client crates/workspace-server || true` + - `git diff --check` + - `cargo test -p worker --lib --tests` + - `cargo test -p worker-runtime --features ws-server,fs-store` + - `cargo test -p yoi-workspace-server --lib` + - `cargo check -p yoi` + - `cd web/workspace && deno task check` + - `cd web/workspace && deno task test` + - `yoi ticket doctor` + - `nix build .#yoi --no-link` +- Validation log: `/run/user/1000/yoi/yoi-orchestrator/bash-output/workspace-backend-final-validation-1783732052.txt` \ No newline at end of file diff --git a/.yoi/tickets/00001KX6Y6ZEA/thread.md b/.yoi/tickets/00001KX6Y6ZEA/thread.md index b22ade57..7128b463 100644 --- a/.yoi/tickets/00001KX6Y6ZEA/thread.md +++ b/.yoi/tickets/00001KX6Y6ZEA/thread.md @@ -303,3 +303,93 @@ Non-blocking notes: - `set_active_with_workspace_context` preserves existing metadata fields when passed `None`; acceptable for this Ticket as compatibility metadata, but future no-workspace reuse of an existing Pod name may want explicit clearing semantics to avoid stale UI hints。 --- + + + +## Implementation report + +Merge / final validation report: + +- Reviewer approved the implementation with no blockers。 +- Merged branch `work/00001KX6Y6ZEA-workspace-backend` into orchestration branch with merge commit `391f11fc merge: workspace backend worker context`。 +- Final validation was rerun in `/home/hare/Projects/yoi/.worktree/orchestration` after merge。 + +Validation passed: +- `rg -n 'workspace_root' crates/worker crates/worker-runtime crates/client crates/workspace-server || true` with remaining hits limited to legacy metadata/local adapter/test contexts。 +- `rg -n 'worker\\.workspace_root|pub fn workspace_root|fn workspace_root' crates/worker crates/worker-runtime crates/client crates/workspace-server || true`; no Worker identity/accessor hits were found. The expected unrelated workspace-server project-record accessor remains outside Worker identity。 +- `git diff --check` +- `cargo test -p worker --lib --tests` +- `cargo test -p worker-runtime --features ws-server,fs-store` +- `cargo test -p yoi-workspace-server --lib` +- `cargo check -p yoi` +- `cd web/workspace && deno task check` +- `cd web/workspace && deno task test` +- `yoi ticket doctor` +- `nix build .#yoi --no-link` + +Validation log: +- `/run/user/1000/yoi/yoi-orchestrator/bash-output/workspace-backend-final-validation-1783732052.txt` + +Reviewed/merged implementation commit: +- `142b60e1 refactor: separate worker workspace identity` + +Non-blocking reviewer note: +- `set_active_with_workspace_context` preserves existing metadata fields when passed `None`; acceptable for this Ticket as compatibility metadata, but future no-workspace reuse of an existing Pod name may want explicit clearing semantics to avoid stale UI hints。 + +--- + + + +## State changed + +Implementation was reviewed, merged into orchestration branch, and final validation passed. Moving to done before closure. + +--- + + + +## State changed + +Ticket を closed にしました。 + + +--- + + + +## 完了 + +Worker workspace identity / WorkspaceBackend boundary を実装・レビュー・merge・検証した。 + +実装内容: +- Worker-held `workspace_root: PathBuf` identity を削除し、path-free `WorkerWorkspaceContext`, `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_context` preserves existing metadata fields when passed `None`; 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 || true` + - `rg -n 'worker\\.workspace_root|pub fn workspace_root|fn workspace_root' crates/worker crates/worker-runtime crates/client crates/workspace-server || true` + - `git diff --check` + - `cargo test -p worker --lib --tests` + - `cargo test -p worker-runtime --features ws-server,fs-store` + - `cargo test -p yoi-workspace-server --lib` + - `cargo check -p yoi` + - `cd web/workspace && deno task check` + - `cd web/workspace && deno task test` + - `yoi ticket doctor` + - `nix build .#yoi --no-link` +- Validation log: `/run/user/1000/yoi/yoi-orchestrator/bash-output/workspace-backend-final-validation-1783732052.txt` + +---