From 4772c4d6a5d764afa64a5420f980108077d5e970 Mon Sep 17 00:00:00 2001 From: Hare Date: Mon, 15 Jun 2026 23:01:29 +0900 Subject: [PATCH] ticket: route plugin and panel latency work --- .../artifacts/orchestration-plan.jsonl | 1 + .yoi/tickets/00001KV5MRH6D/item.md | 4 +- .yoi/tickets/00001KV5MRH6D/thread.md | 80 ++++++++++++++++++ .../artifacts/orchestration-plan.jsonl | 1 + .yoi/tickets/00001KV5R5V2S/item.md | 4 +- .yoi/tickets/00001KV5R5V2S/thread.md | 81 +++++++++++++++++++ 6 files changed, 167 insertions(+), 4 deletions(-) create mode 100644 .yoi/tickets/00001KV5MRH6D/artifacts/orchestration-plan.jsonl create mode 100644 .yoi/tickets/00001KV5R5V2S/artifacts/orchestration-plan.jsonl diff --git a/.yoi/tickets/00001KV5MRH6D/artifacts/orchestration-plan.jsonl b/.yoi/tickets/00001KV5MRH6D/artifacts/orchestration-plan.jsonl new file mode 100644 index 00000000..d799eec4 --- /dev/null +++ b/.yoi/tickets/00001KV5MRH6D/artifacts/orchestration-plan.jsonl @@ -0,0 +1 @@ +{"id":"orch-plan-20260615-140109-1","ticket_id":"00001KV5MRH6D","kind":"accepted_plan","accepted_plan":{"summary":"Accept Panel startup latency E2E measurement/improvement work. Measure first visible render via real yoi PTY E2E, separate background/full-ready waits, improve startup path where safe, and record before/after evidence.","branch":"impl/00001KV5MRH6D-panel-startup-latency","worktree":"/home/hare/Projects/yoi/.worktree/00001KV5MRH6D-panel-startup-latency","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 resolver work because source surfaces are disjoint."},"author":"yoi-orchestrator","at":"2026-06-15T14:01:09Z"} diff --git a/.yoi/tickets/00001KV5MRH6D/item.md b/.yoi/tickets/00001KV5MRH6D/item.md index 1a43e804..c6287b14 100644 --- a/.yoi/tickets/00001KV5MRH6D/item.md +++ b/.yoi/tickets/00001KV5MRH6D/item.md @@ -1,8 +1,8 @@ --- title: 'Panel 起動遅延の待ち要因を E2E 計測で特定し改善する' -state: 'queued' +state: 'inprogress' created_at: '2026-06-15T12:40:33Z' -updated_at: '2026-06-15T13:59:47Z' +updated_at: '2026-06-15T14:01:19Z' assignee: null readiness: 'implementation_ready' risk_flags: ['panel', 'tui', 'e2e', 'latency', 'runtime-observation'] diff --git a/.yoi/tickets/00001KV5MRH6D/thread.md b/.yoi/tickets/00001KV5MRH6D/thread.md index 1439a5d9..d95dd855 100644 --- a/.yoi/tickets/00001KV5MRH6D/thread.md +++ b/.yoi/tickets/00001KV5MRH6D/thread.md @@ -13,4 +13,84 @@ 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 はない。 +- Work item は Panel startup latency の measurement / E2E budget / concrete wait-point improvement に限定され、Ticket workflow / Pod authority / Orchestrator queue semantics を変更しない invariant が明確。 +- 同時 queued の Plugin resolver work とは source surface が大きく異なるため並行開始可能。 + +Evidence checked: +- Ticket body/thread: startup wait points、first visible vs full ready distinction、E2E acceptance criteria、binding decisions、escalation conditions、validation を確認。 +- Ticket relations: blocker なし。 +- OrchestrationPlan: 既存 record なし。 +- Orchestrator workspace: `/home/hare/Projects/yoi/.worktree/orchestration` は clean、`425a6c66` 上。 +- Visible Pods: implementation child Pod なし。 +- Related context: `00001KTFMMZP0` prior non-blocking transition work、`00001KV3BQ7Q3` Panel/TUI E2E behavior evidence work は closed/done context として参照。 + +IntentPacket: + +Intent: +- `yoi panel` startup path を E2E/fixture PTY で計測し、first visible render と background/full-ready wait を分けて可視化し、実ユーザーに効く startup latency を改善・基準化する。 + +Binding decisions / invariants: +- focused/unit/code review だけで startup latency 改善済み扱いにしない。 +- E2E pass と manual/live terminal confirmation を混同しない。 +- `first visible render` と `all background work complete` を同一 metric にしない。 +- 起動を速く見せるために Ticket / Pod / Orchestrator state authority を偽らない。 +- Background reload / observation 完了後は正しい state / diagnostics を反映する。 +- Provider/network/secret dependency を導入しない。 +- Broad TUI runtime rewrite / scheduler / lease 導入は non-goal。 + +Requirements / acceptance criteria: +- Real `yoi` binary + PTY path の E2E で startup time を測る。 +- 少なくとも initial visible panel/render 到達時間を assert する。 +- First visible budget を明示する(提案: <= 1500ms; 実測で妥当でない場合は理由付き調整)。 +- Full ready/background reload complete を測るなら別 metric/budget として扱う。 +- Before/after 測定結果、major wait point、削減/非同期化/遅延実行した wait、E2E が保証する範囲、live/manual gap を実装報告に記録する。 +- Existing E2E fixture-local HOME/XDG/runtime/workspace isolation and no-provider/no-network を維持する。 + +Implementation latitude: +- E2E-only observer / timing marker / PTY output marker / structured diagnostic event の選択は実装判断。 +- Wait point breakdown の粒度は実装判断だが報告で説明可能にする。 +- If fixture does not reproduce 7s latency, record what is guaranteed and what remains live/manual gap。 +- Startup improvement can use existing PendingReload / background observation / loading state。 + +Escalate if: +- 7s latency is live/workspace-specific and not fixture reproducible。 +- Stable timing test requires broader harness redesign。 +- Wait cause is storage corruption / huge metadata / provider / filesystem stalls outside fixture。 +- Fix requires Pod authority / Ticket workflow / Orchestrator lifecycle semantic changes。 +- Meaningful latency threshold cannot be made non-flaky。 + +Validation: +- `cargo test -p yoi-e2e --features e2e` or narrow scenario plus full if feasible。 +- `cargo test -p yoi-e2e --features e2e --no-run`。 +- `cargo fmt --check`。 +- `git diff --check`。 +- Depending changes: `cargo check -p yoi-e2e -p yoi -p tui` and focused tui tests。 + +Critical risks / reviewer focus: +- E2E actually measures first visible render, not just process start。 +- first visible vs full ready distinction。 +- threshold not overly flaky and not permissive of 7s regression。 +- no authority/state falsification for speed。 +- fixture isolation / no-provider / no-network。 +- before/after evidence and residual live gap clarity。 + +--- + + + +## State changed + +Routing decision と accepted implementation/evidence plan を記録済み。blocking relation / unresolved OrchestrationPlan blocker はなく、Panel startup latency work は同時に開始する Plugin resolver work と主対象が異なるため、implementation side effects の前に `queued -> inprogress` acceptance を記録する。 + --- diff --git a/.yoi/tickets/00001KV5R5V2S/artifacts/orchestration-plan.jsonl b/.yoi/tickets/00001KV5R5V2S/artifacts/orchestration-plan.jsonl new file mode 100644 index 00000000..97c5ccea --- /dev/null +++ b/.yoi/tickets/00001KV5R5V2S/artifacts/orchestration-plan.jsonl @@ -0,0 +1 @@ +{"id":"orch-plan-20260615-140041-1","ticket_id":"00001KV5R5V2S","kind":"accepted_plan","accepted_plan":{"summary":"Accept Plugin package discovery and explicit enablement resolver implementation. Build typed discovery/manifest/resolver data without runtime execution or contribution registration, with fail-closed diagnostics and focused tests.","branch":"impl/00001KV5R5V2S-plugin-enable-resolver","worktree":"/home/hare/Projects/yoi/.worktree/00001KV5R5V2S-plugin-enable-resolver","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 startup E2E work because source surfaces are disjoint."},"author":"yoi-orchestrator","at":"2026-06-15T14:00:41Z"} diff --git a/.yoi/tickets/00001KV5R5V2S/item.md b/.yoi/tickets/00001KV5R5V2S/item.md index 7df92bbb..bd60b54f 100644 --- a/.yoi/tickets/00001KV5R5V2S/item.md +++ b/.yoi/tickets/00001KV5R5V2S/item.md @@ -1,8 +1,8 @@ --- title: 'Plugin: package discovery and explicit enablement resolver' -state: 'queued' +state: 'inprogress' created_at: '2026-06-15T13:40:15Z' -updated_at: '2026-06-15T13:59:47Z' +updated_at: '2026-06-15T14:01:19Z' assignee: null readiness: 'implementation_ready' risk_flags: ['plugin', 'package-loading', 'discovery', 'enablement', 'capability-boundary', 'startup-restore'] diff --git a/.yoi/tickets/00001KV5R5V2S/thread.md b/.yoi/tickets/00001KV5R5V2S/thread.md index 79e97a0c..3562a51e 100644 --- a/.yoi/tickets/00001KV5R5V2S/thread.md +++ b/.yoi/tickets/00001KV5R5V2S/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 はない。 +- Prior Plugin package design `00001KT0Z4BK8` は done 済みで、本 Ticket はその設計を踏まえた discovery + explicit enablement resolver の最初の実装として具体化されている。 +- Risk flags は plugin / package-loading / discovery / enablement / capability-boundary / startup-restore だが、non-goals と fail-closed / read-only / no-registration invariants が明確で、残る不確実性は typed module/config/resolver design の実装戦術に閉じている。 + +Evidence checked: +- Ticket body/thread: scope、requirements、non-goals、acceptance criteria、implementation notes、related work を確認。 +- Ticket relations: blocker なし。 +- OrchestrationPlan: 既存 record なし。 +- Orchestrator workspace: `/home/hare/Projects/yoi/.worktree/orchestration` は clean、`425a6c66` 上。 +- Visible Pods: implementation child Pod なし。 +- Related design context: `00001KT0Z4BK8` done(Plugin package/discovery design)。 + +IntentPacket: + +Intent: +- Plugin package discovery と explicit enablement resolver を typed module として実装し、package presence / discovery / enablement / runtime initialization / contribution registration を明確に分離する。 + +Binding decisions / invariants: +- Discovery は read-only。package の存在だけで execution / Tool / Hook / Service / Ingress registration を行わない。 +- Explicit enablement entry がなければ Plugin は active にならない。 +- Source-qualified identity (`user:`, `project:`, `builtin:`) を扱い、ambiguous unqualified id は fail closed。 +- Package safety checks は path traversal / root escape / bounded count/size / manifest size / deterministic digest を含む。 +- unsupported/incompatible API version、digest mismatch、version mismatch、missing package、duplicate/ambiguous id、unsupported surface/grant は区別可能な diagnostic にする。 +- Diagnostics を model-visible context に勝手に差し込まない。 +- Plugin code execution / WASM runtime / actual Tool/Hook/Service/Ingress registration / MCP bridge は non-goal。 +- No ambient workspace filesystem authority を plugin package discovery から発生させない。 + +Requirements / acceptance criteria: +- User store `${XDG_DATA_HOME:-~/.local/share}/yoi/plugins/*.yoi-plugin` と workspace store `/.yoi/plugins/*.yoi-plugin` から package を発見できる。 +- Valid package root の `plugin.toml` を parse し typed manifest と deterministic digest を得る。 +- Invalid package は startup 全体を不要に壊さず bounded diagnostic で fail closed。 +- Package without enablement is not active。 +- Explicit enablement resolves package to typed resolved Plugin metadata。 +- Tests cover valid user/workspace discovery、discovery-only inactive、explicit enablement、duplicate/ambiguous fail-closed、digest mismatch、path traversal/root escape、unsupported api、malformed manifest、no contribution registration。 + +Implementation latitude: +- Small typed module/crate-local module を追加してよい。runtime launch code に resolver logic を埋め込まない。 +- `.yoi-plugin` archive vs directory minimal implementation は prior design に合わせる。必要なら最小サポート範囲を明示し後続拡張可能にする。 +- Exact config/profile shape は既存 Profile / manifest design に合わせて最小 typed structure を追加してよい。 +- Startup/restore reproducibility は deterministic re-resolution か resolved digest metadata 保持のどちらかを実装判断。ただし runtime-only mutable state 依存は不可。 + +Escalate if: +- Profile/manifest authority semantics、Pod restore semantics、secret handling、MCP enablement model を変える必要がある。 +- Package archive implementation needs signature/trust/install/update/registry semantics。 +- Arbitrary external filesystem/network authority が必要になる。 +- Runtime registration/WASM execution なしでは acceptance を満たせないことが判明する。 + +Validation: +- focused tests for plugin discovery/resolver。 +- `cargo fmt --check`。 +- relevant `cargo check` / `cargo test`。 +- `git diff --check`。 +- `nix build .#yoi` if dependencies, runtime resources, packaging, or Cargo.lock changes matter。 + +Critical risks / reviewer focus: +- discovery vs enablement vs runtime/registration separation。 +- fail-closed package safety / diagnostics。 +- source-qualified identity and ambiguous refs。 +- no contribution registration / no side effects from discovery。 +- startup/restore determinism。 +- secret-like diagnostic redaction。 +- Plugin permission/grant requests not confused with actual grants。 + +--- + + + +## State changed + +Routing decision と accepted implementation plan を記録済み。blocking relation / unresolved OrchestrationPlan blocker はなく、Plugin resolver work は同時に開始する Panel startup latency work と主対象が異なるため、implementation side effects の前に `queued -> inprogress` acceptance を記録する。 + ---