From d32fb3bc3c82f1cb7e4a29d4fdf6e908ba495c7f Mon Sep 17 00:00:00 2001 From: Hare Date: Wed, 17 Jun 2026 18:49:29 +0900 Subject: [PATCH 1/2] ticket: route wasm runtime and panel readiness e2e --- .../artifacts/orchestration-plan.jsonl | 1 + .yoi/tickets/00001KV5W3PHW/item.md | 4 +- .yoi/tickets/00001KV5W3PHW/thread.md | 85 +++++++++++++++++++ .../artifacts/orchestration-plan.jsonl | 1 + .yoi/tickets/00001KV62PF32/item.md | 4 +- .yoi/tickets/00001KV62PF32/thread.md | 81 ++++++++++++++++++ 6 files changed, 172 insertions(+), 4 deletions(-) create mode 100644 .yoi/tickets/00001KV5W3PHW/artifacts/orchestration-plan.jsonl create mode 100644 .yoi/tickets/00001KV62PF32/artifacts/orchestration-plan.jsonl diff --git a/.yoi/tickets/00001KV5W3PHW/artifacts/orchestration-plan.jsonl b/.yoi/tickets/00001KV5W3PHW/artifacts/orchestration-plan.jsonl new file mode 100644 index 00000000..bc47f5f9 --- /dev/null +++ b/.yoi/tickets/00001KV5W3PHW/artifacts/orchestration-plan.jsonl @@ -0,0 +1 @@ +{"id":"orch-plan-20260617-094831-1","ticket_id":"00001KV5W3PHW","kind":"accepted_plan","accepted_plan":{"summary":"Accept minimal WASM Plugin Tool runtime. Implement no-ambient-authority module execution for enabled Plugin Tools with bounded input/output/errors, timeout/cancellation, deterministic module selection, and focused tests.","branch":"impl/00001KV5W3PHW-plugin-wasm-tool-runtime","worktree":"/home/hare/Projects/yoi/.worktree/00001KV5W3PHW-plugin-wasm-tool-runtime","role_plan":"Orchestrator creates dedicated implementation worktree and spawns Coder with write scope limited to that worktree. Reviewer will run read-only after implementation report. Can run in parallel with Panel E2E readiness fix because source surfaces are distinct."},"author":"yoi-orchestrator","at":"2026-06-17T09:48:31Z"} diff --git a/.yoi/tickets/00001KV5W3PHW/item.md b/.yoi/tickets/00001KV5W3PHW/item.md index a42db606..921bd5ad 100644 --- a/.yoi/tickets/00001KV5W3PHW/item.md +++ b/.yoi/tickets/00001KV5W3PHW/item.md @@ -1,8 +1,8 @@ --- title: 'Plugin: execute Plugin Tool with minimal WASM runtime' -state: 'queued' +state: 'inprogress' created_at: '2026-06-15T14:48:59Z' -updated_at: '2026-06-17T09:46:10Z' +updated_at: '2026-06-17T09:49:19Z' assignee: null readiness: 'implementation_ready' risk_flags: ['plugin', 'wasm', 'tool-runtime', 'sandbox', 'capability-boundary', 'cancellation'] diff --git a/.yoi/tickets/00001KV5W3PHW/thread.md b/.yoi/tickets/00001KV5W3PHW/thread.md index 335e8a4e..39cb24c0 100644 --- a/.yoi/tickets/00001KV5W3PHW/thread.md +++ b/.yoi/tickets/00001KV5W3PHW/thread.md @@ -13,4 +13,89 @@ LocalTicketBackend によって作成されました。 Ticket を `workspace-panel` が queued にしました。 +--- + + + +## Decision + +Routing decision: implementation_ready + +Reason: +- Panel Queue により routing が明示的に許可され、Ticket は `queued`。 +- Ticket body / thread / relations / OrchestrationPlan / Orchestrator workspace state を確認した。 +- `depends_on 00001KV5W3PHA` は `closed/done` 済みで、typed relation blocker は解消済み。 +- Incoming dependent `00001KV5W3PJ3` は本 Ticket の blocker ではなく、runtime path の grant enforcement 後続として扱う。 +- 本 Ticket は minimal WASM runtime による Plugin Tool execution の最初の実装であり、host API / fs / https / Service / Ingress / MCP / long-running process を明確に non-goal としている。 +- sandbox / tool-runtime / capability-boundary / cancellation risk は高いが、timeout、bounds、ambient authorityなし、structured error、deterministic module selection が Ticket に明記されているため、implementation_ready と判断する。 + +Evidence checked: +- Ticket body/thread: requirements、acceptance criteria、non-goals、validation、risk flags を確認。 +- Ticket relations: outgoing `depends_on 00001KV5W3PHA` は done/closed。related design `00001KSXRQ4G8` は blocker ではない。incoming `00001KV5W3PJ3` は dependent。 +- OrchestrationPlan: 既存 record なし。 +- Orchestrator workspace: `/home/hare/Projects/yoi/.worktree/orchestration` は clean、`bcb8068e` 上。 +- Visible Pods: implementation child Pod なし。 + +IntentPacket: + +Intent: +- Registered/enabled Plugin Tool call を minimal sandboxed WASM runtime に route し、bounded input/output/error と通常 Tool history 経路で安全に結果を返す。 + +Binding decisions / invariants: +- Runtime は ambient filesystem / network / environment authority を持たない。 +- Host API imports は tool input/output に必要な最小限のみ。`fs` / `https` は実装しない。 +- Plugin stdout/stderr相当や raw memory dump を無制限に history/model-visible context に入れない。 +- Tool call/result は通常 Tool history 経路を使い、hidden context injection をしない。 +- Timeout / cancellation / input size / output size / diagnostic size bounds を実装する。 +- Malformed JSON / schema mismatch / oversize output / non-terminating execution は fail closed。 +- Runtime module selection は package digest/runtime config に基づき deterministic。runtime-only mutable state に依存しない。 +- Permission grants / host API authority / fs/network は後続 Ticket。ここでは minimal no-authority runtime execution のみ。 + +Requirements / acceptance criteria: +- Enabled Plugin Tool invocation が Plugin runtime に route される。 +- Minimal WASM module load、tool input JSON delivery、tool output JSON receipt、structured error handling が実装される。 +- Ambient authority なしで実行される。 +- Bounds と timeout/cancellation が効く。 +- Invalid output は safe Tool error。 +- Successful Plugin Tool result は通常 Tool result として返る。 +- Runtime missing/malformed module/load failure は safe structured Tool error。 +- Tests cover success、malformed output、oversize output、timeout/cancellation、input bound、missing module、no ambient fs/network/env、normal Tool history path。 + +Implementation latitude: +- WASM runtime crate/engine selectionは既存 deps/packaging constraintsに合わせる。新 dependency が必要なら `Cargo.lock` / `package.nix` / `nix build .#yoi` を更新・検証する。 +- Guest ABI は minimal JSON input/output ABI でよい。将来拡張可能に docs/code comment で境界を明示する。 +- Real package archive fixture or synthetic resolved plugin fixture は実装判断。ただし deterministic digest/module selection は test で固定する。 + +Escalate if: +- WASM engine dependency / sandbox model が project-wide design decision を要する。 +- Cancellation/timeout cannot be made reliable without broader runtime changes。 +- Host API import semantics must be added beyond input/output。 +- ToolRegistry / Worker protocol needs broad API change。 +- Security boundary cannot be enforced within existing process model。 + +Validation: +- focused plugin WASM runtime tests。 +- existing Plugin Tool registration tests。 +- `cargo check` / relevant `cargo test`。 +- `cargo fmt --check`。 +- `git diff --check`。 +- `nix build .#yoi` if dependencies/Cargo.lock/package changes occur。 + +Critical risks / reviewer focus: +- actual sandbox/ambient authority isolation。 +- timeout/cancellation reliability。 +- bounded outputs/errors/history。 +- deterministic module selection from resolved plugin metadata。 +- no hidden context injection。 +- runtime missing/load/invalid-output safe errors。 +- dependency/packaging correctness。 + +--- + + + +## State changed + +Routing decision と accepted implementation plan を記録済み。dependency `00001KV5W3PHA` は done/closed で relation blocker は解消済み。Plugin WASM runtime work は同時開始する Panel E2E readiness work と主対象が異なるため、implementation side effects の前に `queued -> inprogress` acceptance を記録する。 + --- diff --git a/.yoi/tickets/00001KV62PF32/artifacts/orchestration-plan.jsonl b/.yoi/tickets/00001KV62PF32/artifacts/orchestration-plan.jsonl new file mode 100644 index 00000000..69ef5871 --- /dev/null +++ b/.yoi/tickets/00001KV62PF32/artifacts/orchestration-plan.jsonl @@ -0,0 +1 @@ +{"id":"orch-plan-20260617-094906-1","ticket_id":"00001KV62PF32","kind":"accepted_plan","accepted_plan":{"summary":"Accept Panel startup latency E2E readiness correction. Add data-backed rows-ready event/helper/assertions using concrete fixture Ticket rows, keeping first-frame metric separate.","branch":"impl/00001KV62PF32-panel-rows-ready-e2e","worktree":"/home/hare/Projects/yoi/.worktree/00001KV62PF32-panel-rows-ready-e2e","role_plan":"Orchestrator creates dedicated implementation worktree and spawns Coder with write scope limited to that worktree. Reviewer will run read-only after implementation report. Can run in parallel with Plugin WASM runtime because source surfaces are distinct."},"author":"yoi-orchestrator","at":"2026-06-17T09:49:06Z"} diff --git a/.yoi/tickets/00001KV62PF32/item.md b/.yoi/tickets/00001KV62PF32/item.md index 4c14772c..57f7cb96 100644 --- a/.yoi/tickets/00001KV62PF32/item.md +++ b/.yoi/tickets/00001KV62PF32/item.md @@ -1,8 +1,8 @@ --- title: 'Panel startup latency E2E を一覧データ描画完了基準に修正する' -state: 'queued' +state: 'inprogress' created_at: '2026-06-15T16:44:06Z' -updated_at: '2026-06-17T09:46:03Z' +updated_at: '2026-06-17T09:49:19Z' assignee: null readiness: 'implementation_ready' risk_flags: ['panel', 'e2e', 'startup-latency', 'readiness-metric', 'ticket-list-rendering'] diff --git a/.yoi/tickets/00001KV62PF32/thread.md b/.yoi/tickets/00001KV62PF32/thread.md index 5eacac99..b769197c 100644 --- a/.yoi/tickets/00001KV62PF32/thread.md +++ b/.yoi/tickets/00001KV62PF32/thread.md @@ -13,4 +13,85 @@ LocalTicketBackend によって作成されました。 Ticket を `workspace-panel` が queued にしました。 +--- + + + +## Decision + +Routing decision: implementation_ready + +Reason: +- Panel Queue により routing が明示的に許可され、Ticket は `queued`。 +- Ticket body / thread / relations / OrchestrationPlan / Orchestrator workspace state を確認した。blocking relation はなく、planning に戻す concrete missing information はない。 +- Related `00001KV5MRH6D` は done で、first-frame latency E2E の前提を修正する follow-up として scope が明確。 +- 本 Ticket は Panel startup readiness metric の E2E correction に限定され、Panel ViewModel architecture / lifecycle semantics / complete live latency fix は non-goal として明確。 +- 同時 queued の Plugin WASM runtime work とは source surface が異なるため並行開始可能。 + +Evidence checked: +- Ticket body/thread: first frame vs rows ready distinction、fixture row assertion、tests、acceptance criteria、validation を確認。 +- Ticket relations: outgoing `related 00001KV5MRH6D` のみで blocker なし。 +- OrchestrationPlan: 既存 record なし。 +- Orchestrator workspace: `/home/hare/Projects/yoi/.worktree/orchestration` は clean、`bcb8068e` 上。 +- Visible Pods: implementation child Pod なし。 + +IntentPacket: + +Intent: +- Panel startup latency E2E の primary readiness を `panel_ready` / first frame から、fixture の具体的 Ticket/Pod/Orchestrator row が取得・描画された `panel_rows_ready` 相当に修正する。 + +Binding decisions / invariants: +- `panel_ready` は first visible frame として扱い、一覧 data-ready と混同しない。 +- Primary startup latency assertion/report は fixture row render readiness に置く。 +- Weak condition (`rows_rendered.len() >= N`) だけで pass にしない。 +- Expected Ticket id/title/state/row kind 等の実データ反映を確認する。 +- Background reload が hold されている間、first frame は出ても rows-ready は出ないことを確認する。 +- Existing Panel behavior / Ticket lifecycle / ViewModel architecture は必要以上に変えない。 +- E2E pass と manual/live validation を混同しない。 + +Requirements / acceptance criteria: +- E2E が concrete fixture Ticket row render timing を rows-ready readiness として測る。 +- first frame だけでは main startup assertion が通らない。 +- Helper/event names/comments で first frame と rows ready の違いが分かる。 +- Delayed reload delays rows-ready metric but not necessarily first-frame metric。 +- Row readiness fails if expected fixture row is absent。 +- Existing Panel mouse / row selection E2E regression なし。 +- Report includes what before/after numbers measure: first frame, rows ready, full/background completion if measured。 + +Implementation latitude: +- Existing `panel_ready` event can remain as first-frame event; add new `panel_rows_ready` event/helper/observer as needed。 +- Fixture data may use Ticket id/title/state; Pod/orchestration overlay rows optional unless useful。 +- Timing budget may reuse or adjust prior threshold, but must not permit 7s regression as pass without explanation。 +- If current harness cannot observe row metadata reliably, add e2e-test-only observer rather than relying on screen string heuristics alone。 + +Escalate if: +- Current E2E harness cannot distinguish first frame from data-backed rows without broad redesign。 +- Stable timing threshold for rows-ready is too flaky。 +- Fixture row readiness depends on live workspace/global state rather than isolated fixture。 +- Fix would require Panel architecture/lifecycle semantics outside Ticket scope。 + +Validation: +- `cargo test -p yoi-e2e --features e2e panel` or relevant narrow scenario。 +- `cargo test -p yoi-e2e --features e2e --no-run`。 +- `cargo check -p yoi-e2e -p yoi -p tui` if touched。 +- `cargo fmt --check`。 +- `git diff --check`。 +- `nix build .#yoi` if runtime/package/dependency changes occur。 + +Critical risks / reviewer focus: +- row readiness is data-backed, not first frame。 +- expected fixture row specificity。 +- delayed reload ordering proves distinction。 +- no regression to Panel mouse / row selection E2E。 +- E2E isolation / no-provider / no-network。 +- report does not overclaim live startup fix。 + +--- + + + +## State changed + +Routing decision と accepted implementation/evidence plan を記録済み。blocking relation / unresolved OrchestrationPlan blocker はなく、Panel readiness E2E work は同時開始する Plugin WASM runtime work と主対象が異なるため、implementation side effects の前に `queued -> inprogress` acceptance を記録する。 + --- From e729e75aaa6801f5c353793b45767757f68b5233 Mon Sep 17 00:00:00 2001 From: Hare Date: Wed, 17 Jun 2026 18:51:03 +0900 Subject: [PATCH 2/2] ticket: record spawn runtime failure --- .yoi/tickets/00001KV5W3PHW/item.md | 2 +- .yoi/tickets/00001KV5W3PHW/thread.md | 29 ++++++++++++++++++++++++++++ .yoi/tickets/00001KV62PF32/item.md | 2 +- .yoi/tickets/00001KV62PF32/thread.md | 29 ++++++++++++++++++++++++++++ 4 files changed, 60 insertions(+), 2 deletions(-) diff --git a/.yoi/tickets/00001KV5W3PHW/item.md b/.yoi/tickets/00001KV5W3PHW/item.md index 921bd5ad..38c96a22 100644 --- a/.yoi/tickets/00001KV5W3PHW/item.md +++ b/.yoi/tickets/00001KV5W3PHW/item.md @@ -2,7 +2,7 @@ title: 'Plugin: execute Plugin Tool with minimal WASM runtime' state: 'inprogress' created_at: '2026-06-15T14:48:59Z' -updated_at: '2026-06-17T09:49:19Z' +updated_at: '2026-06-17T09:50:53Z' assignee: null readiness: 'implementation_ready' risk_flags: ['plugin', 'wasm', 'tool-runtime', 'sandbox', 'capability-boundary', 'cancellation'] diff --git a/.yoi/tickets/00001KV5W3PHW/thread.md b/.yoi/tickets/00001KV5W3PHW/thread.md index 39cb24c0..e7797a83 100644 --- a/.yoi/tickets/00001KV5W3PHW/thread.md +++ b/.yoi/tickets/00001KV5W3PHW/thread.md @@ -99,3 +99,32 @@ Critical risks / reviewer focus: Routing decision と accepted implementation plan を記録済み。dependency `00001KV5W3PHA` は done/closed で relation blocker は解消済み。Plugin WASM runtime work は同時開始する Panel E2E readiness work と主対象が異なるため、implementation side effects の前に `queued -> inprogress` acceptance を記録する。 --- + + + +## Implementation report + +Implementation start failure / recovery note: + +`queued -> inprogress` acceptance と worktree 作成は完了したが、Coder Pod spawn に失敗した。 + +Created worktree: +- `/home/hare/Projects/yoi/.worktree/00001KV5W3PHW-plugin-wasm-tool-runtime` +- branch: `impl/00001KV5W3PHW-plugin-wasm-tool-runtime` + +Failure: +- `SpawnPod` failed before child Pod creation. +- Error: `failed to spawn /home/hare/Projects/yoi/target/debug/yoi (deleted) pod: No such file or directory (os error 2)` + +Interpretation: +- Runtime binary path for this long-lived Orchestrator process points at a deleted executable. This is an operational/runtime issue, not a Ticket requirement issue. +- No Coder Pod was started and no implementation commit exists in the child worktree yet. + +Recovery needed: +- Refresh/restart the Orchestrator runtime or provide a valid Pod runtime command so `SpawnPod` can launch children again. +- After recovery, reuse the existing child worktree/branch if clean and resume Coder spawn for this in-progress Ticket. + +State handling: +- Ticket remains `inprogress` because acceptance and worktree side effects already happened; it is not silently returned to `queued`. + +--- diff --git a/.yoi/tickets/00001KV62PF32/item.md b/.yoi/tickets/00001KV62PF32/item.md index 57f7cb96..309135c6 100644 --- a/.yoi/tickets/00001KV62PF32/item.md +++ b/.yoi/tickets/00001KV62PF32/item.md @@ -2,7 +2,7 @@ title: 'Panel startup latency E2E を一覧データ描画完了基準に修正する' state: 'inprogress' created_at: '2026-06-15T16:44:06Z' -updated_at: '2026-06-17T09:49:19Z' +updated_at: '2026-06-17T09:50:53Z' assignee: null readiness: 'implementation_ready' risk_flags: ['panel', 'e2e', 'startup-latency', 'readiness-metric', 'ticket-list-rendering'] diff --git a/.yoi/tickets/00001KV62PF32/thread.md b/.yoi/tickets/00001KV62PF32/thread.md index b769197c..b6e8ffcc 100644 --- a/.yoi/tickets/00001KV62PF32/thread.md +++ b/.yoi/tickets/00001KV62PF32/thread.md @@ -95,3 +95,32 @@ Critical risks / reviewer focus: Routing decision と accepted implementation/evidence plan を記録済み。blocking relation / unresolved OrchestrationPlan blocker はなく、Panel readiness E2E work は同時開始する Plugin WASM runtime work と主対象が異なるため、implementation side effects の前に `queued -> inprogress` acceptance を記録する。 --- + + + +## Implementation report + +Implementation start failure / recovery note: + +`queued -> inprogress` acceptance と worktree 作成は完了したが、Coder Pod spawn に失敗した。 + +Created worktree: +- `/home/hare/Projects/yoi/.worktree/00001KV62PF32-panel-rows-ready-e2e` +- branch: `impl/00001KV62PF32-panel-rows-ready-e2e` + +Failure: +- `SpawnPod` failed before child Pod creation. +- Error: `failed to spawn /home/hare/Projects/yoi/target/debug/yoi (deleted) pod: No such file or directory (os error 2)` + +Interpretation: +- Runtime binary path for this long-lived Orchestrator process points at a deleted executable. This is an operational/runtime issue, not a Ticket requirement issue. +- No Coder Pod was started and no implementation commit exists in the child worktree yet. + +Recovery needed: +- Refresh/restart the Orchestrator runtime or provide a valid Pod runtime command so `SpawnPod` can launch children again. +- After recovery, reuse the existing child worktree/branch if clean and resume Coder spawn for this in-progress Ticket. + +State handling: +- Ticket remains `inprogress` because acceptance and worktree side effects already happened; it is not silently returned to `queued`. + +---