From e1f02ffca3b9068396ef94ab6f69293f490ce3a4 Mon Sep 17 00:00:00 2001 From: Hare Date: Mon, 22 Jun 2026 01:10:56 +0900 Subject: [PATCH 1/4] ticket: accept workspace host workers --- .../artifacts/orchestration-plan.jsonl | 1 + .yoi/tickets/00001KVNEKH9Q/item.md | 4 +- .yoi/tickets/00001KVNEKH9Q/thread.md | 83 +++++++++++++++++++ 3 files changed, 86 insertions(+), 2 deletions(-) create mode 100644 .yoi/tickets/00001KVNEKH9Q/artifacts/orchestration-plan.jsonl diff --git a/.yoi/tickets/00001KVNEKH9Q/artifacts/orchestration-plan.jsonl b/.yoi/tickets/00001KVNEKH9Q/artifacts/orchestration-plan.jsonl new file mode 100644 index 00000000..a15bfb99 --- /dev/null +++ b/.yoi/tickets/00001KVNEKH9Q/artifacts/orchestration-plan.jsonl @@ -0,0 +1 @@ +{"id":"orch-plan-20260621-161049-1","ticket_id":"00001KVNEKH9Q","kind":"accepted_plan","accepted_plan":{"summary":"Add read-only Workspace backend Host / Worker APIs over local Pod metadata/state, migrate/remove runners placeholder as needed, display Host/Worker list in static SPA, preserve Pod as implementation detail and avoid transcript/secret exposure.","branch":"impl/00001KVNEKH9Q-workspace-host-workers","worktree":"/home/hare/Projects/yoi/.worktree/00001KVNEKH9Q-workspace-host-workers","role_plan":"Orchestrator creates a dedicated child worktree and spawns a narrow-scope Coder. Reviewer will be spawned read-only after Coder reports implementation commit(s). After approval, Orchestrator integrates into `orchestration`, validates workspace-server/frontend/Nix as needed, records closure, and cleans only the child worktree/branch."},"author":"yoi-orchestrator","at":"2026-06-21T16:10:49Z"} diff --git a/.yoi/tickets/00001KVNEKH9Q/item.md b/.yoi/tickets/00001KVNEKH9Q/item.md index 46f6188e..5ad64f8f 100644 --- a/.yoi/tickets/00001KVNEKH9Q/item.md +++ b/.yoi/tickets/00001KVNEKH9Q/item.md @@ -1,8 +1,8 @@ --- title: 'Workspace backend: expose local host and worker list' -state: 'queued' +state: 'inprogress' created_at: '2026-06-21T16:00:49Z' -updated_at: '2026-06-21T16:09:10Z' +updated_at: '2026-06-21T16:10:49Z' assignee: null queued_by: 'workspace-panel' queued_at: '2026-06-21T16:09:10Z' diff --git a/.yoi/tickets/00001KVNEKH9Q/thread.md b/.yoi/tickets/00001KVNEKH9Q/thread.md index b45abe3e..a723c109 100644 --- a/.yoi/tickets/00001KVNEKH9Q/thread.md +++ b/.yoi/tickets/00001KVNEKH9Q/thread.md @@ -30,4 +30,87 @@ Marked ready by `yoi ticket state`. Ticket を `workspace-panel` が queued にしました。 +--- + + + +## Decision + +Routing decision: `implementation_ready` + +Reason: +- Ticket body は Workspace backend に local Host / Worker read API を追加し、Web UI skeleton に表示する範囲まで具体化されている。 +- Related Ticket `00001KVMFFYVX` は Workspace web control plane bootstrap で、既に `closed` / integrated。This Ticket はその read-only API / SPA skeleton の自然な follow-up。 +- Relation metadata は `related` のみで blocker relation はない。 +- Current queued Ticket はこの Ticket のみ。 +- Orchestrator worktree is clean on `orchestration` at `7abc3c77` before routing side effects; target worktree / branch is not present。 +- Visible Pods に対象 Ticket の child Pod は存在しない。 + +Evidence checked: +- Ticket body / thread / artifacts via `TicketShow` and direct `item.md` read。 +- `TicketRelationQuery(00001KVNEKH9Q)`: one non-blocking `related` relation to closed `00001KVMFFYVX`。 +- `TicketOrchestrationPlanQuery(00001KVNEKH9Q)`: no records。 +- `TicketList(state=queued)`: this Ticket is the only queued Ticket。 +- Orchestrator git state / worktree list / branch list checked from `/home/hare/Projects/yoi/.worktree/orchestration` only。 +- Bounded code map: + - `crates/workspace-server/src/{server.rs,store.rs,records.rs}` contains current read-only workspace/ticket/objective/runs/runners API skeleton。 + - `web/workspace/src/routes/+page.svelte` currently renders workspace/tickets/objectives/runs/runners sections through Deno/SvelteKit frontend。 + - `crates/pod-store/src/lib.rs` contains current Pod metadata authority (`{data_dir}/pods//metadata.json`) and list/read helpers。 + - `manifest::paths::data_dir()` resolves local data dir. + +IntentPacket: + +Intent: +- Extend the Workspace web control plane so it can display the local execution environment as Host / Worker domain objects, with local Pods exposed only as implementation details。 + +Binding decisions / invariants: +- API naming should prioritize Host / Worker; Pod remains implementation detail under `implementation.kind = "local_pod"` / `pod_name` fields。 +- This is read-only local bridge over existing Pod metadata/state; do not mutate Pod metadata, session logs, Tickets, Objectives, or runtime state。 +- Do not expose secrets, prompt contents, session transcript contents, tool result contents, or hidden metadata。 +- Missing/unreadable local Pod data dir must degrade to empty worker list + bounded diagnostic or host capability unavailable, not a process-fatal error。 +- Existing `.yoi` Ticket / Objective canonical workflows remain unchanged。 +- This is not remote runner / cloud runner registration protocol, scheduling, start/stop/attach/notify, or full run-worker correlation。 +- Existing `/api/runners` placeholder may be removed or migrated to host/worker naming; breaking API change is acceptable。 +- Frontend remains static SPA; do not introduce SSR/business authority。 + +Requirements / acceptance criteria: +- `GET /api/hosts` returns backend-local Host as bounded JSON with stable-ish `host_id`, label, kind/status, observed/last-seen timestamp, and bounded capability summary。 +- `GET /api/workers` or `GET /api/hosts/{host_id}/workers` returns Worker list from local Pod metadata/state。 +- Worker response uses `worker_id`, `host_id`, `label`/`pod_name`, optional role/profile if known, `workspace_root`, state/status, `implementation: { kind: "local_pod", pod_name: ... }`, and bounded diagnostics。 +- Local Pod metadata absence/unreadability yields safe empty/diagnostic response。 +- `/api/runners` placeholder is removed or migrated to Host/Worker naming and tests/frontend are updated。 +- Web UI displays Host / Worker list。 +- Focused tests cover host list, worker list, missing local Pod data dir, and redaction/bounds。 + +Implementation latitude: +- Reuse `pod-store` crate for metadata listing if practical; otherwise use a narrow read-only adapter with the same authority/path semantics。 +- Host id can be deterministic local id derived from workspace/data-dir/machine label if no existing host id exists; keep it stable-ish and non-secret。 +- Worker status can be coarse from metadata active flag / socket hint if available; avoid live socket probing unless bounded and read-only。 +- Runners placeholder can be removed or preserved only as compatibility alias if clearly documented; Ticket allows breaking migration to host naming。 +- Frontend UI can be simple table/cards; prioritize data shape and redaction over visual polish。 + +Escalate if: +- Pod metadata schema lacks enough information to derive bounded worker fields without reading session transcripts。 +- Need to read session JSONL contents to satisfy requested fields。 +- Host id generation would require storing new durable host metadata in `.yoi`。 +- Existing frontend/backend API shape requires a broad redesign beyond local bridge。 +- Deno/frontend tooling or package/Nix changes become unrelatedly unstable。 + +Validation plan: +- `cargo fmt --check` +- `cargo test -p yoi-workspace-server` +- `cargo check -p yoi-workspace-server` +- frontend: `cd web/workspace && deno task check && deno task build` +- `git diff --check` +- `cargo run -p yoi -- ticket doctor` +- `nix build .#yoi --no-link` if package/source-filter/frontend/dependency handling changed; otherwise strongly preferred because Workspace backend/frontend package surface is touched。 + +--- + + + +## State changed + +Human authorized queue routing from Workspace Dashboard. Ticket has concrete acceptance criteria, related bootstrap work is complete, and no blockers are recorded, so Orchestrator accepts implementation. + --- From b193e3e088f5a4a8860b3d55026edadb147eaae9 Mon Sep 17 00:00:00 2001 From: Hare Date: Mon, 22 Jun 2026 01:11:53 +0900 Subject: [PATCH 2/4] ticket: start workspace host workers --- .yoi/tickets/00001KVNEKH9Q/item.md | 2 +- .yoi/tickets/00001KVNEKH9Q/thread.md | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/.yoi/tickets/00001KVNEKH9Q/item.md b/.yoi/tickets/00001KVNEKH9Q/item.md index 5ad64f8f..4d711843 100644 --- a/.yoi/tickets/00001KVNEKH9Q/item.md +++ b/.yoi/tickets/00001KVNEKH9Q/item.md @@ -2,7 +2,7 @@ title: 'Workspace backend: expose local host and worker list' state: 'inprogress' created_at: '2026-06-21T16:00:49Z' -updated_at: '2026-06-21T16:10:49Z' +updated_at: '2026-06-21T16:11:47Z' assignee: null queued_by: 'workspace-panel' queued_at: '2026-06-21T16:09:10Z' diff --git a/.yoi/tickets/00001KVNEKH9Q/thread.md b/.yoi/tickets/00001KVNEKH9Q/thread.md index a723c109..ea5890f6 100644 --- a/.yoi/tickets/00001KVNEKH9Q/thread.md +++ b/.yoi/tickets/00001KVNEKH9Q/thread.md @@ -114,3 +114,28 @@ Validation plan: Human authorized queue routing from Workspace Dashboard. Ticket has concrete acceptance criteria, related bootstrap work is complete, and no blockers are recorded, so Orchestrator accepts implementation. --- + + + +## Implementation report + +Implementation start report: + +- Created child implementation worktree: + - `/home/hare/Projects/yoi/.worktree/00001KVNEKH9Q-workspace-host-workers` +- Created branch: + - `impl/00001KVNEKH9Q-workspace-host-workers` +- Base commit: + - `e1f02ffc ticket: accept workspace host workers` +- Confirmed tracked Ticket project records are visible in the child worktree。 +- Confirmed `.yoi/memory` has no tracked/untracked entries in the child worktree check。 +- Spawned sibling Coder Pod: + - `yoi-coder-00001KVNEKH9Q` +- Coder scope: + - read: `/home/hare/Projects/yoi` + - write: `/home/hare/Projects/yoi/.worktree/00001KVNEKH9Q-workspace-host-workers` + +Next action: +- Wait for Coder implementation report, then spawn Reviewer read-only for the implementation diff。 + +--- From 42c9e9144cd34def15e181a7aa1209eb38115b34 Mon Sep 17 00:00:00 2001 From: Hare Date: Mon, 22 Jun 2026 01:31:54 +0900 Subject: [PATCH 3/4] ticket: record workspace host worker implementation --- .yoi/tickets/00001KVNEKH9Q/item.md | 2 +- .yoi/tickets/00001KVNEKH9Q/thread.md | 43 ++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 1 deletion(-) diff --git a/.yoi/tickets/00001KVNEKH9Q/item.md b/.yoi/tickets/00001KVNEKH9Q/item.md index 4d711843..f0adcdf6 100644 --- a/.yoi/tickets/00001KVNEKH9Q/item.md +++ b/.yoi/tickets/00001KVNEKH9Q/item.md @@ -2,7 +2,7 @@ title: 'Workspace backend: expose local host and worker list' state: 'inprogress' created_at: '2026-06-21T16:00:49Z' -updated_at: '2026-06-21T16:11:47Z' +updated_at: '2026-06-21T16:31:48Z' assignee: null queued_by: 'workspace-panel' queued_at: '2026-06-21T16:09:10Z' diff --git a/.yoi/tickets/00001KVNEKH9Q/thread.md b/.yoi/tickets/00001KVNEKH9Q/thread.md index ea5890f6..f11b7a7f 100644 --- a/.yoi/tickets/00001KVNEKH9Q/thread.md +++ b/.yoi/tickets/00001KVNEKH9Q/thread.md @@ -139,3 +139,46 @@ Next action: - Wait for Coder implementation report, then spawn Reviewer read-only for the implementation diff。 --- + + + +## Implementation report + +Coder implementation report received from `yoi-coder-00001KVNEKH9Q`. + +Implementation commit: +- `58143ead feat: expose workspace hosts and workers` + +Changed areas observed by Orchestrator: +- `crates/workspace-server/src/hosts.rs` added: + - Host / Worker API domain models and local Pod metadata bridge。 + - Safe degradation for missing/unreadable Pod metadata directory via bounded diagnostics。 + - Redaction/bounding tests。 +- `crates/workspace-server/src/server.rs` updated: + - Host / Worker API routes added。 + - `/api/runners` placeholder removed/migrated away from runner naming。 + - Tests updated for host/worker API and static/API separation。 +- `crates/workspace-server/src/store.rs` updated: + - Runners placeholder removed。 +- `web/workspace/src/routes/+page.svelte` updated: + - UI displays Host / Worker list instead of runners placeholder。 +- Package/dependency updates: + - `crates/workspace-server/Cargo.toml` + - `Cargo.lock` + - `package.nix` + +Orchestrator evidence checked: +- Implementation worktree clean on `impl/00001KVNEKH9Q-workspace-host-workers`。 +- HEAD is `58143ead`。 +- Diff `e1f02ffc..HEAD` touches 8 expected backend/frontend/package files, about 913 insertions / 75 deletions。 +- `git diff --check e1f02ffc..HEAD` produced no diagnostics。 +- Validation had produced ignored frontend artifacts in child worktree: + - `web/workspace/node_modules/` + - `web/workspace/.svelte-kit/` + - `web/workspace/build/` +- Orchestrator removed those ignored artifacts before reviewer routing; tracked worktree remains clean。 + +Next action: +- Route to read-only Reviewer Pod for acceptance review against the Ticket。 + +--- From d4de8e26ce3e72f95621414724c539ee67e66f08 Mon Sep 17 00:00:00 2001 From: Hare Date: Mon, 22 Jun 2026 01:32:27 +0900 Subject: [PATCH 4/4] ticket: start workspace host worker review --- .yoi/tickets/00001KVNEKH9Q/item.md | 2 +- .yoi/tickets/00001KVNEKH9Q/thread.md | 31 ++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/.yoi/tickets/00001KVNEKH9Q/item.md b/.yoi/tickets/00001KVNEKH9Q/item.md index f0adcdf6..7e9bdb4c 100644 --- a/.yoi/tickets/00001KVNEKH9Q/item.md +++ b/.yoi/tickets/00001KVNEKH9Q/item.md @@ -2,7 +2,7 @@ title: 'Workspace backend: expose local host and worker list' state: 'inprogress' created_at: '2026-06-21T16:00:49Z' -updated_at: '2026-06-21T16:31:48Z' +updated_at: '2026-06-21T16:32:22Z' assignee: null queued_by: 'workspace-panel' queued_at: '2026-06-21T16:09:10Z' diff --git a/.yoi/tickets/00001KVNEKH9Q/thread.md b/.yoi/tickets/00001KVNEKH9Q/thread.md index f11b7a7f..d3a21767 100644 --- a/.yoi/tickets/00001KVNEKH9Q/thread.md +++ b/.yoi/tickets/00001KVNEKH9Q/thread.md @@ -182,3 +182,34 @@ Next action: - Route to read-only Reviewer Pod for acceptance review against the Ticket。 --- + + + +## Comment + +Review routing: + +Spawned read-only Reviewer Pod: +- `yoi-reviewer-00001KVNEKH9Q-r1` + +Review target: +- Worktree: `/home/hare/Projects/yoi/.worktree/00001KVNEKH9Q-workspace-host-workers` +- Branch: `impl/00001KVNEKH9Q-workspace-host-workers` +- Baseline: `e1f02ffc` +- Implementation commit: `58143ead feat: expose workspace hosts and workers` +- Diff: `e1f02ffc..58143ead` + +Reviewer scope: +- read-only `/home/hare/Projects/yoi` + +Reviewer focus: +- Host / Worker API domain shape and redaction/bounding。 +- Safe read-only local Pod metadata bridge。 +- Missing/unreadable Pod metadata dir degradation。 +- `/api/runners` placeholder migration/removal and frontend/test updates。 +- Static SPA displays Host / Worker list without backend authority changes。 +- Package/Nix/frontend generated artifact hygiene。 + +Orchestrator will wait for reviewer verdict before integration。 + +---