Repository navigation
fix(update): stable and beta Git installs download every remote branch on each update check - #176153
masatohoshino wants to merge 1 commit into
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 real behavior proof before merge. What this changesSkip branch fetching during stable and beta Git update inspection while retaining release-tag fetching. Example: A stable Git install checks for v2026.10.18 after its release remote gains an unrelated 30 MB branch.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 1 item remains Current main still downloads unused release branches, and this PR provides a focused fix with no introduced correctness defect found. Priority: P2 Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherGit update status and execution share a target resolver that fetches into a temporary inspection repository and supplies release candidates to the existing admission and activation owners. flowchart TD
A[Update status or execution] --> B[Private Git inspection]
B --> C[Shared fetch resolver]
C --> D[Release tags]
C --> E[Dev source refs]
D --> F[Release selection]
F --> G[Status or candidate admission]
Technical reviewBest possible solution: Remove the unused release-channel branch fetch in the existing resolver while preserving tag authority, release selection, and dev-source behavior. Do we have a high-confidence way to reproduce the issue? Current-main source establishes the unnecessary branch fetch and temporary-repository cleanup, corroborated by the contributor's repeated built-CLI transfer traces; no target code was executed during this review. Is this the best way to solve the issue? The patch repairs the shared owner directly, removes redundant work, and adds a distinct real-Git regression without introducing another path or configuration surface. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 5cb47d16571b. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource -1, Tests +26, Docs +2. Total +27 across 4 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 Reviewed October 18, 2026, 4:53 AM ET / 08:53 UTC. |
|
Thank you @masatohoshino. This was an excellent report and fix. The byte-counting proxy repro made the root cause unambiguous. We landed the same fix as #176155 (41f1624), re-implemented independently per our maintainer workflow, with you credited as co-author in the commit. Stable and beta Git installs now fetch only release tags, and Dev keeps the selected-source scoping from #172199. In an isolated repro, Closing this one as superseded. Thanks again! |
|
Stop fucking me
…On Sun, Oct 18, 2026, 3:22 AM Peter Steinberger ***@***.***> wrote:
Closed #176153 <#176153>.
—
Reply to this email directly, view it on GitHub
<#176153?email_source=notifications&email_token=CDDS6YYE5UMUJMOOUVMB3GT5USDVBA5CNFSNUABQM5UWIORPF5TWS5BNNB2WEL2JONZXKZKFOZSW45CON52GSZTJMNQXI2LPNYXTGMZVGY2DCOJQHAZDLJTSMVQXG33OVJZXKYTTMNZGSYTFMSSWK5TFNZ2KYZTPN52GK4S7MNWGSY3L#event-33564190825>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/CDDS6Y5NLGRXSGFWM5BR6XD5USDVBAVCNFSNUABGKJSXA33TNF2G64TZHMYTCMBTGAYTEOJTGU5US43TOVSTWNJZGA3TOMZSHAYTJILWAI>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Closes #176152
What Problem This Solves
Fixes: on a Git install that follows the stable or beta channel, every
openclaw update status --jsonandopenclaw updatedownloads all branches of the release remote into the private inspection repository, then throws them away.User Impact
User impact: update checks and updates on stable and beta Git installs transfer only the release tags they use. In the reproduction below, each
openclaw update status --jsondrops from about 30 MB to about 2 KB of fetched data. The selected release and the command output stay the same.Why This Change Was Made
Release channels choose their target from tags only, but
fetchGitUpdateTargetalso ran a refspec-lessgit fetch <release remote> --prune --no-tagsfirst, so Git fetched the configured+refs/heads/*. The inspection repository is removed after each run, so that branch data was downloaded again every time and never read. Release channels now skip that branch fetch. The dev channel is unchanged.#172199 narrowed the same fetch for the dev channel and said that release-tag inventory and detached-target discovery keep their existing contracts. This change keeps both:
+refs/tags/*:refs/tags/*fetch, with the same release-remote selection, the same refusal when no release remote can be determined, and operator-only tags still kept.Update behavior: the fetch runs in the installed updater, so this takes effect once an updater with the fix is running, and no candidate depends on branch refs. An older updater keeps its branch fetch until it has updated itself once, which costs only that extra download. Stable and beta updates no longer fail with
fetch-failedbecause the branch fetch failed.update-runner-git.tags.test.tsexpected the branch fetch, so it now expects only the tag fetch. Its protected-branch case used to expect a non-fast-forward rejection. Since #154160, every Git update fetches into the private inspection repository, so that rejection happened there. On release channels, nothing from that repository's branch refs is imported into the installed checkout; only the dev upstream ref is. The case still checks that the installedprotectedbranch is left untouched.Evidence
Tested at
632f3245d40(baseupstream/main847f7fade0d); the After build is from75a295a5a4d, which differs from it only in docs.The real built CLI (
pnpm build:runtime) on Linux, Node 24.18, Git 2.45.2, run against a synthetic stable-channel Git install. The release remote is a local bare repository served bygit daemonbehind a TCP proxy that logs bytes per connection (one connection per Git fetch). The install is detached atv2026.10.17. After install, the remote gains one unrelated 30 MB branch, 40 small branches and a release tagv2026.10.18. Each run uses an isolatedHOMEand state directory, an allowlisted environment, and a network namespace with only loopback.Before (fetch code from base
847f7fade0d),openclaw update status --jsontwice in a row:After (this PR), same install, remote and commands:
Observed result: the 30 MB branch fetch is gone on both runs; only the tag fetch and the
ls-remotecheck remain. The JSON output is identical to Before, andpreferredTargetis still{ channel: "stable", tag: "v2026.10.18" }.Regression test:
fetches only release tags before stable candidate admission(next to the tests from #172199) runs a stable update and checks that an unrelated branch's blob is absent from the inspection repository. It fails on the base and passes here, as do the updated tag-fetch expectations. The other 55 tests in the two files pass on both.Checks: the touched tests (
pnpm test <file> --maxWorkers=1, wall time per file in the table below), the lint and typecheck steps ofpnpm check:changed(its other reds are in files this PR does not touch), andoxfmt --checkon the changed files. The broad suites run in this PR's CI.--maxWorkers=1wallsrc/infra/update-runner-git.test.tssrc/infra/update-runner-git.tags.test.tsSimplify pass: the release-channel branch fetch, and the remote authority that existed only to run it, are gone. The tag fetch, its release-remote selection and refusal, and all dev-channel fetch paths are unchanged. Production code: 4 lines added (one is a comment), 5 removed. Tests: one regression test added, and the two release-channel expectations that required the branch fetch updated.
Not covered:
openclaw updateitself did not run in this harness, because the install borrows its build output through symlinks andupdaterefuses a symlinkeddistbefore it fetches. The update path runs through the samefetchGitUpdateTargetand is covered by the regression test. The first update from an older installed updater was not run; that updater still does its own branch fetch once. The 30 MB branch is synthetic. For scale, a blobless fetch of the branches the public repository advertises, from a checkout whose remote-tracking refs were a few days old, transferred 24.88 MiB (50,856 objects) and took 14 s.