Repository navigation
fix(update): avoid downloading unrelated Git branches - #172199
Merged
Merged
Conversation
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. |
steipete
marked this pull request as ready for review
October 14, 2026 14:16
Contributor
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Contributor
Author
|
Merged via squash.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Oct 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Problem This Solves
Dev-channel source updates could download unrelated branches while inspecting the selected upstream, exhausting disk before candidate admission.
User Impact
Updates fetch the selected upstream without downloading unrelated branch objects. Git configuration and existing shallow boundaries are preserved. Excluded or invalid sources report a fetch failure before stopping the running Gateway, instead of appearing current from stale tracking data.
Why This Change Was Made
The updater already resolved the source remote and merge ref but discarded the merge ref when fetching. Pass it through the existing private inspection owner, retain configured negative refspecs and Git's destination/force mappings, and require a fetched commit before publishing freshness. The argument separator keeps configured refs from being interpreted as fetch options. Release-tag inventory and detached-target discovery retain their existing contracts; build, Doctor and activation ownership are unchanged.
Evidence
A real Git remote reproduced the excess download: 8,393,189 object bytes including an unrelated branch versus 1,749 bytes for the same selected upstream. Production-path regressions failed before the repair for full and shallow checkouts, excluded cached main, and an option-shaped source that accidentally fetched every branch.
The touched native Git execution suite passed 47 cases; the release-tag suite passed nine. Final focused replay passed 13 cases, including full/shallow source selection, excluded main, invalid literal source, and custom HEAD, empty, abbreviated and wildcard tracking mappings. Core and test typechecks, scoped lint, formatting, diff checks and fresh P2 review passed. Broad exact-head proof is delegated to PR CI.
Local Vitest durations were 326 seconds for the existing 47-case execution file, 55 seconds for release tags, and 81 seconds for final focused replay on a busy host. These cases exercise real Git inspection, candidate admission and runtime preservation; no arbitrary waits or production test seams were added. CI duration is pending.
Production delta is +14 lines in the existing fetch owner; tests +91 and docs +2. The growth expresses the selected-source, exclusion and freshness contract without adding a separate updater, configuration or storage surface.