9.0 KiB
9.0 KiB
作成
LocalTicketBackend によって作成されました。
Intake summary
Marked ready by yoi ticket state.
State changed
Marked ready by yoi ticket state.
State changed
Ticket を yoi ticket が queued にしました。
State changed
State changed to inprogress.
Implementation report
実装報告。
RuntimeRegistryを live mutation 可能な共有 registry にし、Settings の remote Runtime add/delete からregister_or_replace/unregister_if_idleを呼ぶようにした。- add は persisted config 書き込み前に remote runtime config を解決・構築し、成功後に active registry へ反映する。成功時は
restart_required = falseとruntime_registry_applieddiagnostic を返す。 - delete は active registry 側に worker が残っている場合
remote_runtime_delete_blockedで拒否し、config は削除しない。worker が無ければ config と active registry の両方から削除する。 - Settings Test 表示は connected / verified / unchecked warning を分け、接続できた範囲が分かるようにした。
worker-runtime-rest-serverの default bind port を127.0.0.1:38800に固定し、default config コメントも同じ port に合わせた。- remote runtime blocking HTTP client/request は async context 直下で Tokio runtime を drop しない boundary 経由にした。
Validation:
cargo fmt --checkgit diff --checkcargo test -p yoi-workspace-servercargo test -p worker-runtime --features ws-servercd web/workspace && deno task check && deno task test
Skipped:
nix build .#yoi --no-linkは重いため、ユーザー指示により未実行。
State changed
State changed to done.
Implementation report
Follow-up after manual Browser test.
Observed failure:
- Browser could connect/test
arcadia-test, but worker creation failed withworkspace_worker_create_failed: Runtime did not accept worker creation.
Root cause:
- The standalone
worker-runtime-rest-serverstarted fromworker-runtimehas noWorkerExecutionBackend; it can serve control/catalog endpoints but cannot spawn Workers. - The connection test previously reported spawn as unknown, while runtime launch candidates projected remote worker creation as available.
Fix:
- Runtime summary now exposes
worker_creation_availablebased on whether an execution backend is attached. - Remote Runtime capability projection uses that flag for
can_spawn_worker/can_accept_input. - Settings connection test now marks
workers.spawnincompatible withremote_runtime_worker_creation_unavailablewhen the Runtime has no execution backend. - Added backend test covering a control-only Runtime with no execution backend.
Validation:
cargo fmt --checkgit diff --checkcargo test -p worker-runtime --features ws-servercargo test -p yoi-workspace-servercd web/workspace && deno task check && deno task test
Skipped:
nix build .#yoi --no-linkper earlier user instruction to skip heavy build.
Implementation report
Follow-up after can_spawn_worker=false review.
User feedback:
- A registered Runtime that cannot spawn workers should not exist as a usable Runtime.
Fix:
- Removed the control-only
worker-runtimepackage binary surface by disabling Cargo autobin discovery and deletingcrates/worker-runtime/src/main.rs. - Added
worker-runtime-rest-serverunder theworkerpackage, where it can attachWorkerRuntimeExecutionBackendto the Runtime before serving REST/WebSocket endpoints. - The server binary now starts a worker-backed Runtime, so
/v1/runtimereportsworker_creation_available=truefor the intended standalone process. - Retained fail-closed capability projection for old/control-only Runtime summaries so a process without execution backend is rejected as incompatible rather than exposed as a usable candidate.
New local command:
cargo run -p worker --features runtime-adapter --bin worker-runtime-rest-server -- --workspace .
Validation:
cargo fmt --checkgit diff --checkcargo check -p yoicargo test -p worker-runtime --features ws-servercargo test -p worker --features runtime-adapter --bin worker-runtime-rest-servercargo test -p yoi-workspace-servercd web/workspace && deno task check && deno task test- Smoke: started worker-backed Runtime on
127.0.0.1:38801and verified/v1/runtimecontains"worker_creation_available":true.
Skipped:
nix build .#yoi --no-linkper earlier user instruction to skip heavy build.
Implementation report
Follow-up after dependency-boundary review.
User feedback:
- Putting the standalone Runtime server binary in
workerwas also wrong;workershould not depend on Runtime just to host the adapter.
Correction:
- Split the Runtime/Worker bridge into a dedicated
worker-runtime-adaptercrate. - Moved
WorkerRuntimeExecutionBackend/ProfileRuntimeWorkerFactoryout ofworkerand intoworker-runtime-adapter. - Moved the
worker-runtime-rest-serverbinary intoworker-runtime-adapter. - Removed the
worker->worker-runtimedependency and removed theruntime-adapterfeature fromworker. worker-runtimeremains the Runtime domain/API crate;workerremains Worker implementation;worker-runtime-adapteris the only crate depending on both.
New local command:
cargo run -p worker-runtime-adapter --bin worker-runtime-rest-server -- --workspace .
Validation:
cargo fmt --checkgit diff --checkcargo check -p workercargo check -p yoicargo test -p worker-runtime --features ws-servercargo test -p worker-runtime-adaptercargo test -p yoi-workspace-servercd web/workspace && deno task check && deno task test
Skipped:
nix build .#yoi --no-linkper earlier user instruction to skip heavy build.
Implementation report
Correction after dependency-boundary review.
User feedback:
- A separate bridge crate is unnecessary; the Runtime should bundle/manage Workers directly.
Correction:
- Removed
worker-runtime-adaptercrate entirely. - Moved
WorkerRuntimeExecutionBackend/ProfileRuntimeWorkerFactoryintoworker-runtime::worker_backend. - Moved the
worker-runtime-rest-serverbinary back intoworker-runtime, but kept it worker-backed rather than the old control-only process. workerno longer depends onworker-runtime;worker-runtimenow depends onworkerand owns the Runtime process that bundles Workers.workspace-servernow importsworker_runtime::worker_backend::WorkerRuntimeExecutionBackend.
Correct local command:
cargo run -p worker-runtime --features ws-server,fs-store --bin worker-runtime-rest-server -- --workspace .
Validation:
cargo fmt --checkgit diff --checkcargo check -p workercargo check -p yoicargo check -p worker-runtime --features ws-server,fs-storecargo test -p worker-runtime --features ws-server,fs-storecargo test -p yoi-workspace-servercd web/workspace && deno task check && deno task test
Skipped:
nix build .#yoi --no-linkper earlier user instruction to skip heavy build.
Implementation report
Follow-up after Runtime generation path review.
User feedback:
- Runtime generation paths should not be duplicated; a Runtime that can be served over HTTP must be constructed explicitly with the intended Worker backend rather than implicitly from HTTP server config.
Fix:
- Removed
RuntimeHttpServer::bind. - Removed
serve_configured_runtime_http. - Removed the internal
runtime_from_configpath that built backend-less Runtime instances fromRuntimeHttpServerConfig. http_servernow serves only an already-constructedRuntimeviaserve_runtime_http(runtime, listener, token).
Validation:
cargo fmt --checkgit diff --checkcargo test -p worker-runtime --features ws-server,fs-storecargo test -p yoi-workspace-server
Skipped:
nix build .#yoi --no-linkper earlier user instruction to skip heavy build.