From 437ef5b56b72496ee2d5236f9e6b0acca73d8759 Mon Sep 17 00:00:00 2001 From: Hare Date: Thu, 25 Jun 2026 06:23:06 +0900 Subject: [PATCH] ticket: route plugin service lifecycle task --- .../artifacts/orchestration-plan.jsonl | 1 + .yoi/tickets/00001KVXK0WDQ/item.md | 2 +- .yoi/tickets/00001KVXK0WDQ/thread.md | 77 +++++++++++++++++++ 3 files changed, 79 insertions(+), 1 deletion(-) diff --git a/.yoi/tickets/00001KVXK0WDQ/artifacts/orchestration-plan.jsonl b/.yoi/tickets/00001KVXK0WDQ/artifacts/orchestration-plan.jsonl index 17d18943..f4a488ce 100644 --- a/.yoi/tickets/00001KVXK0WDQ/artifacts/orchestration-plan.jsonl +++ b/.yoi/tickets/00001KVXK0WDQ/artifacts/orchestration-plan.jsonl @@ -1 +1,2 @@ {"id":"orch-plan-20260624-201335-1","ticket_id":"00001KVXK0WDQ","kind":"blocked_by","related_ticket":"00001KVXK0WDH","note":"Queue review: `00001KVXK0WDQ` は Service lifecycle / ingress queue runtime slice だが、Component Model-only runtime authority / manifest rejection slice `00001KVXK0WDH` に depends_on している。prerequisite completion 後に再 routing する。","author":"yoi-orchestrator","at":"2026-06-24T20:13:35Z"} +{"id":"orch-plan-20260624-212209-2","ticket_id":"00001KVXK0WDQ","kind":"accepted_plan","accepted_plan":{"summary":"Ticket `00001KVXK0WDQ` は prerequisites `00001KVXK0WD3` と `00001KVXK0WDH` が done になったため implementation_ready。専用 worktree `/home/hare/Projects/yoi/.worktree/00001KVXK0WDQ-plugin-service-lifecycle` と branch `work/00001KVXK0WDQ-plugin-service-lifecycle` で、Plugin Service lifecycle と ingress queue runtime を実装する。Output command model / WebSocket driver / WIT-PDK templates は後続 Tickets に残す。","branch":"work/00001KVXK0WDQ-plugin-service-lifecycle","worktree":"/home/hare/Projects/yoi/.worktree/00001KVXK0WDQ-plugin-service-lifecycle","role_plan":"Orchestrator: accept/routing, worktree creation, final integration/validation/cleanup. Coder: implement service lifecycle and ingress queue runtime in dedicated child worktree. Reviewer: read-only review focusing on bounded in-process event queue, no WebSocket driver/output command scope creep, grant/capability boundaries, and component Tool regression."},"author":"yoi-orchestrator","at":"2026-06-24T21:22:09Z"} diff --git a/.yoi/tickets/00001KVXK0WDQ/item.md b/.yoi/tickets/00001KVXK0WDQ/item.md index 957ae605..cb1f2e31 100644 --- a/.yoi/tickets/00001KVXK0WDQ/item.md +++ b/.yoi/tickets/00001KVXK0WDQ/item.md @@ -2,7 +2,7 @@ title: 'Define Plugin Service lifecycle and ingress queue runtime' state: 'queued' created_at: '2026-06-24T19:51:56Z' -updated_at: '2026-06-24T20:13:35Z' +updated_at: '2026-06-24T21:22:37Z' assignee: null queued_by: 'workspace-panel' queued_at: '2026-06-24T20:12:00Z' diff --git a/.yoi/tickets/00001KVXK0WDQ/thread.md b/.yoi/tickets/00001KVXK0WDQ/thread.md index 021411dc..7f63816f 100644 --- a/.yoi/tickets/00001KVXK0WDQ/thread.md +++ b/.yoi/tickets/00001KVXK0WDQ/thread.md @@ -30,4 +30,81 @@ Marked ready by `yoi ticket state`. Ticket を `workspace-panel` が queued にしました。 +--- + + + +## Decision + +Routing decision: implementation_ready + +Reason: +- Dashboard Queue により人間が Orchestrator routing を許可した queued Ticket として確認した。 +- `00001KVXK0WDQ` は Service lifecycle / ingress queue runtime の concrete slice で、WebSocket driver、output command model、WIT/PDK/templates update を non-goal として後続に分離している。 +- outgoing `depends_on` は `00001KVXK0WDH` だが、`00001KVXK0WDH` は done / merged / reviewed / validated 済み。`TicketShow` derived blockers は空で、implementation acceptance blocker は残っていない。 +- incoming dependents (`00001KVXK0WDX`, `00001KVXK0WE4`) はこの Ticket 完了後に進めるべき後続であり、この Ticket の acceptance blocker ではない。 +- bounded context check で `crates/pod/src/feature/plugin.rs` の current `PluginInstanceRegistry`, `PluginInstanceHandle`, `PluginIngressEvent`, `PluginIngressDispatchReport`, `ComponentInstanceRuntime` lifecycle methods を確認した。Ticket は in-process service lifecycle / bounded ingress queue / serial dispatch / diagnostics に収まっており、残る不確実性は local implementation に閉じる。 + +Evidence checked: +- Ticket body / thread: `item.md`, `thread.md`。未解決 planning question は記録されていない。 +- Relations / orchestration plan: outgoing depends_on `00001KVXK0WDH` は done。routing 前 plan は historical blocked_by `00001KVXK0WDH` のみで、prerequisite 完了により解消済み。accepted plan `orch-plan-20260624-212209-2` を記録済み。 +- Related Tickets: `00001KVXK0WD3` / `00001KVXK0WDH` は done。 +- Code context: `crates/pod/src/feature/plugin.rs` の service/ingress registration, instance registry, start/status/stop/handle-ingress, component runtime tests。 +- Workspace state: `/home/hare/Projects/yoi/.worktree/orchestration` は clean。inprogress Ticket は 0 件。 + +IntentPacket: + +Intent: +- Plugin Service を host-managed lifecycle と bounded ingress queue を持つ in-process runtime として扱い、`start()` を initialization-only にし、後続 ingress events を queue 経由で serial dispatch できるようにする。 + +Binding decisions / invariants: +- Existing Tool Plugin execution は request-response operation として維持し、service queue に巻き込まない。 +- v0 dispatch は per-plugin serial dispatch。concurrent per-plugin event execution は non-goal。 +- Queue は bounded。full / timeout / failed service / stop 中 event / invalid event は typed error / diagnostic として扱う。 +- `start()` は long-running loop / polling loop / recv loop を担わない。 +- Durable cross-process event queue は non-goal。まず host-managed in-process queue/lifecycle として実装する。 +- WebSocket driver と output command model は後続 Tickets (`00001KVXK0WE4`, `00001KVXK0WDX`) に残す。 +- Component Model-only runtime authority and manifest rejection from prerequisites must not regress. + +Requirements / acceptance criteria: +- Service Plugin instance が ready/starting/running/stopping/stopped/failed 相当の lifecycle state を持つ。 +- `start()` return 後も ingress event を queue 経由で配送できる。 +- Ingress event has source / ingress name / payload / created_at / attempt / correlation id. +- Queue depth / lifecycle state / last error / dispatch counters are visible in status diagnostics. +- Unit tests cover lifecycle start/stop/failure, bounded queue full, serial dispatch, timeout/failure diagnostics, stop-time event rejection, Tool execution regression. +- `cargo test -p pod`, `cargo check -p yoi`, `git diff --check`, `nix build .#yoi --no-link` are validation targets. + +Implementation latitude: +- Choose exact structs/enums/names and whether queue processing is sync-step driven or background worker, as long as start returns promptly and dispatch remains host-managed/serial. +- Existing `PluginInstanceRegistry` may be extended or refactored if authority boundaries remain clear. +- Tests may use existing `test-ingress` runtime or focused component fixtures. + +Escalate if: +- Implementation requires durable cross-process queue or scheduler semantics. +- WebSocket driver or output command model must be implemented to make lifecycle tests pass. +- Component Tool execution has to be routed through service queue. +- Host API grant/runtime authority or Component Model manifest behavior needs redesign. + +Validation: +- `cargo test -p pod` +- `cargo check -p yoi` +- `git diff --check` +- `nix build .#yoi --no-link` +- Focused tests for service lifecycle/queue may be run during development. + +Current code map: +- Primary: `crates/pod/src/feature/plugin.rs`。 +- Secondary only if needed: manifest service/ingress declarations and docs comments. +- Avoid: WebSocket driver, output command model, WIT/PDK/templates event update, remote runtime protocol, durable cross-process queue. + +Critical risks / reviewer focus: +- accidentally making Service runtime a scheduler/durable queue. +- Tool execution regression or Tool path accidentally using Service queue. +- unbounded queue or hidden background loop. +- missing stop/failure/timeout diagnostics. +- scope creep into WebSocket/output commands/WIT-PDK. + +Next action: +- `queued -> inprogress` を記録してから worktree-workflow で `/home/hare/Projects/yoi/.worktree/00001KVXK0WDQ-plugin-service-lifecycle` を作成し、multi-agent-workflow で Coder/Reviewer sibling loop に進める。 + ---