Repository navigation
feat(workers): start repository sessions from runtime image reserves - #188679
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
|
🦞👀 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 maintainer review before merge. What this changesThis PR lets repository integrations claim or provision runtime-only workers before checking out repositories under current request authority. Example: The development profile has a compatible runtime reserve and an integration selects preparedCapacity: image.
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-directed feature adds useful runtime-only capacity without a concrete introduced defect found; the stacked prerequisite and failing baseline check still need qualification before landing. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherGateway placement dispatch combines integration capacity policy, provider preparation, and worker inventory to select a worker; existing repository startup then supplies authorized checkout and checkpoint restoration. flowchart TD
A[Repository dispatch] --> B[Integration capacity policy]
B --> C[Runtime preparation identity]
C --> D[Reserve claim or cold allocation]
D --> E[Current caller credential admission]
E --> F[Repository checkout and checkpoint restore]
F --> G[Active worker placement]
Technical reviewBest possible solution: Land this bounded runtime-capacity slice after its prerequisite and exact-head required checks qualify. Do we have a high-confidence way to reproduce the issue? This is a feature addition; current-main source confirms that runtime preparation supports empty workspaces but lacks the image-specific identity and dispatch selection. Is this the best way to solve the issue? The implementation uses the existing preparation, inventory, placement, credential, and repository-startup owners; the separate discriminator and live allocation guard are necessary to keep reusable runtime capacity independent of repository authority. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 528b92792ed0. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +130, Tests +914, Docs +2, Other +4. Total +1050 across 14 files. Added test files: 3. 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 HistoryReviewed October 30, 2026, 6:28 PM ET / 22:28 UTC (Revision 3). |
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
Co-authored-by: galiniliev <[email protected]>
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]>
Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: c3df37e2-07fc-4a9b-95a6-acb3a077f3cb
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]>
Regenerate the config baseline on the combined source; retain the reviewed RPC admission fixes and landed prefix configuration. Co-authored-by: galiniliev <[email protected]>
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
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
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
Security-sensitive guard clearedCurrent revision: This PR no longer changes files in the maintainer security-review tier. Separate CODEOWNERS requirements still apply to security policy and enforcement files. |
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
|
Merged via squash.
|
…penclaw#188679) * 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 * 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 * 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-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 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 * 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-runtime-image-reserves Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: 0ec84c8a-6397-489f-8d47-3fed1f9c9414 --------- Co-authored-by: galiniliev <[email protected]>
Related: #188656, now merged as
a4b07c63b60cf3a971c824064c82946c530e1686. This PR now targets main. History-preserving refresh75275a543acd67edc3e6ec353aff0c73d15d1a2cmerges that exact main into the existing image branch; it does not land this PR.What Problem This Solves
Repository integrations need to separate reusable runtime capacity from each session's repository access and checkout.
User Impact
Integrations selecting image-only capacity can claim a compatible runtime worker, or provision one cold, then restore the repository under the current request's authority. Image preparation does not read repository contents or obtain GitHub credentials. Unsupported profiles fail before allocation. Native, paired-device, and repository-capacity preparation retain their existing paths.
Why This Change Was Made
Image and empty-workspace preparation have distinct source, claim, and cache identities. Dispatch selects runtime-only intent without repository preparation inputs; repository startup retains the original host-side credential reader, including admission and current-authority checks. Live profile checks reach allocation and claim, and retries settle stored intent rather than selecting a changed profile.
Rejected, unallocated image requests are terminalized so reconciliation cannot later allocate them. Uncertain provisioning and cancellation retain their existing ownership. Repository authority, native credential return, required-profile admission, and sessions.create caller handling are supplied by the landed prerequisite, not duplicated here.
The image delta adds no standing-demand/refill policy, retained-disk feature, heartbeat, packaging feature, database table, live configuration change, or production test hook. Production growth remains 130 lines; test growth is 1,025 lines with matching allocations of 586 + 326 + 113. Node/transfer and managed-profile fixtures are shared.
Evidence
Current main conflict refresh
Tested tree:
4ca284c6ee331f5ead63a56c21758d18537e16b3. First parent: previous image head428a4576808c07fc5f1582755bcadf08d9a6dc21; second parent: exact maina4b07c63b60cf3a971c824064c82946c530e1686.92fa442b0ea78784434b9a87f4f780f8c32f94f1; the complete path set against main is still exactly those 17 files, with no extra base-relative edits.runtime-artifactsexport; workspace manifests and package versions are unchanged. Tests use independently frozen read-only fs-safe 0.27.0 dependencies and private generated outputs in secretless Node 24.22.1 containers. No parent mutable dist/cache, live cloud, or live credentials were used.428a…CI result remains previous-head evidence. Natural CI on this new publication is still required; no workflow rerun was requested.Actual authority and checkout effects
Retained provenance and compatibility evidence
b062896364982a2838139025c0497d6e5bfb7712, tree2b96a7360603b237e4d4b3facbaff778c25f3cdf, was integrated throughe56379f…and tree-identical merge94fdd2b3…before its squash landing. That image tree6455ab40de45e201e3044bcd88d7f146a284a298passed the 54-case suite in 136.38 seconds with independently frozen inputs.b062…: agent schema 25→39, state schema 20→36, configuration, 14 plugins and retained checkpoint proof, with teardown confirmed. That is prerequisite-owned evidence, not a new installed-binary run on this image refresh; no active-worker reconnection is claimed.92fa442…, tree949676825692d904ecad4b4f32e7c60a03e9850f, reproduced the original failing CI: one failed/nine passed on7594c433…, versus ten passed on exact parentc6ceb4ae…. Removing the fixture-only identity call from runtime intent creation preserved actual startup admission. Its 54-case repair run, static checks and ratchets passed; one test line and one allocation line were removed. Those ratchet totals remain historical input-bound evidence.v2026.10.9(8b18b5578f66eab1501cba4cef2310d88bfb9a41) used v1 project-shaped worker records, including empty local workspaces. Runtime-image identity is new capacity metadata, never authorization. This image slice changes no worker SQL table or settings schema. The earlier schema20→state36 synthetic-record spot-check is retained only as prior-head evidence.Remaining qualification
Current-head CI and root-owned landing gates remain. Physical provider allocation and authenticated Gateway connection facts are synthetic inputs; credential, authenticated Git, and checkpoint effects execute locally. No browser-login/model-turn, live-provider upgrade, active-worker reconnection, unsupported-old-Git compatibility, or new installed-release upgrade success is claimed. No duplicate hosted review was requested.
Source implementation by @galiniliev, extracted and adapted from
63fda88754e4b57b6893095c0dffc88a3ba1381fand its minimal prerequisites. The original source branch was not changed.Worked on by
Work sessions