Repository navigation
feat(workers): preserve repository authority during dispatch and recovery - #188656
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
|
🦞👀 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. |
|
Co-authored-by: galiniliev <[email protected]>
|
Codex review: blocked before merge. What this changesThis PR adds an optional plugin contract that preserves caller-bound repository authority during worker preparation, checkout, and recovery. Example: Repository access is revoked after checkpoint loading for example/project.
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 2 items remain Keep this useful, maintainer-authored PR open. The earlier authority findings are repaired, and no new actionable code defect was identified; GitHub currently reports a merge conflict. Priority: P2 Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherAuthenticated Gateway requests supply caller and session authority to worker dispatch; the native GitHub issuer and workspace owners consume live policy guards while preparing repository-backed workers. flowchart TD
A[Authenticated caller] --> B[Gateway dispatch admission]
B --> C[Selected repository integration]
C --> D[Native GitHub credential owner]
D --> E[Worker preparation and checkout]
C --> E
E --> F[Checkpoint restoration]
Technical reviewBest possible solution: Retain the existing credential and workspace owners, complete upgrade validation, and resolve the reported conflict without weakening live authority checks. Do we have a high-confidence way to reproduce the issue? Current-main source lacks this optional worker admission seam; the supplied regressions document failures before the authority repairs, but no target code was executed during this review. Is this the best way to solve the issue? The bounded integration seam is appropriate: plugins own repository policy, while existing native owners retain signing keys, temporary-token cleanup, worker effects, and checkpoint persistence. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 87ff32dbf367. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +801, Tests +866, Docs +29, Generated 0, Other +4. Total +1700 across 51 files. Added test files: 4. View PR surface stats
Review metrics
LabelsLabel 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 (2 earlier review cycles)
Reviewed October 30, 2026, 5:27 PM ET / 21:27 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
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: f39063e4-d5ac-484a-996c-378d1aed25ae
Integrate main without rewriting history and retain native credential results through policy admission. Co-authored-by: galiniliev <[email protected]>
Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: 405b9b26-cce1-43e7-9acb-93166b710d9c
Merge a32d79a and regenerate the canonical config baseline without changing the reviewed authority repairs. Co-authored-by: galiniliev <[email protected]>
Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: c1d161ad-84f6-4784-bd5c-c779e8588775
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
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]>
Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: 5bbb8a2f-4466-4f58-9406-3c8b39e44b5f
|
Merged via squash.
|
Resolve the live startup-fixture conflict against main by adopting the canonical required-shutdown-join test from #188656. Remove the task-only startup synchronization variant rather than keeping duplicate coverage of the superseded bounded-settlement contract. Move three unchanged enrollment assertions to the existing fixture support owner to retain the file-size gate after upstream #188671. All 78 cases across the seven owning files pass on the resolved tree; targeted type, type-aware lint, format, and test-line gates pass. The optional node split prototype remains outside this publication. Co-authored-by: galiniliev <[email protected]>
…very (openclaw#188656) * 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]> * 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 * Publish openclaw/p3a-repository-authority Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: ab1916b4-e0cf-4992-a62f-13d94e27e2db * 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 * 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 * 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 --------- Co-authored-by: galiniliev <[email protected]>
…urnal suite The connect-session path now calls resolveRepositoryConnectionIdentity (introduced on main by openclaw#188656), but the connect-journal test mocked github-user-identity with a static factory that did not provide it, so the call threw and the connect journal line was never written. Mock it to undefined (the fixture configures no repository integration, which is what the real implementation returns), keeping the connect path alive.
What Problem This Solves
Optional repository policies need caller-bound admission throughout worker preparation, checkout, and authenticated recovery, whether placement begins from chat or session creation and regardless of GitHub credential type.
User Impact
Deployments opt in with
gateway.repositoryIntegration. Missing or revoked admission refuses worker source access; omitting the integration preserves native behavior. Required repository placement retains the original session-creation caller after acknowledgment. Automatic required placement does not request setup scripts, consistent with its existing worktree behavior.Native owners retain credential issuance, managed-profile reading/rotation, and cleanup. The feature introduces no schema or checkpoint-format migration; the integrated upstream base includes agent schema 39. Fresh installed schema-25→39 configuration/checkpoint preservation passed on the published source, using the maintained private runtime-package profile described below. This is offline checkpoint recovery, not worker reconnection or full release-distribution acceptance.
Why This Change Was Made
One lifetime-bound integration owner supplies policy; existing identity, dispatch, and worker owners enforce it. Managed PAT/OAuth profiles enter policy admission before refresh/profile reads without asking a plugin for their bearer. Native/App paths retain their issuer and guarded return value. Dispatch forwards the original reader; source owners compose caller, policy, and dispatch lifetime checks. The redundant reader wrapper was deleted.
Session creation passes its native caller-bound reader through an internal preparation option. Existing retention and source-custody owners retain post-acknowledgment work. No chat admission is fabricated, and no wire field or additional issuer is introduced. Host credential callbacks remain excluded from node transport.
Published head
b062896364982a2838139025c0497d6e5bfb7712has the exact source tree of tested candidateb4358540899f6cbad387b302ae7dd35b88179ede:2b96a7360603b237e4d4b3facbaff778c25f3cdf. History is preserved, including exact main510e1687e965c1a5e2c372f6622704c88448fb5band #188922. The sole current-main conflict retains the canonical upstream logger. Reviewed fixture correction1420553393074da1a7434cb06011be929d9a6032preserves required shutdown joins and real connection-identity resolution. No guard, timeout, or test-line budget was relaxed; shared Workboard diagnostics credit is not duplicated.Evidence
v2026.10.9baseline (8b18b5578f66eab1501cba4cef2310d88bfb9a41) produced the repository session and revision-3 checkpoint through actual dispatch/editor RPCs. Its preserved pre-Doctor snapshot was restored into an isolated copy with exact hashes and database integrity checks: agent schema 25, global schema 20. The genuine stable package was installed and its CLI version checked, then the exact b062 candidate installed over the same prefix/config/state with networking disabled. Installeddoctor --fix --full-integrity-check --non-interactivecreated backups and migrated agent 25→39 and global 20→36. Both resulting database versions were independently read back.cron.list. All 14 plugins observed active in the baseline remained active through actualplugins.listRPC. Session identity and the exact repository/base/manifest/checkpoint reference and revision survived. With zero connected nodes and failed/offline placement, publicsessions.files.getreturned the original edited bytes, absent from the Git base. SHA-256 remained823ca7b910bb25c9299516a968a823fb1b06f20a10cb685c33e2cd8ee66133cd. This proves stored-checkpoint preservation and offline reads, not active-worker recovery, reconnection, or move-to-Gateway behavior.--runtime-only --bundle-plugin codex; no partial-build--skip-buildwas used. This private profile retains runtime CLI/Doctor, core plugins, configured Codex, and schema metadata while omitting SDK declaration promises and unrelated isolated external-plugin builds. Canonical inventory, normalization, and tarball-integrity checks passed. Installed build identity is2026.10.9-b06289636498-2026-10-31T05-24-57.798Z; package manifest declares agent 39/global 36. Tarball SHA-256:01d5ceead1f6955103033e3dbc04fd6e314c41017f7b721c2b7b68d5227451c7. Proof receipt SHA-256:6084cc8b1d7ec77573948c86f28a955422e3ef91c158d3c83d1c06b5bbc3ec09. This is not complete release-distribution or SDK/declaration acceptance.sessions.createcontrols and both diagnostic-enabled Workboard terminal hooks passed on b435, whose source tree exactly matches b062. The creation path exerciseshandleGatewayRequest→ required preparation → coordinator → native dispatch/Git/checkpoint effects after the RPC ACK, plus revoked policy, changed caller scope, replaced source, and targeted controller Stop. This is in-process RPC proof, not WebSocket/model proof; Stop coverage uses the real controller owner, not publicsessions.abort.resolveRepositoryConnectionIdentity, causing actual hello to returnUNAVAILABLE. The partial mock retains both native identity resolvers and mocks only remote enrichment. The original failure reproduced; all 54 handshake cases passed without weakening handshake/admission assertions. One broader ten-file replay produced 290 passes and a prewarm-cleanup timeout. Focused diagnostic and uninstrumented runs passed, but that timeout remains investigated and unexplained—not claimed fixed or flaky.c6ceb4ae6a44bf244e381e3006ed986778f6a3a3, with complete owning/caller context: scoped-clean, no actionable findings. Earlier complete RPC-correction review against0f2cc377e276367afbb641f7c38dde1679459126and prior feature reviews remain prior-cut evidence. Targeted typecheck, lint, formatting, normal commit hooks, and diff checks passed. Final b435 test-line ratchet passed: 6,323,662 lines against 6,353,478. Earlier schema generation/workflow validation remains source-bound prior proof. Source review is not CI approval.b0156d285bcbc8954252b1e3a28160cba0b7f329bb1ba71faa39b2dea6aa556a. That original evidence and state are unchanged; they are not relabeled as schema-39 proof.The scoped installed-upgrade gate is complete. Exact-head hosted CI and native landing remain independently owned by the coordinating maintainer workflow; no CI waiver or merge is implied by this evidence update.
Source implementation by @galiniliev, extracted and adapted from
63fda88754e4b57b6893095c0dffc88a3ba1381fand the minimal required prerequisite slices. The original source branch was not changed.Worked on by
Work sessions