Repository navigation
feat(workers): keep runtime image reserves ready without browser presence - #188686
Conversation
…overy Extract the optional repository integration prerequisite and carry current caller authority through native App issuance, preparation, checkout and authenticated redispatch. Keep cleanup with dispatch and preserve native behavior when no integration is selected. Co-authored-by: galiniliev <[email protected]>
Consume source credential capabilities in the host access owner before handing the ordinary prepared binding to node transport. Co-authored-by: galiniliev <[email protected]>
…very Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: 4abaa98c-2f3b-4712-af02-5afb8839a3bd
Co-authored-by: galiniliev <[email protected]>
Keep image preparation separate from repository contents and empty workspaces. Select runtime-only intents for image-capacity integrations, claim under live authority, and perform repository startup with the current request's credential reader. Settle rejected unallocated image requests without breaking stored provisioning replay. Co-authored-by: galiniliev <[email protected]>
Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: eb6f32e5-03b0-429d-809d-1189bd23b87c
…ence Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: 130a2b63-442c-4c80-aa7b-39bc5c4b872b
|
🦞👀 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 changesThis PR keeps runtime-image worker reserves ready without browser presence using the existing prepared pool. Example: The development profile has readyWorkers=2, preparedPool.maxTotal=4, and an integration selecting image capacity.
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 4 items remain Keep this useful, maintainer-authored PR open: the earlier cleanup finding is repaired, but restart can unnecessarily destroy existing standing reserves. Priority: P2 Before merge
Findings
Tests
Agent review detailsHow this fits togetherThe Gateway prepared pool combines configured capacity policy with environment inventory, then asks the existing provider lifecycle to prepare, allocate, retain, or destroy unused workers. flowchart TD
A[Integration and profile policy] --> B[Prepared demand owner]
B --> C[Prepared pool maintenance]
D[Environment inventory] --> C
C --> E[Provider lifecycle]
E --> F[Provider allocation and cleanup]
E --> D
Technical reviewBest possible solution: Keep the existing pool owner and distinguish pending standing-demand reconstruction from withdrawn demand so restart preserves compatible reserves while expiry and requested cleanup remain independent. Do we have a high-confidence way to reproduce the issue? Restart with two persisted standing image reserves and unchanged enabled policy: concurrent inventory maintenance can observe no reconstructed demand while prepareIntent awaits, classify both unbounded reserves as superseded, and request their destruction; this was traced in source without executing target code. Is this the best way to solve the issue? Reusing the prepared pool is appropriate, and the cleanup repair addresses the prior finding, but reconstruction must preserve valid inventory rather than satisfy the target by replacing it. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against e4ff443c4c5f. Merge-risk optionsMaintainer options:
Provenance checked
TestingProof path: in-process harness. SecurityNeeds attention: The stack retains an explicit prerequisite hold concerning managed OAuth/PAT repository authority. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +161, Tests +505, Docs 0, Other +4. Total +670 across 11 files. Added test files: 1. View PR surface stats
Review metrics
LabelsLabel changes: No label changes. Label justifications:
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 (1 earlier review cycle)
Reviewed October 30, 2026, 6:40 PM ET / 22:40 UTC (Revision 2). |
Keep the repository policy assertion in shared read identities and prepared workspace synchronization through checkpoint awaits and each worker command. Prove allowed, forbidden, and late-revoked cold and prepared flows with local Node execution, Git, and checkpoint transfer. Co-authored-by: galiniliev <[email protected]>
Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: ca19bb5b-7413-420d-9ba1-46578e011f37
Keep Gateway database-worker discovery and its canonical registry in the same sorted order. Co-authored-by: galiniliev <[email protected]>
Merge fc3490a without rewriting history, retaining repositoryBranchPrefix from #188648. Regenerate the canonical config artifacts for both approved fields instead of accepting either independently generated baseline. Adapt the repository dispatch consumer to the current codexGoalAdmission contract introduced by main. The first combined-source typecheck caught the retired workerGoalAdmission field. Co-authored-by: galiniliev <[email protected]>
Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: ab1916b4-e0cf-4992-a62f-13d94e27e2db
Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: 72a91f97-2870-4d52-87e3-5f276658e867
Preserve the reviewed image delta and repository-capacity fixture correction while adopting the parent-owned required-profile and sessions.create authority changes. Co-authored-by: galiniliev <[email protected]>
Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: cb7ac3cb-df17-4874-98ec-23f5eec0838c
Co-authored-by: galiniliev <[email protected]>
Remove the RPC fixture-only repository identity call from credential-free image intent creation. Keep actual repository startup and all denial controls, assert one managed verification on success, and shrink the matching test allocation. Co-authored-by: galiniliev <[email protected]>
Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: 21adb907-ae6f-446c-8e58-29fa48af700a
Co-authored-by: galiniliev <[email protected]>
Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: 869588f1-1142-4887-9785-353e5050fa2f
Align startup rollback proof with required finalizer joins from #188920. Keep native repository connection and Enterprise identity resolution in the handshake fixture, mocking only remote enrichment. Preserve existing handshake and revocation assertions. Co-authored-by: galiniliev <[email protected]>
Integrate main through #188922 (0a9f3a6) to repair the observed cron detail and settings Escape CI failures. No conflicts or repository-authority owner changes. This pinned integration does not include the later schema39 migration. Co-authored-by: galiniliev <[email protected]>
Integrate exact main 510e168 without rewriting history. Retain the canonical upstream gateway logger for the sole conflict. The upstream agent schema39 migration requires fresh installed-upgrade qualification; prior c6/schema38 evidence remains historical. Co-authored-by: galiniliev <[email protected]>
Integrate exact local authority candidate b435854 without rewriting history. All 17 image-delta files, including the RPC fixture repair, remain byte-identical. Publication and fresh input-qualified proof remain held for the parent release. Co-authored-by: galiniliev <[email protected]>
Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: 5bbb8a2f-4466-4f58-9406-3c8b39e44b5f
Integrate exact b062896. The candidate tree is unchanged from the prepared b435-based image integration and independently frozen schema39 focused proof. Co-authored-by: galiniliev <[email protected]>
Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: 2098e121-027c-4257-bfed-57016863f99b
Co-authored-by: galiniliev <[email protected]>
Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: 5537df35-0ca3-4b29-a1b1-8f2ce9b02a23
Integrate exact main a4b07c6 after prerequisite squash. The five textual conflicts had parent-identical incoming contents; retain all 17 reviewed image delta files byte-for-byte, including actual RPC admission controls. Co-authored-by: galiniliev <[email protected]>
Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: 0ec84c8a-6397-489f-8d47-3fed1f9c9414
Co-authored-by: galiniliev <[email protected]>
Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: 184bf98b-756a-4986-9bbb-ef9a7cf5a640
Co-authored-by: galiniliev <[email protected]>
Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: c21eb49f-3ad5-4ec6-be3a-da37e8a22288
|
Merged via squash.
|
…ence (openclaw#188686) * feat(workers): preserve repository authority through dispatch and recovery Extract the optional repository integration prerequisite and carry current caller authority through native App issuance, preparation, checkout and authenticated redispatch. Keep cleanup with dispatch and preserve native behavior when no integration is selected. Co-authored-by: galiniliev <[email protected]> * fix(workers): keep repository admission out of node transport Consume source credential capabilities in the host access owner before handing the ordinary prepared binding to node transport. Co-authored-by: galiniliev <[email protected]> * feat(workers): preserve repository authority during dispatch and recovery Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: 4abaa98c-2f3b-4712-af02-5afb8839a3bd * test: preserve integration exports in dispatch fixture Co-authored-by: galiniliev <[email protected]> * feat(workers): start repository sessions from runtime image reserves Keep image preparation separate from repository contents and empty workspaces. Select runtime-only intents for image-capacity integrations, claim under live authority, and perform repository startup with the current request's credential reader. Settle rejected unallocated image requests without breaking stored provisioning replay. Co-authored-by: galiniliev <[email protected]> * feat(workers): start repository sessions from runtime image reserves Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: eb6f32e5-03b0-429d-809d-1189bd23b87c * feat(workers): keep runtime image reserves ready without browser presence Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: 130a2b63-442c-4c80-aa7b-39bc5c4b872b * fix(workers): stop checkout when repository access is revoked Keep the repository policy assertion in shared read identities and prepared workspace synchronization through checkpoint awaits and each worker command. Prove allowed, forbidden, and late-revoked cold and prepared flows with local Node execution, Git, and checkpoint transfer. Co-authored-by: galiniliev <[email protected]> * Publish openclaw/p3a-repository-authority Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: ca19bb5b-7413-420d-9ba1-46578e011f37 * test: restore canonical image reserve test ordering Keep Gateway database-worker discovery and its canonical registry in the same sorted order. Co-authored-by: galiniliev <[email protected]> * Publish openclaw/p3a-repository-authority Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: ab1916b4-e0cf-4992-a62f-13d94e27e2db * fix(workers): keep reserve cleanup independent of policy admission Co-authored-by: galiniliev <[email protected]> * test(workers): prove image claims through real repository effects Exercise native App issuance, authenticated Git checkout, checkpoint restore, revoked and reassigned callers, and fresh recovery authority without cloud spend. Preserve existing prepared-node proof via a shared unprepared-node fixture. Co-authored-by: galiniliev <[email protected]> * Publish openclaw/p3a-runtime-image-reserves Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: 16ac53c7-b38a-4982-8945-8f24c047ff8e * Publish openclaw/p3a-standing-reserves Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: 36d2aa5d-b360-4bb3-b442-ca44063ff2b2 * Publish openclaw/p3a-repository-authority Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: f39063e4-d5ac-484a-996c-378d1aed25ae * Publish openclaw/p3a-repository-authority Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: 405b9b26-cce1-43e7-9acb-93166b710d9c * Publish openclaw/p3a-repository-authority Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: c1d161ad-84f6-4784-bd5c-c779e8588775 * test(workers): cover managed identity image claims and recovery Exercise PAT and OAuth image checkout with the original host admission reader, denied callers and caller retirement. Share native profile setup with source-capacity proof, whose fixture remains explicit about repository preparation. Co-authored-by: galiniliev <[email protected]> * Publish openclaw/p3a-runtime-image-reserves Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: c3df37e2-07fc-4a9b-95a6-acb3a077f3cb * fix(workers): retain standing reserves during demand reconstruction Co-authored-by: galiniliev <[email protected]> * Publish openclaw/p3a-standing-reserves Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: 59e2edfb-d822-4d6e-93de-a5edbb076479 * fix(workers): retain repository admission after session creation Forward the native caller-bound reader through required placement without borrowing a chat scope. Keep automatic repository setup aligned with required-worker setup policy and repair the exact-head CI fixtures. Co-authored-by: galiniliev <[email protected]> * Publish openclaw/p3a-repository-authority Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: 72a91f97-2870-4d52-87e3-5f276658e867 * Publish openclaw/p3a-runtime-image-reserves Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: cb7ac3cb-df17-4874-98ec-23f5eec0838c * test(workers): exercise repository admission after image allocation Remove the RPC fixture-only repository identity call from credential-free image intent creation. Keep actual repository startup and all denial controls, assert one managed verification on success, and shrink the matching test allocation. Co-authored-by: galiniliev <[email protected]> * Publish openclaw/p3a-runtime-image-reserves Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: 21adb907-ae6f-446c-8e58-29fa48af700a * Publish openclaw/p3a-standing-reserves Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: 869588f1-1142-4887-9785-353e5050fa2f * fix(gateway): preserve native shutdown and identity fixture contracts Align startup rollback proof with required finalizer joins from openclaw#188920. Keep native repository connection and Enterprise identity resolution in the handshake fixture, mocking only remote enrichment. Preserve existing handshake and revocation assertions. Co-authored-by: galiniliev <[email protected]> * Publish openclaw/p3a-repository-authority Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: 5bbb8a2f-4466-4f58-9406-3c8b39e44b5f * Publish openclaw/p3a-runtime-image-reserves Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: 2098e121-027c-4257-bfed-57016863f99b * Publish openclaw/p3a-standing-reserves Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: 5537df35-0ca3-4b29-a1b1-8f2ce9b02a23 * Publish openclaw/p3a-runtime-image-reserves Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: 0ec84c8a-6397-489f-8d47-3fed1f9c9414 * Publish openclaw/p3a-standing-reserves Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: 184bf98b-756a-4986-9bbb-ef9a7cf5a640 * Publish openclaw/p3a-standing-reserves Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: c21eb49f-3ad5-4ec6-be3a-da37e8a22288 --------- Co-authored-by: galiniliev <[email protected]>
Related: #188679, merged as
b7563b304095b4d4f329f2a82ada08d9ec8da4c3, and landed repository authority #188656. GitHub retargeted this PR to main. This history-preserving refresh integrates exact mainf461e03db24051da076db81de9796696cb44d872; it does not land this PR.Landing remains coordinator-owned: current-head CI and the normal landing gates must pass. Earlier-head checks are not approval of this new head; no CI rerun was requested.
What Problem This Solves
Runtime-image integrations need ready capacity without a connected browser, without unavailable policy blocking cleanup or restart destroying and replacing existing ready workers.
User Impact
The configured default profile keeps runtime-only workers ready and refills after claims. Restart preserves compatible reserve identities while demand is reconstructed. Disabling capacity drains unused workers without interrupting attached sessions or extending finite deadlines. Ready workers incur running-machine charges until deletion is confirmed.
Why This Change Was Made
Standing demand reuses the existing pool and environment inventory. Image preparation contains runtime artifacts, not repository contents or credentials. Repository claim/startup and credential authority are supplied by the landed prerequisites. Browser-driven repository demand and empty-workspace activation retain their existing paths.
Demand observation cannot disable expiry or physical cleanup. Pending reconstruction preserves inventory but grants no provider I/O. Actual activation—not a restored reserve’s creation timestamp—supplies independent refill demand, and allocation rechecks current authority and capacity after awaited preflight. Explicit repository builds remain request-owned.
The standing slice adds no pool, schema, retained-disk feature, configuration option or live cloud change. Its unchanged delta remains 190 production lines and 891 regression/support lines, with matching allocations of 387 + 351 + 153.
Evidence
Current main conflict refresh
Source commit
04f043eb9fa7bbe61a812415c4508bc5ce6fa9ec, treeb312a37f4f569d29b25399eb34526d3da1d3a277. Published head0bcd6b6a24020795f6386bf43cec467251a5d75dis tree-identical, with this tested source as its sole parent and Galin credit preserved. Source merge parents are prior published standing head33c19772f2b1066e733d50707b68a314c74411bfand pinned mainf461e03db24051da076db81de9796696cb44d872.d706576eagainst6b709d0663e502317127220b3d65c913e77644b6remains bound to the unchanged scope. The mechanical conflict resolution and complete feature preservation were inspected directly; no duplicate hosted review was requested.Retained behavior proof — original source identities
9ffdd062086b38d635528910c70cae046596cf04, published33c19772f2b1066e733d50707b68a314c74411bf, tree298ed662a00cf5852958609c0125a551ca18f833: 127.25 seconds, comprising 24 standing lifecycle/production-adapter transport cases (80.40 seconds Vitest) and ten actual RPC/automation sibling cases (42.64 seconds). This remains prior-head evidence, not a rerun of all 34 cases on the refresh.152be64ad1218dacab978cea3d0448045656d5bc/ source2e562e6ca5234884d0b572cad19475ed32663e25, tree1df9ad396928409baf5edba2605cade954e6f02a: 186.05 seconds Vitest / 188.72 seconds wrapper. Not rerun or relabeled solely for this refresh. The restart regression was red against6b709d0, where original workers were replaced.92fa442bremoved fixture-only repository credential access during image preparation while preserving real startup admission. The earlier failed allowed-RPC reproduction on0367beeband corrected ten-case proof onee4ec182retain their original source identities.v2026.10.9v1 payload/settings/ownership/finite-expiry preservation is prior model/data evidence. Separately, the prerequisite owner completed the installed stable upgrade onb062896364982a2838139025c0497d6e5bfb7712(agent schema25→39, state schema20→36, configuration, 14 plugins and retained checkpoint, with teardown). That is prerequisite-owned evidence, not a new installed-binary run on this standing merge or active-worker reconnection proof.Remaining qualification
Current-head CI and root-owned landing gates remain. Node/artifact/provider inputs are controlled synthetic fixtures; real adapter/subprocess, lifecycle and state owners execute locally. No live-provider, browser/model-turn, active-worker reconnection or new installed-release upgrade success is claimed. Landed prerequisite evidence is in #188679 and #188656.
Source implementation by @galiniliev, selectively extracted and adapted from
63fda88754e4b57b6893095c0dffc88a3ba1381fand the required request-owned-build correction. The original source branch remains unchanged.Worked on by
Work sessions