Repository navigation
feat(workers): bind cleanup to recorded cloud resources - #189019
Merged
Merged
Conversation
Persist immutable provider receipts through the existing environment writer before setup and enrollment. Reuse them for recovery, inspection, and confirmed exact-resource teardown. Retained allocation, pause/resume, and disk-authoritative workspaces remain inactive. Related: #188796. Co-authored-by: galiniliev <[email protected]>
Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: 79a28e77-6a76-4cd6-bd81-e44cc99064b5
Contributor
|
🦞👀 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. |
Resolve the package metadata conflict by preserving this prerequisite state schema 37 and current main agent schema 39. Receipt behavior is unchanged; canonical schema generators and all 10 receipt store/migration tests pass after integration. Co-authored-by: galiniliev <[email protected]>
Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: fea66917-e69b-4777-b127-03eb548d7c89
Keep the historical migration expectation values unchanged while satisfying no-shadow. Co-authored-by: galiniliev <[email protected]>
Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: 147bd311-a32a-4cc1-a4c2-116b71affb91
Preserve receipt custody through provisioning failure, select the complete placement row, align PostgreSQL additive column positions, and update schema-bound consumers and regression fixtures. Co-authored-by: galiniliev <[email protected]>
Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: aa6ef0fc-2c5f-4e21-94bc-6ead8b0adea2
Compose legacy schema transformations in canonical order, preserve installed PostgreSQL foreign keys in historical fixtures, and settle confirmed deletion after shutdown aborts new effects. Co-authored-by: galiniliev <[email protected]>
Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: 1cb5a42a-b4a8-43a9-8242-1e75244865d8
Integrate main 64daa25 to repair the actual provider-lifecycle conflict. Keep the receipt-owned SSH bootstrap extraction and the incoming destructured clock default. Shared-state schema remains 37. Affected receipt, image-intent, teardown-drain, and migration tests: 18 passed; targeted Gateway typing and lifecycle lint passed. Co-authored-by: galiniliev <[email protected]>
Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: c1df24cc-0977-428a-bfbc-8ba8a983218b
Merge main ef60dd0 without rewriting receipt work. Regenerate canonical catalogs while retaining shared-state37. Independent P0-P3 review: rejected the reported Azure fixed-lease recovery gap as unreachable for receipts: receipt producer/identity parser only accept azure-sandbox; provisioning and destruction reject a differing provider before stop. The azure recovery branch remains receipt-less. Co-authored-by: galiniliev <[email protected]>
Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: aad1f458-d629-42e3-b44e-a1a2c937d658
Collaborator
Author
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Nov 1, 2026
) * feat(workers): bind cleanup to recorded cloud resources Persist immutable provider receipts through the existing environment writer before setup and enrollment. Reuse them for recovery, inspection, and confirmed exact-resource teardown. Retained allocation, pause/resume, and disk-authoritative workspaces remain inactive. Related: openclaw#188796. Co-authored-by: galiniliev <[email protected]> * feat(workers): bind cleanup to recorded cloud resources Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: 79a28e77-6a76-4cd6-bd81-e44cc99064b5 * Publish openclaw/s4-retained-session-disk Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: fea66917-e69b-4777-b127-03eb548d7c89 * test(state): avoid shadowing the migration fixture path import Keep the historical migration expectation values unchanged while satisfying no-shadow. Co-authored-by: galiniliev <[email protected]> * Publish openclaw/s4-retained-session-disk Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: 147bd311-a32a-4cc1-a4c2-116b71affb91 * fix(workers): complete resource receipt consumers and migration parity Preserve receipt custody through provisioning failure, select the complete placement row, align PostgreSQL additive column positions, and update schema-bound consumers and regression fixtures. Co-authored-by: galiniliev <[email protected]> * Publish openclaw/s4-retained-session-disk Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: aa6ef0fc-2c5f-4e21-94bc-6ead8b0adea2 * fix(workers): retain teardown settlement and predecessor contracts Compose legacy schema transformations in canonical order, preserve installed PostgreSQL foreign keys in historical fixtures, and settle confirmed deletion after shutdown aborts new effects. Co-authored-by: galiniliev <[email protected]> * Publish openclaw/s4-retained-session-disk Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: 1cb5a42a-b4a8-43a9-8242-1e75244865d8 * Publish openclaw/s4-retained-session-disk Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: c1df24cc-0977-428a-bfbc-8ba8a983218b * Publish openclaw/s4-retained-session-disk Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: aad1f458-d629-42e3-b44e-a1a2c937d658 --------- Co-authored-by: galiniliev <[email protected]>
This was referenced Nov 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related: #188796
What Problem This Solves
Cloud worker recovery and cleanup need a durable binding to the original provider resource, rather than relying only on a reusable lease handle after a lost reply or restart.
Original work and design by @galiniliev; extracted and reimplemented at the contributor's request.
Work sessions
User Impact
New Crabbox Azure Sandbox workers record exact resource identity before setup/enrollment. Restart recovery refuses replacement identities, unavailable observations preserve ownership, and Stop remains pending until exact-resource deletion is confirmed.
This is a prerequisite, not retained-disk activation. Gateway checkpoints, existing idle suspension, and workspace authority remain unchanged. It enables neither retained allocation nor pause/resume nor disk-authoritative workspaces. Legacy environments without receipts keep their fixed-lease cleanup contract and are not silently rebound. Dependent lifecycle implementation is separately published in #189346, above authority #189106.
Shared-state schema 36 → 37 preserves old rows with a null receipt and fences older binaries. Rollback requires settling new environments and pending cleanup, then restoring the matching pre-upgrade backup with its binary; a package-only downgrade is unsafe. PostgreSQL migration and generated predecessor descriptors are included.
Why This Change Was Made
An optional generic provider receipt contract feeds the existing environment writer, provisioning, inspection, and teardown owners. Crabbox alone interprets Azure-specific identity and CLI flags. Receipt custody commits before subsequent setup effects; retries retain the original allocation and immutable identity. No separate manager, timer, queue, or state file is introduced. SSH bootstrap and Crabbox teardown phases are extracted without changing ownership to keep modules bounded. The 781-line regression allocation is task-specific; the shared scalar is unchanged.
Evidence
Current conflict repair and CI
Published head: f4255b1; tested tree: 17b921cb2e20123acfc0fb2a6e430d0fdd728923. The publisher's attributed marker commit preserves that complete tested tree.
History-preserving main integration at ef60dd0 resolved the sole conflict by regenerating the canonical SQLite catalog. Shared-state remains37; authority38 and retained lifecycle39 are excluded. Hosted readback confirms the conflict is cleared, with this PR still open and unmerged.
On the merged source:
Current-head CI run 41208499615, attempt1, completed failed: 152 passed, 2 failed, 19 skipped. All update-runtime shards, types/lint, all PostgreSQL shards, and iOS evidence passed. One memory-core assertion failed; the second failure is the aggregate gate. The executed synthetic merge was f37eefb03c0a51b459e1c59acda6799458005a91 (base88b56eea, headf4255b1d). Complete attached-check inventory at finalization: 186 success, 44 skipped, 3 failure, 1 neutral; none pending. The third attached failure is the separate protected aggregate publisher 41210377330, not another product-test failure.
The remaining failure is manager-publication-admission.test.ts:349, expecting a parent-process PRAGMA integrity_check observation after an unclean reopen. Its test and observer helper are unchanged from main; the admission owner blob is identical at pinned ef60dd0, CI base88b56eea, and this head. Upstream84bfd8a4 (#189247) moved required scans into the integrity worker and changed lease-less unclean reopening to bounded admission. The old helper only wraps its own process DatabaseSync, so its integrityChecked:false result does not establish a skipped required worker scan. This is a source-attributed inherited assertion mismatch, not an observed exact-base replay. A focused local attempt timed out during runtime compilation before a test verdict; no assertion or safety guard was weakened. Failed CI is retained. The finalizer fetched the actual executed merge object, reproduced its tree from ordered base/head parents, and verified all ten determining sources are identical at the actual CI baseline, tested merge and PR head. Any landing uses the native inherited-failure evidence route, with review, security and live writer gates still enforced.
Prior-head failure evidence
Head8042bdde run41188657688 failed: 149 passed, 5 failed, 19 skipped. Four runtime shards contained five update assertions; the fifth failure was the aggregate gate. They reproduced locally (5 failed/54 passed), with determining sources byte-identical to pinned main64daa256. The newer main integration includes the upstream fixture correction; it does not relabel that failed run as passing. PostgreSQL and iOS screenshots passed on the old run; that iOS pass did not establish a fix for the earlier missing Mermaid accessibility assertion.
Exact installed-upgrade qualification
Native run 41243053820 passed the installed receipt cell in 282.359s, command/wrapper exit 0 and settled. Actual installed and serving identities changed from published stable
8b18b5578f66eab1501cba4cef2310d88bfb9a41to exact candidatef4255b1d506b4bbe135f05c93ede950632172d06; the assertion checks build IDs, not the equal version label. Candidate package SHA256:4ac4bad3141cfa0b2c8aed2953d2f667a1e9297b928c479ef9c560913f067971, from Package Acceptance 41236419893. Durable update53387e26-d48b-40c9-8063-8b4321ba26b6succeeded and finished.environments.create: identical replay succeeded, changed identity produced the specificresource receipt is immutablerefusal, and the receipt persisted before an intentional provisioning error.Remaining qualification gaps
No live provider allocation, authenticated controller readiness, or real-model disk-mode Gateway flow is claimed. The earlier isolated wire-E2E runner refused preparation because separation from managed Gateway artifacts could not be verified; no guard was bypassed. Crabbox 0.80.0 capability/help/source inspection is protocol evidence, not cold-boot reconnect or release-readiness proof. Exact f425 installed receipt qualification above does not automatically qualify later S5–S9 behavior, retained-disk activation, or controller release/adoption.
Worked on by