Repository navigation
fix: stop worker provisioning effects after host authority closes - #159178
roboclaw-bot wants to merge 10 commits into
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs real behavior proof before merge. What this changesThe branch carries live host authority through worker provisioning and snapshot publication, preserves independent cleanup, and introduces a source-compatible versioned provider contract. Review scores
Merge readiness⛔ Blocked before merge - 7 items remain This remains useful work absent from current main. No concrete introduced correctness defect was found, but the updated evidence explicitly leaves authority proof, upgrade qualification, and rollout acceptance unresolved. Priority: P1 Decision needed
Before merge
FindingsNone. Agent review detailsHow this fits togetherThe Gateway asks worker providers to allocate and prepare remote environments. Crabbox runs the provider commands and records reusable snapshots in plugin-owned SQLite state; independent teardown settles allocated resources. flowchart TD
A[Gateway worker request] --> B[Live host authority]
B --> C[Provider preparation and allocation]
C --> D[Crabbox commands]
D --> E[Snapshot publication admission]
B --> E
E --> F[Reusable worker snapshot]
D --> G[Independent cleanup]
E --> G
Technical reviewBest possible solution: Keep one provisioning authority owner and independent cleanup custody, with verified legacy upgrades and an explicitly accepted staged provider contract. Do we have a high-confidence way to reproduce the issue? Unclear for a complete current-main runtime reproduction: source shows unfenced reusable-image publication, but this read-only review did not execute the native provider scenario. Is this the best way to solve the issue? Yes in principle: extending the existing authority and cleanup owners is focused and maintainable, but rollout and upgrade evidence must establish that the proposed boundary works. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against db6cdb813b16. Merge-risk optionsMaintainer options:
SecurityNone. EvidenceWhat I checked:
PR surfaceSource +210, Tests +2944, Docs +37. Total +3191 across 58 files. View PR surface stats
Review metrics
LabelsLabel changes: No label changes. Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (28 earlier review cycles; latest 8 shown)
Reviewed October 3, 2026, 3:38 PM ET / 19:38 UTC (Revision 29). |
|
@clawsweeper re-review The outstanding existing-provider upgrade acceptance for head The PR Evidence section now contains the immutable product/harness/package bindings, complete redacted worker receipts and canonical post-cleanup summaries, and explicit limits. Scenario source. This uses controlled local allocation and manual restart, not live cloud/SSH, attached turns or V1 revocation races. Generic post-core telemetry is unavailable and generic update JSON is truncated; complete worker-specific driver/lifecycle receipts are retained. Please reassess the outstanding P1 compatibility risk against this evidence. The separate required CI gate remains failed; the earlier Talk first-mutator attribution and required SDK compatibility-review status are not waived. No merge/automerge requested. |
|
🦞👀 Re-review progress:
|
d247932 to
fd0b54a
Compare
c992102 to
5d116aa
Compare
Carry existing live host authority through bundled provider effects while preserving independent cleanup and compatible legacy calls. Co-authored-by: sallyom <[email protected]> Co-authored-by: vincentkoc <[email protected]>
Carry existing live host authority through bundled provider effects while preserving independent cleanup and compatible legacy calls. Co-authored-by: sallyom <[email protected]> Co-authored-by: vincentkoc <[email protected]>
No source changes. Refresh the pull_request synchronize event after the landed main-branch inventory repair; the one-shot lifecycle refresh retained a stale executed merge. The source tree remains identical to 89a63e5. Preserve its normal-hook validation and published-updater artifact as proof of that exact parent; do not relabel or repack them for this metadata commit. New integration CI must verify its actual composed checkout. Co-authored-by: sallyom <[email protected]> Co-authored-by: vincentkoc <[email protected]>
Keep the two intentional V1 compile-error fixtures explicit in the exact type-suppression inventory without weakening its scanner. Co-authored-by: sallyom <[email protected]> Co-authored-by: vincentkoc <[email protected]>
Preserve every Gateway worker test while placing the invocation regression in the sorted routing inventory. Co-authored-by: sallyom <[email protected]> Co-authored-by: vincentkoc <[email protected]>
Preserve physical settlement and cleanup after invocation closure on the rebased provider series. Co-authored-by: sallyom <[email protected]> Co-authored-by: vincentkoc <[email protected]>
Preserve native worker admission coverage through the existing private SQLite test facade; make capture skip returns explicit without changing behavior. Co-authored-by: sallyom <[email protected]> Co-authored-by: vincentkoc <[email protected]>
Keep returned checkpoint custody independent while requiring live source authority at reusable publication admission. Co-authored-by: sallyom <[email protected]> Co-authored-by: vincentkoc <[email protected]>
Require captured logical source authority for project capture admission after cleanup collection; preserve late-image and ambiguous capture custody. Co-authored-by: sallyom <[email protected]> Co-authored-by: vincentkoc <[email protected]>
Rename only the local capture profile key and its references; preserve all production code and assertions. Co-authored-by: sallyom <[email protected]> Co-authored-by: vincentkoc <[email protected]>
5d116aa to
57cd0bc
Compare
…191006) * fix(workers): retain provisioning authority through node enrollment Admit the authenticated first node binding within its original provisioning operation while retaining setup, epoch, lease, receipt, caller, phase, and teardown fences. Exercise real pairing publication through the public provider callback. Related: #188796, #159178. Co-authored-by: galiniliev <[email protected]> * fix(workers): allow cloud dispatch to finish after node enrollment Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: 73febb96-be07-4bf9-81c1-22b0277c583c --------- Co-authored-by: galiniliev <[email protected]>
…penclaw#191006) * fix(workers): retain provisioning authority through node enrollment Admit the authenticated first node binding within its original provisioning operation while retaining setup, epoch, lease, receipt, caller, phase, and teardown fences. Exercise real pairing publication through the public provider callback. Related: openclaw#188796, openclaw#159178. Co-authored-by: galiniliev <[email protected]> * fix(workers): allow cloud dispatch to finish after node enrollment Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: 73febb96-be07-4bf9-81c1-22b0277c583c --------- Co-authored-by: galiniliev <[email protected]>
Related: #135838
What Problem This Solves
Fixes an issue where users could see worker provisioning continue after its host operation closed, leaving allocated resources without settled cleanup or rejecting valid enrollment from the same operation.
User Impact
Worker provisioning stops admitting new effects after host shutdown or invocation closure, while cleanup keeps its independent authority. Expiring prepared workers retain successful or uncertain capture custody until independent teardown. A checkpoint returned after source closure is kept for cleanup, not made reusable; teardown cannot start a new project capture without live source authority.
Existing external providers keep the source-compatible default
WorkerProvidertype and optional provisioning arguments.WorkerProvider<1>opts into required invocation guards; bundled providers use that contract. No legacy cutoff, removal date, configuration, protocol or database-schema change. Legacy implementations that ignore the supplied callback remain a documented limitation. This is the provider slice, not completion of the entire linked workstream.Why This Change Was Made
Carry the existing live owner assertion through provider preparation, allocation and effect boundaries rather than treating a physical cancellation signal as authority. Extend the existing cleanup catch across dispatched allocation, preserve settled cleanup receipts without a second stop, and keep same-operation enrollment valid. The same captured source assertion now gates final reusable-image publication. If publication is refused, only the surviving exact capture selector becomes cleanup debt; ambiguous persistence, admitted publication and successor selectors retain their existing recovery behavior. Independent teardown still collects cleanup debt, but does not recapture an expired project. No new state owner or schema is introduced.
Contributor credit: @sallyom and @vincentkoc.
Work sessions
Evidence
Rebased and pushed October 3:
57cd0bcdb90a9a2eea6396cad3f3e2e3bfb2225conto pinned mainaa298d3a515ca85dc0970aacda0403d67ec2a097. Native Git retained all ten original authors, message bytes and co-author trailers, including the intentional empty third commit. Remote Git and live PR readback confirmed the exact head after the old-head-leased push.Focused rebased-head validation — run 37139953970, attempt 1 passed:
Verified candidate artifact 11280497334; source bundle SHA-256
16647d7424a511cf1d2839c369cd2934f896b53ce6f82739f62369672be60974(65,551 bytes). Native evidence artifact 11280347436. Parent verified original ZIP digests, all 431 member paths/CRCs/content hashes, raw history and native result records.Canonical exact-head build — passed: run 37143216974, attempt 1 imported that identical source bundle and ran one
pnpm build, native exit 0 / tee exit 0, in 19m07s (job 22m23s). No build retry or redispatch occurred; a Gateway restart interrupted collection only.Build artifact 11281567787, original outer ZIP SHA-256
3ae633dbe764e7a77e9dfffdaf0034aa96b77340371caedd1dfc853842b49302; build evidence 11281887121. Inner compiled archive SHA-256078857fc0f005d999dc0ca76a707b10cf2d0f2ee86f60db8798fb8edaf9e16d5. Parent independently checked all 19,655 inner members, 17 output roots and 305 dependency-link descriptors, source/recipe/build identity and native receipts. This retains rootdistplus 16 package output roots—not stagingdist-runtime, a complete workspace snapshot, or native-provider runtime qualification.Named nonfatal UI observation: the canonical build's report-only UI performance pass reported startup JavaScript 373,669 B gzip versus a 373,454 B limit (+215 B). Startup CSS was 50,708 B: above the 46,080 B advisory target, below the 51,200 B hard ceiling. Build exit 0 is genuine; UI-budget clearance and baseline attribution are not claimed. No limit, baseline or assertion was weakened.
Rebase integration repairs: current-main retry backoff retains the existing invocation-authority callback at both inspection and setup dispatch. Tests now use current fixture exports and real credential-bound pairing admission. The receipt observer checks every actual error/context/verdict rather than imposing an exactly-once count on a pure query; strict native-command, scrub, claim and recovery assertions remain intact.
Published scope: production +849/-640 (net +209) across 21 files; tests/test support +3053/-108 across 33 files; docs +41/-4 across four files. Production growth covers required invocation-contract types, dispatch custody, independent cleanup and final store admission; this publication adds no code beyond the verified candidate. The test-only SDK facade is counted with test support.
Two earlier October attempts remain honest failed history: 37135938835 stopped at formatting; 37137751813 passed formatting/hook/RED but stopped at the stale receipt-query count before three late recovery checks. The final successful run above executed those checks. Neither prior failure is relabeled passing.
Review and remaining merge gates
Independent source and execution-admission reviews found no remaining actionable source/admission findings on the verified tree. These are not SDK/security owner acceptance or merge approval. Fresh ClawSweeper Revision 28 reviewed this exact head and complete updated evidence body on October 3. It found no actionable correctness/security finding, but remains needs-human / blocked on native V1 final-effect proof, external V0 upgrade qualification, explicit SDK/security rollout acceptance and changed-test cost evidence. That is not merge approval.
Fresh public CI — failed: run 37145533564, attempt 1 completed with 98 successful jobs, 21 skipped jobs and four failed jobs (three test jobs plus the downstream aggregate gate). It tested merge
81c3d9095b7aaa7e3543e83008713bf367c0f40b, with parents main6b230c82fc52161e644b9e94c17dd30ccc680b72and this exact PR head.No failing assertion was weakened and no CI retry was used to claim success. Attribution is being checked against existing exact-main CI evidence before adding new diagnostic runs. These failures are not collectively labeled inherited or flaky. Dependency/security status contexts succeeded, but do not replace SDK/security owner acceptance. The PR remains open, mergeable but blocked.
Still open unless separately cleared: real-provider V1 allowed/closed final checkpoint and SQLite publication, borrower behavior and independent cleanup; published-updater compatibility with an unchanged external V0 provider on this head; current-head per-file test/CI cost and budget justification; SDK/security owner acceptance of staged V1/V0 policy; and current required CI/review findings. No native/V0/cost or policy gate is waived by 265 focused passes or a successful build. No merge, release, or Team-server update is authorized.
Historical September evidence for previous head 5d116aa — not proof for the October head
The following preserves the earlier report. Its “current-head,” “same-head,” and “this exact PR head” references refer to 5d116aa, not 57cd0bc. Old compiled archives, cancelled V0 runs, failed native attempts and per-file timing gaps have not been promoted to new-head proof.
Rebased and pushed at
5d116aa3f1e0d85f9408d95cce0640926a8d8c60, onto pinned maine433bfda89c486f98dfb03586dacd1e23b6f820b. The hosted Git rebase preserved all ten original authors/messages, including the intentional empty third commit. The remote branch and PR head were read back after the guarded push.Native rebased-source validation — run 36419276854, attempt 1 passed:
Verified-commit artifact 10969602907; bundle SHA-256
3a666074a08dacd858b18d4a29fddb0fb254bc09b8f45b2ef8de5bba5559be68. Detailed native evidence is artifact 10969178178. Original ZIP digests, paths/modes/CRC and extracted bytes were checked against the live run/artifact bindings.Full PR CI — failed: run 36422091212, attempt 1 completed with 153 successful jobs, seven failing test jobs plus the failed aggregate gate, and 20 skipped jobs. Build, lint, production/test types and security-fast passed. The failing tests cover progress-widget liveness, planner timeout, chat completion, catalog-startup timeout, QA scenario references, heartbeat delivery and model membership. The run tested merge
4da5d150209b6a90c67ec7b5c5fe2ecf9572a5ba(main parentb95394a915305f50c10e026276b81b91b92cb040, PR head5d116aa3f1e0d85f9408d95cce0640926a8d8c60). Root-cause/base attribution is incomplete; these failures are not waived as inherited or flaky.Same-head build — passed and independently verified: run 36422541325, attempt 1 ran canonical
pnpm buildon this exact PR head, with native and tee exit status 0 (719.56 s wall). Artifact 10970698003, SHA-256b397aa288ed68f13d440cd45d55c67cdde8419e9949d612fa34bb6b6369b2909, retains rootdistplus all 16 source-declared package outputs and 307 authenticated dependency-link entries. Parent verification checked live run/job/artifact bindings, original ZIP size/digest/safe paths/CRC, extracted bytes, all 14,298 inner members, source-owner/recipe bytes and exact-head build metadata. This immutable build is reusable; it is compiled proof, not native-provider behavior proof.Real-provider proof — not established: latest completed run 36487609549, attempt 1 progressed past the repaired SDK artifact observer: Crabbox registered with liveAuthorityVersion 1, its compiled entry loaded natively, and a compiled consumer/common-chunk edge was observed. It still failed before allocation at the unchanged whole-startup assertion
no forced source-transform provider accepted: 1 !== 0. The recorded forced invocation instead targetedextensions/openai/provider-policy-api.tsthrough the declared importersrc/plugin-sdk/facade-loader.ts, outside the observed nested entry invocation and with no execution frame. Absolute counters changed [2,2,0,0,0] to [3,2,0,1,0]. That is physical artifact/caller attribution, not runtime authority inferred from a manifest, and not a completed native security scenario.Diagnostic limits: the forced-event summary is complete, but
producerDiagnostic.complete=falseanddiagnosticComplete=false: a later cache hit reused the same Crabbox loader with two acquisition observations. Parent verified those acquisition facts are identical except sequence; the observer currently treats them as ambiguous. One native graph exists, butnativeFunctionIdentityVerified=false; the catalog/original-function oracle was not completed.nativeScenarioPassed=false,passed=false,proofMissing=true; warmups/forks/captures all zero. No allowed/closed publication or borrower scenario ran. Correcting the observer must retain all absolute counts and account for the selected provider graph across every host generation—not whitelist OpenAI, suppress a count, force SDK policy, or weaken native effect/cleanup assertions.Artifact 10998929949, original ZIP SHA-256
bc0d3fb97e320f57a388aa870810ea53c79b431799a6a40e0027b15e37eca29c, was independently verified against live run/controller/product bindings, exact size, safe paths/modes, CRCs and all eight payloads. Same-VM physical inventories returned to baseline without forced termination or cleanup errors; temporary build metadata was restored to original absence. Harness cleanup passed, but composite cleanup remains failed because native proof failed. Post-run source verification was not reached after the failing recipe. Physical absence is not proof of the required scenario.Earlier source-SDK observer rejection 36482319566, artifact 10997014769 (ZIP SHA-256
79fd59cccaf5ffdf9fe2bbf1c5c55bf0cc86dc97fc2b65dacf4b12ca6037fa0d), observer failure 36443177372, artifact 10980005141, and initial preflight failure 36428786558, artifact 10972333530, remain retained history. Unit/SQLite tests model native effects and do not replace native-checkpoint/final-SQLite proof.Current-head published-updater × unchanged V0 — not qualified: run 36448418656, attempt 1 was cancelled under its 40-minute outer bound. Package production consumed 1,269 seconds; the actual single
2026.9.6 × legacy-worker-providercell received 327 seconds and stopped during phase 20/29, the update. Reaching that phase is not a substitute for missing structured receipts: original updater exit 0, immediate installed-H payload equality, later V0 lifecycle/native-state equality, final restart and joined cleanup remain unverified. Runner orphan termination is not native cleanup proof. The real current-head npm package is retained: artifact 10982713197, TGZ SHA-2568ac91a095be42297dbb8d9f78b41ba8a866ecfbe6978134394d0c0839eaab9db; parent verified live metadata, original ZIP, all 13,835 tar members and exact-H build identity without executing payload. Package integrity and npm-12 acceptance passed; those prerequisites do not qualify the upgrade. This package is distinct from compiled-workspace artifact 10970698003.The artifact-reusing V0 attempt 2 was incorrectly cancelled by our watchdog during checkout. It mistook GitHub's copied successful-prerequisite records, with new job IDs/attempt numbers but identical original execution facts, for new producer execution. No rebuild occurred; 0/29 scenario phases ran, no fresh artifacts were produced, and the downstream summary failed following cancellation. This is a control-script failure, not a product assertion failure. Attempt-1 cleanup uncertainty remains unchanged; another attempt requires a corrected, reviewed monitor and a fresh bounded grant.
Per-file test-cost evidence remains incomplete: the exact-H inventory has 23 directly changed test files (6 new, 5 materially changed, 12 type/fixture/inventory adaptations), plus 7 support/routing files. Retained evidence covers 6/23 only with assertion-duration observations and 0/23 with standalone command wall or attributable per-file CI seconds. The 312.75-second measurement covers the entire nine-file command, not each file; original public CI ran a merge composition, not pristine H. A controller-only cost-suite integration is being prepared, not presented as measured proof.
Before merge: complete that V1 allowed/closed/independent-cleanup proof, candidate-head published-updater compatibility with an unchanged external V0 provider, current-head per-file test/CI cost evidence and above-budget justification, and SDK/security owner acceptance of the staged V1/V0 policy. The current ClawSweeper review and red CI remain open blockers. No owner acceptance, merge, release or Team-server update is claimed.
The selected publication rule remains keep custody, gate reuse: captured live source authority gates reusable-image admission; refused publication retains exact cleanup custody without replacing successors or undoing already-admitted publication. Independent teardown cannot recapture an expired project.
Earlier proof and CI attribution — not relabeled as rebased-head results
c99210225290: run 36372446168 passed fullpnpm lint(18 oxlint shards, zero warnings/errors), all 23 authority cases, plugin test types and 56-path formatting. Standalone authority wall: 84.34 s; full lint: 1362.01 s.ec6dd67fdcd6285309695be28eef003ac0d77d6e0d3c2f60eed8893d718d8ba3, was verified with rootdist, all 16 package outputs and 307 authenticated dependency links. It is historical compiled proof, not the rebased binary.e0a53eaa04e4: run 36368052660 passed 58 authority/store, 508 provider sibling and 21 core custody cases, production types and 18 additional boundaries. The narrower current-head run above is not described as a rerun of all 587 cases.fd0b54a58f93. It remains historical V0 compatibility evidence, not current-head or V1 revocation-race proof. Recorded updater/Doctor warnings, output limits, report-only build-budget overages and synthetic SDK-emission differences remain follow-ups.View the OpenClaw team session