9.8 KiB
9.8 KiB
作成
LocalTicketBackend によって作成されました。
Plan
Workspace Backend Runtime connection management と永続 config の Ticket として詳細化した。
方針:
- Runtime が Backend に接続するのではなく、Backend が Runtime source を RuntimeRegistry に登録する現行構造を前提にする。
- embedded Runtime は built-in connection として表示し、config 管理対象や削除対象にしない。
- remote Runtime connection は
.yoi/workspace-backend.local.tomlの[[runtimes.remote]]に保存する。 - 管理 API は list/add/delete/test を提供する。
- v0 は config persistence を優先し、config 更新後は
restart_required = trueとする。live register/unregister は対象外。 - raw token 値、socket/session/store path、Runtime event cursor、live handle は UI/API/config に出さない。
Decision
Runtime connection management Ticket は Settings shell 先行 Ticket に依存する形へ整理した。
Decision:
00001KWHJ0XH6が Workspace-local Settings の entry point / route / shell / section navigation を用意する。00001KWHHRTM9はその Settings shell 上に Runtime Connections section と Backend API / config persistence を追加する。- Runtime connection 管理 Ticket 内で Settings shell 設計を同時に進めない。
Decision
Runtime connection management に negotiation / compatibility check を含める方針へ更新した。
Decision:
- 現状は明示的な negotiation / handshake は無く、
GET /v1/runtimeが事実上の疎通確認になっているだけ。 - Runtime connection
testは単なる ping ではなく lightweight negotiation / compatibility check として扱う。 - v0 check は
GET /v1/runtimeの parse、observed runtime id/display/status/capabilities、worker list/detail、event websocket construction、spawn/input/config-bundle support などを確認する。 - 現行 API に protocol version が無い場合は fake version を作らず、
v1 runtime endpoint respondedのような compatibility basis として表現する。 - negotiation result / observed capabilities / health result / checked_at / diagnostics は persisted config に保存しない。必要になった場合は Backend DB の observation/cache として扱う。
- persisted config、RuntimeRegistry live state、negotiation result を混同しない。
Intake summary
Marked ready by yoi ticket state.
State changed
Marked ready by yoi ticket state.
State changed
Ticket を workspace-panel が queued にしました。
Decision
Routing decision: implementation_ready
Reason:
- Ticket は Runtime connection settings API /
.yoi/workspace-backend.local.toml永続化 / Settings UI / sanitized diagnostics / restart_required の v0 境界を具体化しており、observable な acceptance criteria と validation がある。 - 先行 Settings shell Ticket
00001KWHJ0XH6は closed を確認済み。 - typed relation blocker は 0 件、OrchestrationPlan は human gate の waiting note のみで、ユーザーから「2つとも消化して」と明示 follow-up があったため human gate は解除された。
- Manual Coding Worker Ticket
00001KWHEM8YJと UI/API surface が近く、並列別 worktree では衝突リスクが高いので、同一 implementation worktree/branch で Runtime connection 管理を先に実装し、続けて manual Worker 作成導線を実装する。
Evidence checked:
- Ticket body / thread / artifacts。
TicketRelationQuery(00001KWHHRTM9)は 0 件。TicketOrchestrationPlanQuery(00001KWHHRTM9)は prior human-gate waiting note のみ。TicketShow(00001KWHJ0XH6)は closed。- queued Ticket 一覧では
00001KWHEM8YJも queued、ready/inprogress は 0 件。 - workspace/orchestration git state と worktree 一覧、visible Pods、TicketDoctor(0 errors / 既存 warning のみ)。
- Bounded code map:
crates/workspace-serverの workspace backend / runtime registry / config file 周辺、web/workspace/src/lib/workspace-settings/SettingsPage.svelte、web/workspace/src/routes/settings/+page.svelte、既存/api/workers//api/runtimes/{runtime_id}/workersprojection、WorkersNavSection.svelte。
IntentPacket:
Intent:
- Workspace Browser の Settings / Runtime Connections で embedded Runtime 表示、remote Runtime connection の list/add/delete/test negotiation、
.yoi/workspace-backend.local.toml永続化、restart_required diagnostic を提供する。 00001KWHEM8YJが使う Runtime candidate projection の基盤を作る。
Binding decisions / invariants:
- Runtime が Backend に接続するのではなく、Backend が configured Runtime source を
RuntimeRegistryに登録する現行構造を前提にする。 - embedded Runtime は built-in として表示し、config 管理対象や削除対象にしない。
- remote Runtime connection は既存
[[runtimes.remote]]schema に保存する。 - v0 は config persistence 優先で、config 更新後は
restart_required = true。live register/unregister は対象外。 - raw token 値、secret、socket/session/store path、Runtime event cursor、live handle、config file path は UI/API response に出さない。
- negotiation/test result、observed capabilities、health result、checked_at は local config に保存しない。
- protocol version が無ければ fake version を作らず、compatibility basis として表現する。
Requirements / acceptance criteria:
- Runtime Connections 管理画面が Settings shell 内にある。
- embedded Runtime は built-in / delete不可として表示される。
- remote connection を add/delete でき、config の
[[runtimes.remote]]が read-modify-write される。 - test negotiation は
GET /v1/runtimeparse と Browser 必要操作に対する compatibility/sanitized diagnostics を返す。 - duplicate id / invalid endpoint / incompatible runtime / embedded delete attempt は typed diagnostic。
- request/response/config に raw token 値や internal paths を含めない。
- focused backend/UI tests を追加し、指定 validation を可能な範囲で実行する。
Implementation latitude:
- TOML comments/format preservation は v0 で typed serialize により失われてもよい。ただし implementation report/docs/test で明記する。
- POST 保存前に test を必須にするか、保存は許して test diagnostic を別扱いにするかは、Ticket の v0 境界内で選んでよい。
- API response shape / Svelte component分割 / test helper構成は既存 style に合わせて選んでよい。
Escalate if:
- secret store / raw token input / live RuntimeRegistry unregister / remote workspace provisioning / protocol version追加を必須にしないと満たせない場合。
- existing config schema を壊す必要がある場合。
- Browser-facing API に raw path/secret/runtime internal location を出す誘惑が出た場合。
Validation:
cd web/workspace && deno task testcd web/workspace && deno task checkcargo test -p yoi-workspace-servercargo check -p yoigit diff --checknix build .#yoi --no-linkは時間/依存変更の重さを見て実行、未実行なら理由を report。
Current code map:
- Settings UI:
web/workspace/src/lib/workspace-settings/SettingsPage.svelte,web/workspace/src/routes/settings/+page.svelte。 - Worker/sidebar UI:
web/workspace/src/lib/workspace-sidebar/WorkersNavSection.svelte, console route underweb/workspace/src/routes/runtimes/[runtimeId]/workers/[workerId]/console/。 - Backend/runtime/config areas:
crates/workspace-server, existing/api/workers,/api/runtimes/{runtime_id}/workers,WorkspaceBackendConfigFile,ServerConfig.remote_runtime_sources,RuntimeRegistry,EmbeddedWorkerRuntime。
Critical risks / reviewer focus:
- persisted config、live registry state、test/negotiation observation を混同していないか。
- Browser-facing API に secrets/internal paths/runtime store/socket/session/config file path が漏れていないか。
- embedded delete が fail closed か。
- restart_required semantics が UI/API で明確か。
00001KWHEM8YJと同一 worktreeで実装し、runtime candidates の shared contract が破綻していないか。
State changed
Queued acceptance recorded after explicit user follow-up 「2つとも消化して」。
Checked context:
- Ticket body / thread / artifacts。
TicketRelationQuery(00001KWHHRTM9): blocking relation 0 件。TicketOrchestrationPlanQuery(00001KWHHRTM9): prior human-gate waiting note を確認し、今回 accepted_plan / before ordering を記録済み。00001KWHJ0XH6は closed。- workspace/worktree/visible Pod/TicketDoctor/code-map の bounded check。
Acceptance basis:
- concrete missing decision / information は残っていない。
00001KWHEM8YJと surface が重なるため、同一 implementation worktree でこの Ticket を先に実装する。- side effect はこの
queued -> inprogressacceptance 後に開始する。