Repository navigation
fix: partial-clone worktree snapshots fail on unfetched blobs - #188525
Conversation
Reuse batch object hydration under the removal authority before offline snapshot preparation. Refuse unpromised objects and retain repository backoff when hydration fails. Prove bounded transfers and offline restore through managed removal. Co-authored-by: steipete <[email protected]>
|
🦞👀 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 shares batch object hydration with snapshot capture so managed worktrees can archive unfetched promised content. Example: Archive a partial-clone worktree containing README.md and second.txt whose promised blobs are missing locally.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open. The earlier wrapper and checksum findings and the reset fixture failure are addressed; no new actionable code defect was found. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe managed-worktree snapshot host receives an admitted removal operation, prepares required Git objects, and delegates offline capture before the removal owner publishes recovery state and deletes the checkout. flowchart TD
A[Worktree removal] --> B[Removal authority and lease]
B --> C[Snapshot host]
C --> D[Shared batch hydrator]
D --> E[Configured promisor remote]
C --> F[Offline snapshot worker]
F --> G[Recovery snapshot and checkout removal]
Technical reviewBest possible solution: Use the existing batch hydrator under removal authority, then retain local snapshot validation and checkout preservation on failure. Do we have a high-confidence way to reproduce the issue? Current-main source and the reported base-failing real-Git regression establish that missing promised blobs prevent offline snapshot preparation; this review did not execute target code. Is this the best way to solve the issue? The extraction supplies one hydration owner for sizing and snapshot capture, preserves guarded Git execution, and avoids new configuration, persistence formats, or competing repair machinery. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against f4c7eb489a1f. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +52, Tests -1, Docs 0, Other -1. Total +50 across 11 files. Added test files: 0. View PR surface stats
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, 3:50 PM ET / 19:50 UTC (Revision 3). |
Add the extracted hydrator to the trusted wrapper inventory and expect the checksum fixture to fetch missing promised HEAD content before pack verification. Preserve strict corruption and checkout-retention assertions. Co-authored-by: steipete <[email protected]>
…sal order Accept zero or one hydration batch only when the compound checksum fixture combines missing promised HEAD content with an independently damaged payload pack. Retain exact fetch counts for every other case and all corruption suspension and checkout-preservation checks. Co-authored-by: steipete <[email protected]>
|
@clawsweeper re-review Both prior findings are addressed at |
|
🦞👀 Re-review progress:
|
Use the existing temporary-directory owner for Git workspaces instead of switching HOME and OpenClaw state beneath the retained test Gateway. Keep registry invalidation strict and preserve every reset, cleanup, permission, and byte-preservation assertion. Co-authored-by: steipete <[email protected]>
|
@clawsweeper re-review The reset failure is repaired at |
|
🦞👀 Re-review progress:
|
Extend the existing eager preparation owner to the runtime-config singleton so cold native fixture compilation and integrity verification finish before its startup watchdog starts. Keep the watchdog deadline and artifact guards unchanged; cover the affected direct and project runner boundary with the existing fixture. Co-authored-by: steipete <[email protected]>
Keep the zero-preparation fixture limited to lazy consumers now that runtime-config shares the existing eager native preparation owner. Preserve the success and zero-preparation assertions. Co-authored-by: steipete <[email protected]>
Match main's equivalent fixture comment and inline the single-use runner pathname without changing selection, assertions, or test cases. Co-authored-by: steipete <[email protected]>
|
Merged via squash.
|
…aw#188525) Fetch missing promised Git contents in one guarded batch before managed-worktree snapshot preparation. Keep final offline validation, corruption suspension/backoff and checkout preservation on failure. Include the hydration module in native wrapper provisioning and permit only zero or one batch for the compound checksum fixture without assuming Git traversal order. Keep reset consumer fixtures on the suite Gateway state root. Prepare the focused runtime-config test fixtures before its startup watchdog, preserving watchdog and integrity guards. Work sessions: https://team.openclaw.ai/chat/roboclaw/~key/dashboard/06278ba2-46e2-491c-b138-d3f8848cbf45 Co-authored-by: steipete <[email protected]>
What Problem This Solves
Fixes managed-worktree cleanup refusing a partial clone whose snapshot needs promised blobs that have not been fetched.
User Impact
Archiving a worktree can fetch its promised contents and preserve an offline-restorable snapshot. Failed transfers, missing non-promisor objects, corruption, and lost removal authority preserve the checkout.
Why This Change Was Made
Share the existing checkout batch hydrator with the admitted snapshot host before offline Git status/index preparation. The guarded fetch uses the existing promisor selection and repository mutation queue; final local validation and current removal authority still gate snapshot publication and checkout removal. Native provisioning includes the extracted hydration module.
The checksum fixture deliberately combines missing promised HEAD content with an independently damaged payload pack. Git can diagnose damage before hydration or attempt its single batch first. The assertion accepts only zero or one batch for checksum damage. Every other table count remains exact; healthy missing-promisor removal still requires exactly one batch. Suspension/backoff, pack custody, byte preservation and no removal remain required.
The reset consumer fixture now owns only a Git workspace directory. Its direct handlers retain the suite Gateway's state root, avoiding a second state owner that invalidated registry witnesses. Registry/security guards and every existing reset, cleanup, permission and byte-preservation assertion remain unchanged.
The focused runtime-config CI consumer now uses the existing eager fixture-preparation owner, just like subscriptions, before its startup watchdog starts. This preserves the 60-second watchdog and all compiled-artifact integrity checks. No CI planner or workflow definition changed.
Pr-simplify retained one hydration owner, no new configuration or state, and removed the unnecessary nested state fixture. Runtime +52 lines, wrapper +1 entry, test-runner helper −2 lines, net tests −2 lines against base
484cb468ccb7b3c85a35058d287c8b41e1400e24. No allocation, baseline or automation-definition changes.Evidence
48f5c66f8b0b3466e2168fc4c556e3aec104f3c8:pnpm build:runtimeand realpnpm openclaw worktrees create/remove/restorepassed, with two promised blobs, exactly one removal fetch, local object custody, and byte-for-byte restoration with all Git transports denied. Runtime inputs are unchanged by the final fixture corrections. Rootless Podman used 4 CPUs/8 GiB, exclusive flock, bridge networking and isolated task state; container removed; no serving Gateway touched.9e8a058de8afcdaf03f5774979e7d2e494b80a1c: 20 passed. Exact CI-tested merge68d779dcd97aea728e8854bb7ae03cf3c9f7082e: 19 passed / 1 failed, reproducing the dirty-checkout reset registry-witness failure. Treated as PR-caused. Observational logging in a detached diagnostic copy captured the suite projection refresh reactivating its original root between a nested-root witness capture and reset; a subsequent nested-root generation had no successor link, so the guard correctly refused. No guard or writer behavior was changed by that diagnostic.--maxWorkers=1, the verified pinned Bun revision, matching frozen dependency inputs, and HOME/config/state/temp isolated under task proof storage. The existing dirty-checkout test is the red/green regression; no assertion was relaxed.git diff --checkpassed. Fresh shared autoreview, Codex P0–P2, delta0a15785f590e890b870aa59174e4e9bb75c0319b→8445c8a80c89d8670946d44f94dd018c674f524c, with the full fixture, harness, state and registry owners: scoped-clean, no actionable findings. Prior implementation/extraction/checksum reviews remain applicable.EMFILEwhen opening an inotify watch. An independent single task-directory watch also failed withEMFILE(UID1000 inotify instance limit128); no system limit or serving process was changed. The earlier clean-runner CI passed the affected runner contracts, and current exact-head CI completed successfully; the historical local failures remain recorded.66446dc854dd505907b2b131e2f96912b3326176singleton replay also passed26, which was not used as inherited attribution. No matching terminating preparation signature was found in31 failed Linux test logs across the latest3 scheduled main runs; this consumer gap was repaired rather than waived.127b9ac1.8034bb1fhas zero net test lines; the original PR-fork diff is −2. No assertions or cases were removed.9a70d3e65e34c7d0131c66a364082052cc6c721ais published through native preparation. Main had incorporated the same shared-state fixture repair with different comment wording; this head aligns that comment and inlines an identical single-use fixture pathname. Production bytes, selections, assertions and test cases are unchanged. Fresh independent review and native review/preparation passed. Exact-head CI41150502334 attempt1 completed successfully:61 successful jobs and27 skipped, with no failures or cancellations. The successful run at127b9ac1remains historical evidence.CI attribution and setup limits
9d6341bdf8a0: three PR-caused leaves from the absent hydration inventory (closure/provisioning) and introduced checksum count assertion. Those defects are corrected.48f5c66f8b0b: checksum expected one/observed zero, corrected by the bounded invariant. Shutdown has an actual identical scheduled-main signature in job124211913506 with unchanged determining source, so it is inherited. Historical compiled-preparation timeout remains unattributed; a later passing leaf is not claimed as its repair.0a15785f590e: failed shutdown 124239808445, reset 124239808792, and the aggregate gate. Shutdown is inherited. Reset is reproduced and repaired here as PR-caused, with no inherited exception claimed for it. Checksum, closure, native provisioning, the prior preparation-timeout leaf, andsecurity-fastpassed. Failed historical CI remains failed.8445c8a80c89: reset, checksum, closure and provisioning passed. Shutdown 124262535363 has the accepted identical main assertion. Preparation 124262535209 canceled the singleton runtime-config shard before tests; it is repaired here at eager preparation selection, with no inherited exception claimed. The justified repair push superseded that run:55 jobs succeeded,26 skipped,2 failed, and5 were canceled (three PostgreSQL jobs, failure report and aggregate CI gate). Canceled jobs are not passing coverage; no completed failure table was produced.4e5b8f5cfe7f: shutdown 124268764863 repeats the accepted main assertion, with all seven determining source blobs equal to the accepted main-signature head and actual tested merge. Admission fixture 124268764991 failed because its lazy selection still included newly eager runtime-config; corrected as PR-caused here. The justified fixture push superseded that run:57 jobs succeeded,26 skipped,2 failed and7 were canceled (three PostgreSQL jobs, node large11, node small13-1, report and aggregate gate). Canceled jobs are unrun coverage.127b9ac10002: attempt1 completed92 jobs (64 success/26 skips), failing only security-fast124274929692 and its aggregate gate. Trusted-harness Git checkout hit HTTP408/exit128; all security checks were skipped. The table classified it new, and no inherited exception was claimed. One job-scoped infrastructure recovery obtained actual security coverage on the same head; attempt2 completed success (66 success/26 skips), including security-fast124286028998 and CI gate124286679009. Original attempt1 remains failed. All source tests, baseline ratchets and three PostgreSQL shards passed. Current base includes main shutdown-ordering fix#188627; the shutdown test passed, so current landing needs no inherited-CI exception.9a70d3e65e34c7d0131c66a364082052cc6c721a: completed success,88 jobs (61 success/27 skipped), no failures or cancellations. Security-fast124386149086, baseline ratchets124386149352 and CI gate124388192632 passed. The PostgreSQL placeholder was skipped by current CI selection; no PostgreSQL execution is claimed for this run. No inherited-CI or R1 exception is used. Native mergeability observation is clean.41107007551) had other failures and no matching reset signature; it supplies no reset attribution. Earlier container admission expirations and the first host startup failure from missing workspace package links occurred before tests and supply no baseline verdict. After preparing the matching frozen projections, the actual focused host runs above completed.Requested by @steipete; exact co-author credit is retained in every commit.
Work sessions