Repository navigation
fix: cancel cloud provisioning when stopping a worker - #133735
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs real behavior proof before merge. Reviewed August 31, 2026, 5:57 PM ET / 21:57 UTC. ClawSweeper reviewWhat this changesThe PR threads cancellation from stopping or reclaiming a cloud worker through session admission, provider provisioning, and lease cleanup. Merge readiness⛔ Blocked until real behavior proof is added - 5 items remain Keep open for final-head authority-chain proof and maintainer review; the source repair is substantial and remains absent from fetched main, but the required provider-I/O rejection proof is not yet attached to the final revision. Priority: P1 Review scores
Verification
How this fits togetherCloud-worker placement starts from a session dispatch, admits it against the current session lifecycle, provisions through the configured provider, and then attaches a worker. Stop or reclaim must cancel the admitted attempt while retaining provider cleanup ownership until a lease is proven released. flowchart LR
A[Session dispatch] --> B[Lifecycle admission]
B --> C[Placement coordinator]
C --> D[Worker provider provisioning]
D --> E[Cloud lease and node enrollment]
F[Stop cloud worker] --> B
F --> G[Cancellation and reclaim]
G --> D
D --> H[Proven lease teardown]
Before merge
Findings
Agent review detailsSecurityNeeds attention: The patch changes authority over provider allocation and teardown, but final-head proof has not shown stale or revoked authority failing before provider I/O. PR surfaceSource +781, Tests +4181, Docs +6. Total +4968 across 78 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Attach redacted final-head evidence covering an allowed Stop through proven cleanup and a stale or revoked authority rejected before provider I/O, then complete maintainer review of the provider contract. Do we have a high-confidence way to reproduce the issue? No high-confidence current-main reproduction was run in this read-only review; the introduced source path and focused cancellation tests make the reported behavior source-reproducible. Is this the best way to solve the issue? Unclear: the canonical cancellation and retained-cleanup design is coherent in source, but final-head authority-boundary behavior has not been demonstrated in a real provider flow. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against d0c8f02d99b4. LabelsLabel justifications:
EvidenceSecurity concerns:
What I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (19 earlier review cycles; latest 8 shown)
|
79a27cd to
32d42c1
Compare
|
@clawsweeper re-review The updated head is |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Final head The exact package passed native computer-only 0→1→2→3 with matching model images, RFB and WebVNC. GUI Stop acknowledged in16ms with separate native interruption/close proof. The original worker reclaim succeeded in20.420s after provider Stop settled; restart preserved cancellation/reclaim without resend or allocation. Independent strict replays passed. Original failed startup and the first completed-before-Stop attempt remain recorded in the body. Task leases/services and temporary auth inputs are cleaned; operator state was untouched. Executed local commands: node scripts/run-vitest.mjs extensions/crabbox
node scripts/run-vitest.mjs src/plugins/worker-provider-maintenance.test.ts src/gateway/worker-environments/service-lifetime.test.ts src/gateway/server-worker-environment-startup.test.ts src/gateway/server-worker-environment-startup.bootstrap.test.ts src/gateway/server-worker-environment-startup.lazy.test.ts src/gateway/worker-environments/inference.test.ts src/gateway/server-worker-placement-provision-cancellation.test.ts src/gateway/server-worker-placement-reclaim.preparation.test.ts
scripts/pr review-validate-artifacts 133735
OPENCLAW_TESTBOX=1 scripts/pr prepare-run 133735These passed438 plugin tests (one existing platform skip),113 Gateway/provider tests, native artifact validation and hosted gates on the unchanged head. CI33431973610 passed168jobs/16skips; its actual merge is3f43d430. Four normal managed review passes found no actionable issue. The current ClawSweeper provider-ordering rank-up is addressed by this exact-head owner/live proof and documented optional-signal semantics. Classified production is+765net; tests/support+3999; docs+6, with the necessary ownership boundary explained in the body. Default warm checkpoint reuse remains dependent on the separate Crabbox stack. This proof does not claim native Windows, atomic broker cleanup, universal viewer closure or a new production deployment. No review/CI server rule was bypassed. |
bb6df5b to
69d3025
Compare
Admit dispatch and moves before the placement queue, cancel chat through its canonical owner, and retain provider cleanup through real settlement. Carry cancellation through project preparation, Crabbox commands and node enrollment without canceling lease teardown. Keep queued readiness abortable while preserving predecessor fences. Track producer-reported placement transitions for captured dispatch, Move and earlier Stop operations across lazy cancellation loading. Recognize only exact successful completion and retain each caller's authorization. Separate ordinary Stop ordering from pending cloud work eligibility. Publish the synchronous Move begin before yielding and absorb new-intent preparation into the Move service, removing the async store wrapper. Select the newest recorded placement within the current session lifecycle so an older Stop cannot override a later caller's valid initial snapshot.
Move dispatch admission contracts into the existing service contract and use the canonical placement record to remove import cycles. Update bootstrap preflight and late admission fixtures to observe the actual owner lifetimes, and always settle held installation work before teardown.
Stop now accepts the exact settled local result when a Move is canceled before its destination is published, while preserving replacement-session and placement authority checks. Retire the exact move intent and inline the destination path. Join workspace producers before cleanup, retain independent failures over abort, and distinguish an interrupted command from an earlier exit or timeout while its pipes drain. Close the output descriptor when opening an input fails. Cover both handoff windows and error orderings, real subprocess exit/close ordering, and descriptor cleanup. Repair nearby Gateway test type errors through the real authored-config validator. Leave changelog generation to the release workflow and retain the user-visible release context in the PR body.
Pass the coordinator admission callback in the recovery fixtures added on main. This preserves the existing recovery assertions while matching the cancellation coordinator contract.
b1f5d86 to
fadcbb2
Compare
|
Merged via squash.
|
* fix(gateway): cancel pending cloud worker provisioning Admit dispatch and moves before the placement queue, cancel chat through its canonical owner, and retain provider cleanup through real settlement. Carry cancellation through project preparation, Crabbox commands and node enrollment without canceling lease teardown. Keep queued readiness abortable while preserving predecessor fences. Track producer-reported placement transitions for captured dispatch, Move and earlier Stop operations across lazy cancellation loading. Recognize only exact successful completion and retain each caller's authorization. Separate ordinary Stop ordering from pending cloud work eligibility. Publish the synchronous Move begin before yielding and absorb new-intent preparation into the Move service, removing the async store wrapper. Select the newest recorded placement within the current session lifecycle so an older Stop cannot override a later caller's valid initial snapshot. * fix(workers): retain cancellation ownership through provisioning * fix: align worker cancellation contracts and fixtures Move dispatch admission contracts into the existing service contract and use the canonical placement record to remove import cycles. Update bootstrap preflight and late admission fixtures to observe the actual owner lifetimes, and always settle held installation work before teardown. * fix: give cloud lease cleanup its own command budget * test(crabbox): align lifecycle assertions with managed stop budget * fix(cloud): preserve canceled move completion and command failures Stop now accepts the exact settled local result when a Move is canceled before its destination is published, while preserving replacement-session and placement authority checks. Retire the exact move intent and inline the destination path. Join workspace producers before cleanup, retain independent failures over abort, and distinguish an interrupted command from an earlier exit or timeout while its pipes drain. Close the output descriptor when opening an input fails. Cover both handoff windows and error orderings, real subprocess exit/close ordering, and descriptor cleanup. Repair nearby Gateway test type errors through the real authored-config validator. Leave changelog generation to the release workflow and retain the user-visible release context in the PR body. * fix(crabbox): propagate cancellation during image retirement * test(workers): admit targeted recovery fixtures Pass the coordinator admission callback in the recovery fixtures added on main. This preserves the existing recovery assertions while matching the cancellation coordinator contract. * fix(cloud): retain shared archive preparation ownership
Current head:
fadcbb2bd02ea4099f0cf1433a5e87b5d262bf40, based on7f989bc446da6944530f8ac4edd8754f84f108e2. Final-head local gates, managed review, canonical package and hosted CI are complete. Fresh packaged authority and provider-cleanup proof passed on this exact revision. Native landing is being completed; this is not a claim that the PR is already merged.Final-head live authority proof: create an empty managed session, save its dispatch request, canonically archive the exact session, then submit that saved request. The real Gateway returned
INVALID_REQUEST: cannot dispatch an archived session; the entire provider-child trace and canonical placement/environment snapshot were unchanged. After canonical restore, that same session/profile made a real AWS allocation. One original Stop during a live setup child completed in 16.655 seconds. The recorded cancellation signal reached that child; its exit/close preceded the single provider Stop, whose successful exit/close preceded the original RPC response. A separate CLI inspection observed the exact lease released. The original dispatch settled as cancelled, placement returned to local, the environment was destroyed, and no claims/pending workspace/tool-authority rows remained. All eight observed original local process IDs/groups were absent after Gateway shutdown.An exact-package restart retained that terminal state. Existing Control UI tabs reconnected with only startup/history/describe reads; there was no send, redispatch, reclaim or allocation. The sole provider child was a successful catalog read. Both restart observers drained and its three process IDs/groups were absent. Task Gateway, tunnel and temporary credentials were cleaned up; the operator Gateway and installed CLI were untouched. This proves archive-before-admission refusal and actual setup Stop, not revocation of an already-admitted callback across an await, default warm reuse, or a new native CUA run. Earlier
0ebd4731b366CUA/WebVNC evidence below stays historical.The fresh package passed every canonical phase, all 35,870 source inputs, installed graph/patch guards and unchanged UI size limit (346,591 bytes gzip below 347,353). Build ID:
2026.8.1-fadcbb2bd02e-2026-08-31T21-54-41.768Z; tar SHA256:22b17a8da905eef3823482e36b22ece551d34c1fb78ebb5cb78e0e2e91bf0a0a. Final live receipt SHA256:4739e8af3bb46a90484c00eb9b04d268e9c17a65c7ada595b84266085378389e. This is local package identity, not byte equality with a CI artifact.Exact-head CI is successful: 186 successful checks and 16 skips, including the required gate. The first attempt failed an incoming-main oxlint process-group fixture from #134449. One unchanged retry of that job passed all 1,289 tests in the identical 55-file order on the same merge checkout
8c9278846bda025d9aac88f66c6c48431b2ecc9c(this head plus main508858da1d9a1bc3482f6c9ea9a35c4c68e8c109). The underlying first process-state observation remains unresolved; the retry is not a root-cause repair, and total successful checks include retained prior successes. No timeout, environment or assertion changed.The live proof helper initially expected the refusal on stderr. The canonical CLI returned the exact structured error on stdout with exit1; the parser was corrected to that source contract, with wrong-envelope controls. Original wire/response/no-I/O evidence was reused without replaying the refusal. No product code changed for this correction.
The incoming archive-reuse change (#134326) introduced a raw bundle-preparation wait outside the service lifetime. A new failing regression showed that Stop retained a paid warm-runtime lease while packaging was held. The repair removes that callback, prepares through the existing tracked producer/abortable consumer, and passes the resulting artifact into enrollment. A second executed failure caught an older packaging request revoking a newer enrollment. One shared phase check now runs before and after the asynchronous handoff, preserving the newer grant.
Both real service/enrollment/SQLite regressions now pass, followed by 421 tests across 18 suites, with one existing skip. All core/plugin production and test type checks, formatting and scoped lint pass. Two normal managed P0–P3 review passes found no actionable issue; all 35,870 source inputs and dependency guards match the committed bytes. This final repair is +7 net production lines, replacing the raw callback and duplicate bundle selection. No timeout or assertion was weakened.
The preceding main integration also passed 251 owner/recovery tests, 618 UI tests, 39 receipt-producer tests, and three shuffled six-file stress runs totaling 375 executions. Eight normal managed review passes were clean. Its CI found three fixture calls missing the new admission callback; the two fixture files were corrected and full core-test typing passed. Those results retain their original revision identities. The detailed
0ebd4731b366package/native proof below remains historical, not final-head proof.Related: #133551. This extends the landed lifecycle-ordering repair.
What Problem This Solves
Stopping a cloud session during acquisition, setup, enrollment or workspace preparation could leave the underlying operation running, block cleanup behind it, or reject Stop after the source had already returned to the Gateway. Active-worker teardown also inherited an inspection deadline too short for a managed lease release.
This repair makes cancellation and cleanup belong to the same admitted operation. A failed original Stop remains a failure even if background cleanup later succeeds.
Why This Change Was Made
Session admission and the placement coordinator now own dispatch, Move, recovery and reclaim ordering through one canonical operation set. Stop captures exact predecessor operations, starts canonical chat cancellation, and interrupts their admissions. Queued callers can stop waiting without releasing an active callback's ownership; active provider callbacks and final reconciliation remain joined until settlement. Each caller retains its own authorization, session incarnation, environment, generation and owner-epoch checks.
The attempt signal reaches project transfer, allocation, setup, runtime preparation, enrollment, bootstrap installation and startup synchronization. Shared immutable bootstrap artifacts distinguish an abortable consumer from the process-owned producer: stopping one enrollment does not delete another enrollment's artifact, and shutdown drains production and consumers before cleanup.
Move now records its already-completed local source result when cancellation interrupts an unpublished destination, but only for that exact cancellation reason and unchanged placement. It retires the exact Move intent. Replacement placements and independent failures still reject. Inventory and metadata commands share one settlement owner, which joins all writers and preserves independent failures. Real child interruption is recorded when the signal reaches a live command, so a prior nonzero exit or timeout is not rewritten as cancellation while a descendant holds stderr. Opening a missing input also closes the already-open output descriptor.
The provider's Stop helper owns its 310-second command budget. Destroy and failed provisioning reserve the existing child-settlement and diagnostic allowances separately. Only successful provider Stop releases allocation/image ownership; cancellation alone does not prove release. Inspection cadence and limits are unchanged.
Removed or absorbed paths include duplicate operation maps, reclaim-map polling, unconditional readiness waits, fixed pending-placement snapshots, Move-only completion handling, the sole-use destination wrapper, duplicate destination validation, and raw installer preparation bypass. The required rebase preserves main's shared setup helper, fewer readiness probes for trusted scripts, checkpoint-fork attestation, Daytona capture contract and filesystem-recorded bootstrap permissions. Arbitrary profile/desktop setup and native capture still refresh authoritative readiness.
No configuration option, environment variable, SQLite schema, dependency or public RPC shape is added. The provider SDK gains an optional attempt-cancellation signal. Providers that cannot interrupt are still joined until their callback settles.
User Impact
Stop cloud worker… interrupts supported provisioning after the requested/provisioning placement becomes visible. The initial prompt remains Not sent, with explicit Retry; it is not automatically resent. The RPC also covers earlier preparation without introducing an earlier UI button. Local reclaim, archive/delete eligibility, shared-host cleanup, shutdown adoption and active-worker teardown retain their existing contracts.
Evidence
Fully live-tested pre-rebase candidate:
0ebd4731b366bc38f3a83ac8064bd13583873e70, tree9addbc2130ace3d9feeeee3f31882f0b4cbea701, based onca0bdb8db3fe6defc861022e38452b515ea953bb. The final four-pass managed review, fresh canonical package and primary CI are green. Native CUA/WebVNC and Stop/restart verification passed at this exact0eb head; current rebased-head gates are described above. An earlier integration resolved four actual conflicts; the rebase leading to0eb resolved the single project-test conflict described below. The later bb6d type-union integration is recorded above. Both startup and cancellation test families were retained; main absorbed the independently fixed channel fixture, leaving no channel-test delta. CHANGELOG.md has no PR delta under the current release-only policy.Prior f481 local Node24/macOS proof passed:
Three complete shuffled six-file stress runs passed with seeds17041/27059/37097: 360 passing executions (120 repeated under each seed), no failures or skips. Eight stress/docs guards verified all35,838 source inputs and the unchanged index. The normal managed P0–P3 review returned no actionable finding across eight passes. The fresh package passed all five canonical build/package phases, including UI size limits and actual source/tar identity checks. All source/index guards and original failures remain preserved; no timeout, isolation, size limit or authority assertion was weakened.
The repaired cases have executed pre-fix failures, including Move after source teardown, cancellation during destination preflight, independent inventory/metadata failure in either completion order, prior nonzero exit with inherited stderr held open, prior timeout and missing-input descriptor leakage. Cancellation-only, abort-induced exit, replacement-placement and session-incarnation controls remain covered.
Fresh 0eb integration proof passed 438 Crabbox tests across 16 files (one existing Linux-only skip), 113 Gateway/provider tests across eight files, core/plugin production and plugin test types, and formatting. The actual main conflict was only an adjacent project-test insertion; both independent test tables and their assertions are retained. Main’s checkpoint-wait behavior and maintenance lifecycle are included. The final tree matches the automatic merge except for that test-only resolution.
The pre-rebase0eb CI run completed successfully: 168 jobs passed, 16 skipped. Its actual checkout was merge
3f43d430115d91058f17df88d0a1e9bf482e6539, combining this head with main0f0ae34d9a2b84cff53a4540ab50d3666e197b71. Both previous maintenance failures passed in the owning 471-file shard (6,358 tests passed, 59 skipped). The final normal managed P0–P3 review completed four clean passes.The exact local package passed all five canonical phases and unchanged UI size limits. Its build ID is
2026.8.1-0ebd4731b366-2026-08-31T19-37-57.029Z, tar SHA25696f259bdb7f1719142c52fb6378ad263fc842d3f81206262c7d2cb0f38d2a6be. Actual source, packaged UI and runtime dependency identity were independently verified; this is not a claim of byte equality with a CI artifact.Integration regression and setup Stop verification
The f481 CI run exposed an interaction with the newer idle-image maintenance implementation. After the command runner settled an aborted deletion, the image retirement catch treated its cancellation as an ordinary deletion failure and resolved successfully. The repair revalidates the existing operation context at that catch boundary, preserving cancellation while normal deletion failures remain recorded for retry.
The exact CI merge d95e8cd7e348b06b405e58f91c708b6e7393fb7a reproduced both failures in the unchanged maintenance/plugin-service suites: 2 failed and 10 passed. The one-line owner fix made all 12 pass; another 365 tests across seven relevant suites passed on that merge. The same change passed 288 related tests on the PR branch. No test assertion, timeout, configuration or dependency changed; the existing main tests provide regression coverage.
On the packaged f481 build, actual UI Stop during cold node-enrollment setup completed in 14.359 seconds. The child required SIGTERM followed by the existing SIGKILL escalation; its close and the single successful provider Stop both preceded the original RPC success. Independent CLI inspection reported the lease released. Restart retained Not sent / Retry, local placement and no active run or resend. Both observer logs drained, and all 13 observed local process IDs/groups were absent. This cold-session proof does not cover warm-image deletion, the missed warmup window or a final successor's native CUA run.
The first fresh final-head startup failed before CUA at the coordinator run-registration boundary: its create request exceeded the existing deadline and the CLI correctly refused execution without a run handle. OpenClaw retained the initial message as Not sent / Retry, joined provider cleanup (220.508 seconds), and a separate inspection observed the lease released. This failed attempt remains recorded. One explicit UI Retry successfully provisioned a new worker for the final native proof; that later successful attempt and cleanup do not erase the original failure. The underlying request delay or response loss is not yet established, and no timeout or execution safeguard was weakened.
Final packaged native CUA, WebVNC and Stop
The final
0ebd4731b366package passed through the real Control UI and native Codex 0.151.0 on the cloud worker. Exact build, normal worker user, runtime pointer, shared display and CUA artifact checks passed. The model used only the direct computer tool: one screenshot and three clicks using successive returned frames. Four actual model-facing images showed 0→1→2→3, matching independent RFB captures and the rendered WebVNC panel.GUI Stop acknowledged an active native turn in 16 ms. Raw Codex
TurnAborted, the computer close result/acknowledgement and persisted cancelled status were separately verified; the worker remained available. The first GUI attempt arrived after native completion and close, so its strict check failed and remains a missed-window attempt. It is not counted as a Stop pass.A new native turn's original API reclaim succeeded in 20.420 seconds. The observer was freshly opened and had a130ms-old frame when reclaim was sent. The proof records native interruption/close, desktop-owner WebSocket closure1012, one successful provider Stop and its child close before the original reclaim response, then an independent inspection reporting the lease released. Strict checks passed again against the fully drained original logs.
The same-package Gateway restart retained cancelled/reclaimed state, a destroyed environment, no turn claim, pending workspace result, tool authority or session-tool operation, and no resend or new allocation. Its only provider child was a successful provider-catalog read. Actual UI showed no available desktop. Both Gateway processes and the approval observer ended; all39 observed local process IDs/groups were absent. These are scoped local/native/provider observations, not an atomic broker or universal remote-process proof.
Earlier live and Linux evidence — separate source identities
The preceding ed501 package ran through a fresh UI-created cloud session with native Codex 0.151.0 and CUA sharing the WebVNC desktop. The model took one screenshot and three clicks, each using its latest frame; four actual model-facing images and independently observed RFB/UI showed 0→1→2→3. GUI Stop acknowledged the active native run in 75 ms and retained the worker. A new run's original API reclaim succeeded in 53.023 seconds, with native abort/close acknowledgements, RFB owner closure code1012 and confirmed lease release. Strict saved-evidence/restart checks passed, and all 55 observed child PIDs/process groups were absent after Gateway shutdown. Separate setup Stop passed in 16.531 seconds. A warmup attempt and an earlier GUI attempt missed their required windows and remain misses, not Stop passes.
The ed501 CI run passed 168 jobs with 16 skips. The later fa4c64 package also passed all build/package guards, but was retained as pre-integration evidence after actual main conflicts were established. GitHub exposed the fa branch ref while PR metadata remained ed501; a bounded observation found no exact-fa CI run. Neither older CI nor older live proof is relabeled as f481 validation.
Earlier integrated Linux/Testbox proof passed all 15 phases, totaling 2,008 passing executions including repeated stress cases on exact commit6381cd4c. Earlier executed regressions and the unchanged phase order remain recorded. The d175 original active reclaim failed after 67.903 seconds when its provider child hit the old60-second deadline; later release does not repair that receipt. Subsequent b824 original reclaim passed in79.648 seconds, including provider Stop beyond the former deadline. These historical results explain the repair, not the final candidate's proof.
Companion dependency and remaining limits
Crabbox #1680 is merged. The last observed normal coordinator deployment includes that merge; GitHub workflow success alone is not a current serving-code attestation.
The live CLI dependency is the task-built Crabbox #1689 candidate e36e1cd4, which gives managed Stop a shared cancellation lifetime and makes daemon-lock waits cancellable. It remains open with green checks, auto-merge enabled and required independent approval unsatisfied. Inherited synchronous filesystem/process calls are not claimed to have a strict wall-clock bound. The operator's installed CLI and Gateway were not changed.
Fixed-checkpoint warm reuse additionally depends on draft Crabbox #1692, stacked on the unmerged parent. Retained pending capture additionally needs Crabbox #1698, currently unmerged; the tested e36 CLI accepts waiting but lacks that recovery path. Cold-session evidence does not prove default warm reuse, the earliest unresolved-allocation window, atomic broker observation, every viewer's closure or native Windows behavior.
Review disposition and scope
The latest completed ClawSweeper review, reviewed August 31 at 21:57 UTC on this exact head, identifies the missing final-effect authority proof as its security/evidence concern. The fresh archived-session refusal and allowed setup Stop trace above address that stated session-before-provider-I/O requirement. The independent runtime phase tests additionally prove an old packaging request cannot revoke newer enrollment, and cancellation still drains the producer. No runtime/code defect was identified by that review or the normal managed reviews.
Rank-up disposition: the optional broader unauthorized-principal/reassignment-during-await live matrix was not run. This proof deliberately uses the nearest revoked session admission and does not label it as caller-sharing revocation across an await. Existing real Gateway/SQLite caller-authority, replacement, lifecycle and post-await controls remain passing supplemental evidence. The external provider adoption/cleanup contract is confirmed below; the supported Crabbox boundary was exercised with real allocation, signal and settled cleanup. No server approval rule or required check is bypassed.
The optional provider-signal contract is additive: existing providers can omit or ignore it and remain joined until their callback settles. Crabbox composes attempt and narrower grant signals while cleanup keeps its separate lifetime. Paired-device and QA static SSH target existing shared hosts and retain callback settlement; no immediate-interruption promise is made for them. This contract is documented in the SDK overview. No SQLite schema/version or storage layout changes; the review's storage heuristic points to lifecycle consumers. No configuration option, environment variable, dependency or RPC shape is added.
Against pinned main
7f989bc, production is +1,498/-725 (net +773) across 39 files, tests/support +4,651/-462 (net +4,189) across 37, and docs +7/-1 (net +6) across two. Production growth supplies cancellation before placement exists and exact ownership through provider settlement/recovery. An environment-only guard misses pre-placement work; racing away an active child abandons cleanup. The change absorbs those responsibilities into existing admission, coordinator and provider owners, without a parallel cleanup service.Named follow-ups: the incoming-main oxlint process-group observation in #134449 remains unclassified after its unchanged successful retry; UI elapsed timer #133545; the later forced-cleanup concurrent-Stop interval in paired-device Continue on Gateway abandonment; generic fixed-ID cancellation before broker admission. Main has since fixed the native PR wrapper import closure in #134366; that earlier tooling failure is no longer a pending source follow-up. A separate source-only follow-up on newer main is the optional non-admin background completion notice when observation precedes run registration; it is not reproduced here and does not change the ordinary cloud Stop/Retry owner. These are not claimed repaired here.
A view-only desktop source list briefly retained a stale attached entry after reclaim until refresh/restart; the actual desktop was unavailable and restart showed no sources. This is a named UI freshness follow-up, not evidence that the released worker remained usable.