From 0f2d7263a82f27731937518154fd62ca8efe07c7 Mon Sep 17 00:00:00 2001 From: Hare Date: Sat, 11 Jul 2026 07:45:08 +0900 Subject: [PATCH] ticket: close worker filesystem authority work --- .yoi/tickets/00001KX6Y2A9Q/item.md | 4 +- .yoi/tickets/00001KX6Y2A9Q/resolution.md | 32 +++++++++ .yoi/tickets/00001KX6Y2A9Q/thread.md | 90 ++++++++++++++++++++++++ 3 files changed, 124 insertions(+), 2 deletions(-) create mode 100644 .yoi/tickets/00001KX6Y2A9Q/resolution.md diff --git a/.yoi/tickets/00001KX6Y2A9Q/item.md b/.yoi/tickets/00001KX6Y2A9Q/item.md index d85f9730..9e612c7d 100644 --- a/.yoi/tickets/00001KX6Y2A9Q/item.md +++ b/.yoi/tickets/00001KX6Y2A9Q/item.md @@ -1,9 +1,9 @@ --- title: 'Implement WorkerFilesystemAuthority for no-workdir Workers' -state: 'inprogress' +state: 'closed' priority: 'P1' created_at: '2026-07-10T21:13:49Z' -updated_at: '2026-07-10T22:40:35Z' +updated_at: '2026-07-10T22:45:01Z' assignee: null queued_by: 'workspace-panel' queued_at: '2026-07-10T21:51:00Z' diff --git a/.yoi/tickets/00001KX6Y2A9Q/resolution.md b/.yoi/tickets/00001KX6Y2A9Q/resolution.md new file mode 100644 index 00000000..6bc8d986 --- /dev/null +++ b/.yoi/tickets/00001KX6Y2A9Q/resolution.md @@ -0,0 +1,32 @@ +Worker filesystem authority の明示境界を実装・レビュー・merge・検証した。 + +実装内容: +- `WorkerFilesystemAuthority::{None, Local(LocalWorkingDirectory)}` を追加。 +- `LocalWorkingDirectory` は filesystem authority `root` と default `cwd` を分離して保持する。 +- Worker-level `cwd: PathBuf` field と `worker.cwd()` accessor を削除。 +- core filesystem/Bash tool registration は local filesystem authority がある場合だけ行うようにした。 +- No-workdir Worker では `Read` / `Write` / `Edit` / `Glob` / `Grep` / `Bash` を construct/register/model-visible にしない。 +- Embedded no-workdir Worker spawn は Runtime/process cwd fallback ではなく `WorkerFilesystemAuthority::None` を明示的に渡す。 +- Ticket / worker-spawn / peer-discovery など cwd 依存箇所は local filesystem authority 必須に整理し、workspace root fallback を authority として使わないようにした。 +- tests で no-workdir tool omission、no cwd fallback、local/materialized Worker の filesystem/Bash behavior を確認。 + +Review: +- Reviewer approved with no blockers。 +- Evidence included explicit authority type, no Worker cwd field/accessor, filesystem/Bash registration gate, embedded Runtime authority construction, and tests。 +- Non-blocking note: workspace-context surfaces such as memory/MCP/resident prompt loading can still be backed by `workspace_root` when enabled; this is outside the focused core filesystem/Bash authority gate and may become follow-up if the invariant expands to “no local file reads of any kind”。 + +Merge / validation: +- Merge commit: `c29e9135 merge: worker filesystem authority`。 +- Final validation passed: + - `rg "worker\\.cwd\\(" crates || true` + - `rg "pub fn cwd\\(" crates/worker/src/worker.rs || 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/worker-fs-authority-final-validation-1783723253.txt` \ No newline at end of file diff --git a/.yoi/tickets/00001KX6Y2A9Q/thread.md b/.yoi/tickets/00001KX6Y2A9Q/thread.md index d6d50c22..3e113a1f 100644 --- a/.yoi/tickets/00001KX6Y2A9Q/thread.md +++ b/.yoi/tickets/00001KX6Y2A9Q/thread.md @@ -166,3 +166,93 @@ Non-blocking note: - Workspace-context surfaces such as memory/MCP/resident prompt loading can still be backed by `workspace_root` when enabled; this was treated as outside this Ticket’s focused core filesystem/Bash authority gate, but may need follow-up if the intended invariant becomes “no local file reads of any kind” for no-workdir Workers。 --- + + + +## Implementation report + +Merge / final validation report: + +- Reviewer approved the implementation with no blockers。 +- Merged branch `work/00001KX6Y2A9Q-worker-filesystem-authority` into orchestration branch with merge commit `c29e9135 merge: worker filesystem authority`。 +- Final validation was rerun in `/home/hare/Projects/yoi/.worktree/orchestration` after merge。 + +Validation passed: +- `rg "worker\\.cwd\\(" crates || true`: no matches。 +- `rg "pub fn cwd\\(" crates/worker/src/worker.rs || true`: no Worker cwd accessor matches。 +- `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/worker-fs-authority-final-validation-1783723253.txt` + +Reviewed/merged implementation commit: +- `b50b9461 feat: add explicit worker filesystem authority` + +Non-blocking reviewer note: +- Workspace-context surfaces such as memory/MCP/resident prompt loading can still be backed by `workspace_root` when enabled; this was treated as outside this Ticket’s focused core filesystem/Bash authority gate, but may be follow-up material if the intended invariant becomes “no local file reads of any kind” for no-workdir Workers。 + +--- + + + +## State changed + +Implementation was reviewed, merged into orchestration branch, and final validation passed. Moving to done before closure. + +--- + + + +## State changed + +Ticket を closed にしました。 + + +--- + + + +## 完了 + +Worker filesystem authority の明示境界を実装・レビュー・merge・検証した。 + +実装内容: +- `WorkerFilesystemAuthority::{None, Local(LocalWorkingDirectory)}` を追加。 +- `LocalWorkingDirectory` は filesystem authority `root` と default `cwd` を分離して保持する。 +- Worker-level `cwd: PathBuf` field と `worker.cwd()` accessor を削除。 +- core filesystem/Bash tool registration は local filesystem authority がある場合だけ行うようにした。 +- No-workdir Worker では `Read` / `Write` / `Edit` / `Glob` / `Grep` / `Bash` を construct/register/model-visible にしない。 +- Embedded no-workdir Worker spawn は Runtime/process cwd fallback ではなく `WorkerFilesystemAuthority::None` を明示的に渡す。 +- Ticket / worker-spawn / peer-discovery など cwd 依存箇所は local filesystem authority 必須に整理し、workspace root fallback を authority として使わないようにした。 +- tests で no-workdir tool omission、no cwd fallback、local/materialized Worker の filesystem/Bash behavior を確認。 + +Review: +- Reviewer approved with no blockers。 +- Evidence included explicit authority type, no Worker cwd field/accessor, filesystem/Bash registration gate, embedded Runtime authority construction, and tests。 +- Non-blocking note: workspace-context surfaces such as memory/MCP/resident prompt loading can still be backed by `workspace_root` when enabled; this is outside the focused core filesystem/Bash authority gate and may become follow-up if the invariant expands to “no local file reads of any kind”。 + +Merge / validation: +- Merge commit: `c29e9135 merge: worker filesystem authority`。 +- Final validation passed: + - `rg "worker\\.cwd\\(" crates || true` + - `rg "pub fn cwd\\(" crates/worker/src/worker.rs || 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/worker-fs-authority-final-validation-1783723253.txt` + +---