From 5d4cb9b3fe4ac1e5de554bfadf49f68665825e22 Mon Sep 17 00:00:00 2001 From: Hare Date: Sat, 11 Jul 2026 10:07:12 +0900 Subject: [PATCH] ticket: approve workspace backend implementation --- .yoi/tickets/00001KX6Y6ZEA/item.md | 2 +- .yoi/tickets/00001KX6Y6ZEA/thread.md | 30 ++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/.yoi/tickets/00001KX6Y6ZEA/item.md b/.yoi/tickets/00001KX6Y6ZEA/item.md index be869b98..7e4eb2cf 100644 --- a/.yoi/tickets/00001KX6Y6ZEA/item.md +++ b/.yoi/tickets/00001KX6Y6ZEA/item.md @@ -3,7 +3,7 @@ title: 'Replace Worker workspace_root path with WorkspaceBackend' state: 'inprogress' priority: 'P1' created_at: '2026-07-10T21:16:22Z' -updated_at: '2026-07-11T00:59:55Z' +updated_at: '2026-07-11T01:07:06Z' assignee: null queued_by: 'workspace-panel' queued_at: '2026-07-10T22:03:27Z' diff --git a/.yoi/tickets/00001KX6Y6ZEA/thread.md b/.yoi/tickets/00001KX6Y6ZEA/thread.md index 85f32f1e..b22ade57 100644 --- a/.yoi/tickets/00001KX6Y6ZEA/thread.md +++ b/.yoi/tickets/00001KX6Y6ZEA/thread.md @@ -273,3 +273,33 @@ Next action: - Route to external Reviewer Pod before merge/close decisions。 --- + + + +## Review: approve + +External review result: approve + +Evidence: +- Worker identity is path-free: `WorkerWorkspaceContext` carries `Option` plus narrow `WorkspaceClient`/unavailable state, while `Worker` stores `workspace_context` and `filesystem_authority` instead of a `workspace_root: PathBuf` (`crates/worker/src/worker.rs:61-109`, `384-405`)。 +- No `worker.workspace_root()` / local path-returning workspace accessor remains; local paths are exposed only through `WorkerFilesystemAuthority::Local` helpers such as `local_working_directory()` (`worker.rs:741-840`)。 +- Runtime/host boundary now resolves local workspace backend context before constructing Workers (`crates/worker-runtime/src/worker_backend.rs:321-390`), and Worker construction accepts injected workspace context + filesystem authority (`worker.rs:4219-4260`)。 +- Workspace/client without filesystem and no-workspace/no-filesystem Workers are represented and covered by tests (`worker.rs:5441-5530`; worker-runtime tests around `901+`)。 +- Workspace-aware local features fail closed when no local filesystem authority is available; Ticket/memory/workflow/spawn-dependent surfaces require `filesystem_authority.local()` and otherwise return unavailable errors rather than cwd/root fallback (`crates/worker/src/controller.rs:630-672`, `709-779`)。 +- Legacy `workspace_root` metadata is written only as a compatibility/local hint from local filesystem authority, not as Worker identity (`worker.rs:4604-4621`; `session-store/src/worker_metadata.rs`)。 + +Validation performed: +- `git diff --check 142b60e1^ 142b60e1` +- Focused grep for forbidden `workspace_root()` accessor: no matches。 +- Focused tests: + - `cargo test -p worker spawned_context_tests --lib` + - `cargo test -p worker-runtime worker_spawn_receives_materialized_workspace_cwd_instead_of_source_repo --features ws-server,fs-store` + - `cargo test -p worker-runtime adapter_dispatches_user_input_through_worker_run_lifecycle --features ws-server,fs-store` + +Blockers: none。 + +Non-blocking notes: +- Remaining `workspace_root` hits are local runtime/entrypoint/spawn-tool adapter, legacy metadata, or test contexts; reviewer did not find Worker identity/accessor use。 +- `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。 + +---