Repository navigation
fix(github): recover saved repository publications - #193873
Conversation
|
|
Codex review: blocked before merge. What this changesThis PR recovers saved repository publications, integrates checkpoints against the default branch, and separates worker execution credentials from the final publisher. Example: A session sourced from topic saves a publication request before a temporary HTTP 503.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 1 item remains Keep this PR open: it repairs concrete publication failures still present on main, and the earlier code findings appear resolved. Priority: P2 Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherThe Gateway admits publication requests and stores receipts; workers integrate immutable checkpoints, then the Gateway performs GitHub branch and PR writes. flowchart LR
A[Authenticated requester] --> B[Gateway publication coordinator]
B --> C[SQLite receipts and checkpoints]
C --> D[Placement recovery]
D --> E[Private worker Git integration]
E --> F[Gateway publisher]
F --> G[GitHub branch and pull request]
Technical reviewBest possible solution: Retain the existing receipt, checkpoint, placement, and transfer owners while qualifying the completed recovery path before merge. Do we have a high-confidence way to reproduce the issue? Current-main source establishes source-ref base selection and terminal failed receipts without this reopening path; supplied native and process regressions exercise the repair, but this read-only review ran no reproduction. Is this the best way to solve the issue? The repair uses existing authoritative owners, preserves immutable input and exact branch updates, and addresses the prior findings without establishing another concrete code defect. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against df0d49f58d1f. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfacePR surface statistics unavailable: the file list is incomplete. Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. 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 (10 earlier review cycles; latest 8 shown)
Reviewed November 13, 2026, 3:11 PM ET / 20:11 UTC (Revision 11). |
Keep native publication integration in the database worker lane, preserve canonical registration order, and assert the extended requester capability without weakening exact RPC matching. Co-authored-by: galiniliev <[email protected]>
Exercise current requester roles, live placement reservation, and repository credential admission against a harmless loopback sink. Keep synthetic credential-provider evidence separate from live provider acceptance. Co-authored-by: galiniliev <[email protected]>
Allocate exactly 141 net regression lines: 132 real-owner authority proof, eight Vitest ownership assertions, and one RPC requester matcher. The inherited 80-line base debt remains visible; this does not raise the shared scalar or conceal a failing ratchet. Co-authored-by: galiniliev <[email protected]>
Extract the native workspace transfer operation into a leaf contract so merge transport no longer depends back on its client. Register repository reopen writes only under the existing repositoryMutation authority owner, with both admitted and bypass guard coverage. Co-authored-by: galiniliev <[email protected]>
Co-authored-by: galiniliev <[email protected]>
Baseline-Refresh: 587054c7a73f1b1565b0be250152e9792a266af0 Co-authored-by: galiniliev <[email protected]> Co-authored-by: vyctorbrzezowski <[email protected]>
Carry the current publication reader through recorded worker recovery; preserve the chat reader only for callers without an explicit reader. Prove allowed and revoked recovery at the placement/admission boundary. Co-authored-by: galiniliev <[email protected]> Co-authored-by: vyctorbrzezowski <[email protected]>
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Include checkpoint capture in the existing publication recovery budget, while keeping editing admission separate from private integration and settlement. Preserve earlier failures when reservation contention skips an attempt. Co-authored-by: galiniliev <[email protected]> Co-authored-by: vyctorbrzezowski <[email protected]>
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Baseline-Refresh: 36cb321ff9320f75866fa5580d8a2bdff6bf4bd0 Co-authored-by: galiniliev <[email protected]> Co-authored-by: vyctorbrzezowski <[email protected]>
Forward the existing publication operation signal through placement admission and offline-worker reconnect. Preserve the existing Gateway drain, deadline, current-authority checks and cleanup ownership. Co-authored-by: galiniliev <[email protected]> Co-authored-by: vyctorbrzezowski <[email protected]>
Align the old lifetime oracle with #197875: a fresh attempt that never entered allocation becomes failed even after its provisioning transition committed. Preserve both real COMMIT barriers, the original timeout and no-allocation contract; independently assert persisted state and joined settlement. Co-authored-by: galiniliev <[email protected]> Co-authored-by: vyctorbrzezowski <[email protected]>
Baseline-Refresh: 5075bd497b68844d3b445e62379cb978ea5aeaa8 Co-authored-by: galiniliev <[email protected]> Co-authored-by: vyctorbrzezowski <[email protected]>
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Merged via squash.
|
* fix(github): recover saved repository publications * fix(test): correct publication recovery test ownership Keep native publication integration in the database worker lane, preserve canonical registration order, and assert the extended requester capability without weakening exact RPC matching. Co-authored-by: galiniliev <[email protected]> * test(github): qualify publication authority before credential effects Exercise current requester roles, live placement reservation, and repository credential admission against a harmless loopback sink. Keep synthetic credential-provider evidence separate from live provider acceptance. Co-authored-by: galiniliev <[email protected]> * test(github): account for scoped publication regression lines Allocate exactly 141 net regression lines: 132 real-owner authority proof, eight Vitest ownership assertions, and one RPC requester matcher. The inherited 80-line base debt remains visible; this does not raise the shared scalar or conceal a failing ratchet. Co-authored-by: galiniliev <[email protected]> * fix(github): repair publication architecture ownership gates Extract the native workspace transfer operation into a leaf contract so merge transport no longer depends back on its client. Register repository reopen writes only under the existing repositoryMutation authority owner, with both admitted and bypass guard coverage. Co-authored-by: galiniliev <[email protected]> * test(github): use default publication registry runtime Co-authored-by: galiniliev <[email protected]> * test(github): compose native publication recovery proof Exercise real requester admission, receipt recovery, native Git and HTTP transport with a task-owned physical ref CAS oracle. Preserve request and checkpoint identity across a synthetic pre-effect 503 and coordinator reconstruction, with revoked authority, changed requester, moving placement and revoked custody controls. Reuse the existing synthetic credential fixture and allocate exactly 432 net new test lines. Provider responses, node enrollment and checkpoint input remain test-controlled; this does not claim live-provider or full Gateway restart acceptance. Existing full-ratchet debt remains unresolved. Co-authored-by: galiniliev <[email protected]> Co-authored-by: vyctorbrzezowski <[email protected]> * test(github): prove publication across Gateway process restart Exercise public repository sessions, authenticated requester admission, dispatched native worker writes, and saved checkpoint publication through a task-local GitHub transport. Restart the actual Gateway OS process while retaining native worker owners, then reopen the original request and verify one physical Git ref CAS. Reject a revoked original requester without additional transport or worker effects. External publisher/model responses are synthetic; actual profile, placement, credential admission, native Git, HTTP, process custody and durable receipts remain production-owned. Allocate exactly 929 new LF-counted test lines; preserve the inherited 80-line global debt and earlier coordinator-only evidence. Co-authored-by: galiniliev <[email protected]> Co-authored-by: vyctorbrzezowski <[email protected]> * test(github): create process proof diagnostics directory Address the scoped independent review finding: create the task-local diagnostics parent before cleanup writes so fresh checkouts do not fail with ENOENT. Keep cleanup errors visible and reduce the exact regression allocation by the three removed LF lines. Co-authored-by: galiniliev <[email protected]> Co-authored-by: vyctorbrzezowski <[email protected]> * test(github): preserve isolated publication transport in CI Bind the fixture-owned PATH explicitly so clean CI startup cannot select a system GitHub CLI instead of the synthetic loopback transport. Preserve real requester, credential, restart, and physical Git CAS assertions. Co-authored-by: galiniliev <[email protected]> Co-authored-by: vyctorbrzezowski <[email protected]> * fix(github): keep personal publisher credentials on the Gateway Use the normal worker execution identity for repository integration while retaining the selected publisher for Gateway API, ref and PR writes. Check live selection, repository reads and operation lifetime without borrowing a coding turn or changing the worker protocol. Preserve transient throttling recovery and document the execution-reader prerequisite. Co-authored-by: galiniliev <[email protected]> Co-authored-by: vyctorbrzezowski <[email protected]> * fix: wait for private publication cleanup before draining Join native private publication work before acknowledging workspace drain while preserving concurrent editing. Fund the two success/cancellation regressions with exactly 126 LF; inherited 80-line debt remains separate. Co-authored-by: galiniliev <[email protected]> Co-authored-by: vyctorbrzezowski <[email protected]> * fix: keep editing available while publication drains Reserve the publication settlement barrier under workspace serialization, then join it outside the editing queue. Exercise editing after drain admission and remove an inert prepared-store spy; reduce the exact allocation to 123 LF. Co-authored-by: galiniliev <[email protected]> Co-authored-by: vyctorbrzezowski <[email protected]> * fix: recover publication with its original dispatch authority Carry the current publication reader through recorded worker recovery; preserve the chat reader only for callers without an explicit reader. Prove allowed and revoked recovery at the placement/admission boundary. Co-authored-by: galiniliev <[email protected]> Co-authored-by: vyctorbrzezowski <[email protected]> * fix(github): bound recovery after checkpoint capture failures Include checkpoint capture in the existing publication recovery budget, while keeping editing admission separate from private integration and settlement. Preserve earlier failures when reservation contention skips an attempt. Co-authored-by: galiniliev <[email protected]> Co-authored-by: vyctorbrzezowski <[email protected]> * fix(github): cancel publication worker recovery promptly Forward the existing publication operation signal through placement admission and offline-worker reconnect. Preserve the existing Gateway drain, deadline, current-authority checks and cleanup ownership. Co-authored-by: galiniliev <[email protected]> Co-authored-by: vyctorbrzezowski <[email protected]> * test(workers): follow unallocated timeout settlement Align the old lifetime oracle with openclaw#197875: a fresh attempt that never entered allocation becomes failed even after its provisioning transition committed. Preserve both real COMMIT barriers, the original timeout and no-allocation contract; independently assert persisted state and joined settlement. Co-authored-by: galiniliev <[email protected]> Co-authored-by: vyctorbrzezowski <[email protected]> --------- Co-authored-by: galiniliev <[email protected]> Co-authored-by: vyctorbrzezowski <[email protected]>
Allow initial guest PR preparation from the recorded project's published history while preserving unpublished work and original PR identity. (cherry picked from commit 2757947) Stable adaptation: preserve the existing linked-identity fixture; expand its options type and allocate exactly 89 regression LF instead of 84. Production and documentation patches are unchanged from the source. Companions: #188785 is present-equivalent. Later #188784, #190223, #190576, #190542, #195413, #197229, #197243, #199717, #195787, #197510, #193664, #199851, #199864, #197656, #198851, #193873, #197594, #189006, #188904, #194025, #196200, #192283, #189010, #188816 and e0466ff are not prerequisites to this scoped repair; retain their separate intake dispositions. No later PR-number mentions. Proof: baseline 4 failed/20 passed through registered agent action; fixed 41/41 across preparation, refresh and base-action suites. Type-aware lint4, formatting5, docs MDX1419 and diff check pass. No live GitHub or full release qualification claim. Co-authored-by: RomneyDa <[email protected]>
What Problem This Solves
Repository-backed sessions can publish against their selected source branch instead of the current default branch, and saved publication requests cannot recover from pre-effect outages or retained-worker reconnects. Native integration also forwarded the selected personal publisher credential to the worker instead of using the normal execution identity. Capture failures could bypass bounded recovery and leave a request pending indefinitely.
User Impact
Publication integrates the accepted checkpoint with one observed target tip in private worker Git state while preserving later edits, the editing index, the original request and existing PR metadata. Explicit retries revalidate the original requester and publisher; they never force-push or adopt an unmatched external head.
Repository-only publication requires the normal worker execution account to read the source/head and target/base roles: one repository in the common case, or fork and upstream when applicable. Actual read checks remain mandatory. My GitHub stays Gateway-held for final API/ref/PR writes and attribution. Missing execution credentials or access fail closed without personal-token fallback, anonymous fallback, new App requirements or broader grants. Ordinary worker Git/PR/issue capabilities are unchanged.
New capture still requires authoritative disk custody. Installed-upgrade and live private-provider/model qualification remain unperformed; these specific limitations were explicitly acknowledged in the landing direction below.
Why This Change Was Made
Reuse the existing checkpoint, receipt, placement/runtime recovery, transfer and native Git owners. Capture holds editing custody; merge work stays private. Failure receipts retain bounded transport facts, not command output. Worker execution credentials have a bounded publication-operation lifetime independent of the API publisher, with acquisition rotation, committed selection, expiry, requester and placement checks. Native drain joins private publication and awaited cleanup outside the editing queue.
Reclaimed recovery carries the publication's existing live startup reader through the normal placement owner, without fabricating a chat turn or substituting credentials after denial. Capture errors use the existing cooldown and three-attempt/one-hour terminal policy. Healthy checkpoint waits remain exempt; busy work preserves previous failures. Terminal settlement rereads the current receipt under workspace exclusion without recapture or Git replay. The existing operation signal reaches placement and reconnect waits. No database schema, protocol extension, broader grant or new recovery owner was added.
Contributors: @galiniliev and @vyctorbrzezowski.
Work sessions
Linked for team reference; these sessions aren’t public.
Evidence
Exact T and independent landing disposition
Published head
0feb33f12155b29bb824b6ecaf2d707067be9698, tree119568553410ac8ed89106d60e92f3ed23635533. All85 scoped modes/blobs, signatures, ordered parents and both human trailers were verified. Historical source-for-proof receipt3acf53eaea9e14f4d0ef9025875d6030c7c2e942retains its original review1fde21bc0a30cb7946ff5265c6346110e3260a3f; it was not restamped as landing proof.On November13 at22:29UTC the requester explicitly directed landing with the named installed-upgrade, live-private recovery and full-helper qualification gaps acknowledged, at the actual hosted3/3/4. A fresh independent ordinary correction review considered that new scope, current green CI and the actual source-bound evidence. Its verdict is READY FOR /prepare-pr, review OID
8913c2a135c58314f4a80375bd49ee3cfdf0fcda, SHA256fd550aafa1907c9760ac6ec2137127e198c8c348488d8bf03bde54c7bd7b8a33. Unmodified canonical validation passed before and after installation. This is independent review disposition, not a claim that native preparation or merge has completed; current authority, source, CI/security and landing checks still apply.The reviewer traced permitted behavior/authority/credential/drain owners and inspected actual execution evidence:57 manifest entries,54 CI-log hashes and201 named proof lines. The behavioral assessment was completed; no new runtime test execution was claimed. All37 historical finding IDs across42 retained reviews, including originalR1–R5/NCI1, have explicit dispositions. Installed/live/helper gaps remain honestly recorded; the three investigated local HTTP failures remain
tests.result:failwith their investigation records. No denied source was accessed, and no review/policy/receipt bypass was used.CI and hosted review
Exact-T CI43492565015/1 PASSED November13 at19:54:52UTC:108 jobs,81 success/27 skipped/zero failed or active. Both required CI-gate forms and sensitive/dependency statuses succeed. The terminal post-review rollup has182 contexts:116 success/65 skipped/1 neutral. No rerun, new allocation credit or CI exception was used.
The exact-T hosted assessment, revision11, remains 3/6 readiness · 3/6 proof · 4/6 patch, zero concrete code findings; Security:None. Receiver43498247711/1, job132136926198, reviewed at20:11:26.361UTC. The single request6863558487 was accepted/completed; finalizer43499508888 was not another review. No higher rating is claimed or requested.
Hosted sourceRevision
e5a2a9dc844a9e50eb9a628cc74882c73233b7ecc523f8d3545a5c3054ddd0f1binds exact T and its earlier16007-byte body, SHA256dbfc4ceeb8fbdd0a070b41386d14a251f7a57f77ace7e89d293670b346af8eab. Later factual status/landing-direction updates are not silently claimed covered by that sourceRevision. The new ordinary review is separate; source remains T.Actions executed merge
6ce32d561d1ce8f2538d0c6e124c06bd66dc1438, tree07624509c3d2553ae4f1a3d8e3b48fb4ba278e35, parents main77a0a8426513a024f2220c78085ddbd5731a059cthen T.83/85 product paths equal T; newer main supplies the shared-request-specific recovery dispatcher and two test registrations. Both differences and the complete dispatcher owner were inspected; sequential recovery, stop/empty checks, selected-shared isolation and aggregate-error handling remain. This is merge-ref evidence, not standalone byte equivalence.Orchestration was Node24.22.1; workers Bun1.4.4-canary.1+191755ec1/bun-all; Vitest5.0.5. Security publisher43496642175/1 explicitly binds T and CI attempt1; required contexts were independently checked. Exact-T notice identifies Maintain authority and requires no additional SecOps approval. Effect-time enforcement remains separate from any accepted qualification gap.
Local and hosted proof
Selected Control UI E2E and four PostgreSQL conformance jobs pass. Skips are not coverage and overlapping counts are not summed. External GitHub/model/provider responses are synthetic. The process command was:
T's parents are signed S
fd45e4facd6bc3486808d8402a3aedb75262cfbdand selected maina48a3175600e3cad5554128a4cf0012c4e65d9ad. Native integration included official #198153, without duplicate patch or history rewrite. All85 standalone product modes/blobs equal reviewed S; outside scope equals selected main.Repaired failures and retained history
R CI43382208321/1 remains failed108 jobs79/3/26, merge71bcaed5/main42f933c7+R. Both assertions reproduced on R under pinned Bun:40 pass/2 fail,110.34s wrapper—not full-hosted-merge/base replay. Memory count1/actual0 was corrected by upstream #198153/16663ca0869f5f3e7b53324dbe796ed308a6bf70 to match #195369 cache retirement while preserving indexed text/executor/drain/leases. The provisioning-timeout fixture now follows #197875's never-allocated failure contract, retaining real COMMIT barriers, original5ms timeout, no allocation, exact error and joined settlement. Production behavior was unchanged.
S final39/39 passed71.62s wrapper; earlier56/56 preceded equivalent coalescing. Two mutation controls failed state/error contracts on earlier fixture bytes, not final coalesced bytes; production was restored. Net test change−1LF. Original UNKNOWN classification and historical failures were not relabeled by T success.
Q integrated #197929's startup fix; Q199 passes/23 optional PostgreSQL skips remain Q facts. R's existing-signal propagation fixed delayed cancellation, not credential exposure/authority bypass: redQ, then54/54 and stronger7/7; canonical2paths/19contexts320128bytes was scoped-clean. R's local OS evidence was source-equivalent staged94c972c4; T has its own committed proof.
P CI43305753294 remains failed107 jobs78/3/26; its startup oracle was corrected by #197929, while ratchet-runner communication loss/rawlog404 still has no established assertion/OOM/timeout cause. O CI43295300207 passed108 jobs81/27. Hosted success does not erase historical local Node proxy502 failures or establish runtime equivalence.
J CI43168237254 failed retired global25 budget/downstream gate. #197602 introduced the per-change owner; all six allocation blobs remain unchanged, with no extra25/scalar restoration. Historical local80 debt from #191554/35702b4 stays dated evidence. P160 passes/23 optional PostgreSQL skips/capture reds/OS2 remain P facts. H proved personal custody after redG; J fixed drain/I editing-lock defects. I's interrupted aggregate is not two completed red cases. F HTTP401, G identity_changed/cloud-wire closure and F interrupted build-inclusive proof remain recorded; a local Bun panic never established cloud-wire cause. Earlier103/32/5 and all revision-specific counts remain separate.
Immutable historical F process-proof trace
Captured before F publication; publication fields describe that capture time, not current head. JSON SHA-256 including its terminal newline:
a1bb5e77fdf1c673b72e6bb3956a48c89e80581da9efd89518e1373240ddaafd.{ "kind": "public-safe-local-process-proof", "candidateCommit": "f2b6d8782559b7838ea05d91d731c495355383fb", "candidateTree": "3596775de1ac22999c058c5238f0095d08cd6141", "testSourceSha256": "5c45205d282043e8127f413a58e96330411019e2e7379c91f2282cb248b18dbc", "runtimeBuiltFrom": "12815829c422c8664891ec7345713b8182d89ce6", "runtimeInputSignature": "8a1d7e34ebf18c8b905fb6e4b8003e45aa480968f444433e63fa43a046e85c1b", "runtimeNodeVersion": "v26.12.1", "publishedHeadAtLastObservation": "7a4185da18076093594a8122005d1bc8bc483aa0", "sourcePublication": "not performed", "cases": [ { "scenario": "allowed", "gatewayPidBefore": 527009, "gatewayPidAfter": 540742, "oldProcessExtinctionVerified": true, "requestId": "50c23983-cf69-4b61-b560-97c48554322f", "checkpointRef": "refs/openclaw/worker-results/5b1a4c22-b690-4601-a1e6-a09b9da70650", "checkpointDigest": "sha256:1999c9a99704c1c1f4c822cdbf056cedcbc1bf9822091d3cef114a00e9ab9fd4", "requestAndCheckpointPreserved": true, "physicalRefCasCount": 1, "syntheticPullRequestCount": 1, "durableStatus": "published", "gitObjectWrites": 5, "publishedFixtureHead": "864de466ed94aeecff3f3956b62a0c14133adad5", "gitContentsAndAncestryVerified": true }, { "scenario": "revoked", "gatewayPidBefore": 607304, "gatewayPidAfter": 625525, "oldProcessExtinctionVerified": true, "requestId": "2184ef9e-f832-40e9-a122-6096118c33e4", "checkpointRef": "refs/openclaw/worker-results/aac6f693-ae4c-4d96-b1b9-92858898152d", "checkpointDigest": "sha256:457e956e90b49e2d5980637ae0196fd00140a47a958018bacb9d28c51360c591", "requestAndCheckpointPreserved": true, "physicalRefCasCount": 0, "syntheticPullRequestCount": 0, "durableStatus": "failed", "gitObjectWrites": 0, "actualRefusal": "FORBIDDEN: missing scope: operator.sessions.write", "additionalRetryEffects": 0, "durableErrorCode": "unavailable" } ], "qualification": { "finalSourceCaseResults": "both cases passed separately", "postRepairAggregate": "interrupted by outer build-inclusive deadline after allowed passed; not aggregate green", "siblingTestsPassed": 8, "targetedTypesLintFormat": "passed", "independentCodeReview": "one cleanup-directory P2 accepted, repaired and validated; findings resolved, not retroactively scoped-clean", "ownNewTestLineAllocation": 926, "fullTestLineBudget": "RED: inherited80 remains" }, "limits": [ "External GitHub and model responses are synthetic. No real GitHub PR was created.", "The Gateway crosses real OS-process boundaries; retained native node owners live in the fixture process with real worker children.", "Revocation is a real original-requester ingress rejection; no claim that a revoked retry reached credential dispatch.", "Latest-stable upgrade, real-model/private-provider acceptance and hosted CI on F remain unproven.", "Earlier103/32/5 evidence stays separately source-bound and is not summed into these cases." ] }Explicitly accepted qualification limitations
The November13 landing direction accepted these named gaps; the fresh independent review records them without claiming completion:
Historical local HTTP failures remain failed with their investigated limitations. Last verified stable reference v2026.11.3 is a prior observation, not a fresh release check; no package-age bypass, new fixture/account/provider/model resource or deployment was authorized or performed. Accepted qualifications do not waive current native source, permission, CI/security, enforced review or exact-head merge checks.