Repository navigation
fix(update): support shallow partial source checkouts - #154191
Conversation
|
🦞👀 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. Reviewed September 20, 2026, 8:18 PM ET / September 21, 2026, 00:18 UTC. ClawSweeper reviewWhat this changesThe source updater now prepares a private Git inspection repository directly, allowing shallow partial checkouts to validate updates without changing the installed checkout. Merge readiness✅ Ready for maintainer review The fix remains useful: current main still uses the clone operation implicated in the failure. No actionable correctness or security defect was found in the introduced patch, and the maintainer-protected PR should remain open. Priority: P2 Review scores
Verification
How this fits togetherThe source updater resolves and builds a candidate while the installed Gateway continues serving. Git inspection supplies the candidate to admission checks before installation and activation. flowchart LR
A[Installed source checkout] --> B[Private Git inspection repository]
C[Configured remotes] --> B
B --> D[Candidate build and validation]
D --> E{Admission checks}
E -->|Accepted| F[Install and activate candidate]
E -->|Refused| G[Keep installed Gateway]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +38, Tests +44, Docs +3. Total +85 across 4 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep inspection isolated from the installed checkout while preserving its Git identity, configured transports, and existing admission and activation lifecycle. Do we have a high-confidence way to reproduce the issue? Yes: the real-Git fixture supplies a concrete shallow partial checkout with missing historical objects, and current main retains the failing clone path. This review inspected that path and coverage without executing a reproduction. Is this the best way to solve the issue? Yes: replacing the clone operation inside the existing inspection owner addresses the reported mechanism without adding a competing updater or changing installation policy. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 68def4154c7c. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
What Problem This Solves
Fixes
openclaw updatefailing withGit target inspection clone failed (exit 128)when a shallow partial source checkout has historical objects that have not been downloaded.User Impact
Source updates can inspect and validate the candidate without hydrating or otherwise changing the installed checkout before admission. The existing Gateway keeps serving during validation.
This fix belongs to the installed updater. An older updater cannot obtain it from the candidate on its first update; that checkout needs its missing objects fetched before retrying.
Why This Change Was Made
Git ignores local object sharing when cloning a shallow repository and switches to its transfer protocol, whose upload-pack process refuses to fetch missing promised objects. The updater now initializes its private bare inspection repository from the installed refs, HEAD, shallow boundary, and shared object directory. Its existing configured remotes fetch candidate objects into that private repository, and normal admission still owns installation.
Evidence
pnpm test src/infra/update-runner-git-admission.test.ts --maxWorkers=1passed all 33 tests in 95.21 seconds wall (85.19 seconds Vitest).check:changedpassed. Core types, infra test types, and targeted lint were also refreshed after the review correction. Formatting andgit diff --checkpassed.