Skip to content

fix(update): fetch only release tags for stable and beta git targets - #176155

Merged
steipete merged 1 commit into
mainfrom
upd/upd-l1685
Oct 18, 2026
Merged

steipete merged 1 commit into
mainfrom
upd/upd-l1685

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

On Git (source) installs following the stable or beta channel, every openclaw update status --json and openclaw update ran an unscoped git fetch <remote> --prune --no-tags. Git then fetched every remote branch into the private inspection repository, and the next run fetched them all again. Release selection reads only tags, so that data was never used. Reported in #176152 by @masatohoshino, with a byte-counting proxy repro.

Why This Change Was Made

In fetchGitUpdateTarget, release channels now skip the branch fetch. The existing +refs/tags/*:refs/tags/* fetch from the release remote still runs and drives selection. Dev keeps the selected-source scoping from #172199. Downstream consumers of refreshedRemotes (explicit dev targets, dev upstream candidates) apply only to Dev, so release channels did not depend on the dropped branch refs.

User Impact

Stable and beta Git installs no longer download the release remote's whole branch set on each update check.

Evidence

  • Isolated local bare remote with large unrelated branches. Stable and beta update status --json, run twice each: 8,393,582 → 1,208 bytes, with identical preferredTarget tags and SHAs. Dry-run: 347 → 347 bytes, one ls-remote, no object fetch.
  • 128 tests across six files pass. Typecheck, lint, format and cycle checks pass. Autoreview is clean.
  • Production +1 / tests −5 / docs +2 (net −2).

Supersedes #176153 (same root cause, independently re-implemented). Thanks @masatohoshino for the report and PR; credited as co-author.

Stable and beta Git installs ran an unscoped `git fetch <remote> --prune
--no-tags`, which pulled every remote branch on each `update status` and
`update` even though release selection reads only tags. Release channels
now skip the branch fetch; the tag fetch from the release remote is
unchanged, and Dev keeps its selected-source scoping.

Fixes #176152

Co-authored-by: Masato Hoshino <[email protected]>
@clawsweeper

clawsweeper Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@steipete
steipete marked this pull request as ready for review October 18, 2026 08:51
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-18T08:53:49.032702Z 1614cbd Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation size: XS labels Oct 18, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 18, 2026
@clawsweeper

clawsweeper Bot commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Skip branch fetching during stable and beta Git update inspection while preserving release-tag fetching.

Example: A stable source installation runs update status twice against a remote containing large unrelated branches.

  • Before: The PR reports 8,393,582 transferred bytes per check.
  • After: The PR reports 1,208 bytes with identical preferred release tags and SHAs.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A useful, minimal patch with credible CLI status evidence, limited by the missing required upgrade scenario.
Proof confidence 🦐 gold shrimp (3/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Stable and beta source installations repeatedly download remote branches that release selection never uses.
Reason: The maintainer-authored direction removes measurable unnecessary work while preserving existing release choices and configured state.

Merge readiness

✅ Ready for maintainer review

This PR provides a focused, source-correct fix for unnecessary release-channel downloads that current main still performs; no introduced correctness or security defect was found.

Priority: P2
Reviewed head: 1614cbddd4f47d0ec70ce20e111e2932d2b506fe

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: The repository-required published-updater-to-candidate upgrade run is unshown, and the changed tests' base-fail/head-pass result is not separately reported.
Agent review details

How this fits together

Update status and execution share a Git target owner that fetches into a temporary inspection repository and supplies release candidates to existing selection and admission code.

flowchart TD
  A[Update status or execution] --> B[Private Git inspection]
  B --> C[Shared fetch owner]
  C --> D[Stable and beta release tags]
  C --> E[Dev source refs]
  D --> F[Release selection]
  F --> G[Status or candidate admission]
Loading

Technical review

Best possible solution:

Remove the redundant release-channel branch fetch in the existing owner while preserving tag authority, release selection, and Dev behavior.

Do we have a high-confidence way to reproduce the issue?

Current-main source establishes the unused branch fetch, tag-only selection, and temporary-repository cleanup, corroborated by the reporter's repeated CLI transfer traces; no target code was executed during this review.

Is this the best way to solve the issue?

This is the smallest complete repair: release inspection needs fresh tags rather than branch refs, and every changed hunk supports removing that unused transfer without adding machinery.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 5cb47d16571b.

Provenance checked

  • Release-channel branch fetching changes intended behavior with a stated reason (25580fb: This commit narrowed inherited all-remotes fetching to the selected authority; it did not originate branch fetching.)
  • Dev selected-source fetching keeps the original intent (24567af: Avoid downloading unrelated branches while preserving source exclusions, mappings, and freshness checks.)
  • Release-tag test expectations changes intended behavior with a stated reason (5c46872: Consolidate existing real-Git coverage; this PR changes the obsolete branch-refresh expectation while retaining installed-ref and tag-preservation assertions.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 24567af adds src/infra/update-runner-git-target.ts:543 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 24567afc232d; files: src/infra/update-runner-git-target.ts)
  • Shakker: Raw commit e8b43f8 adds src/infra/update-runner-git-target.ts:557 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: e8b43f875bb2; files: src/infra/update-runner-git-target.ts)
  • RoboClaw: Raw commit 5436b46 adds src/infra/update-runner-git-target.ts:509 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 5436b46ed08d; files: src/infra/update-runner-git-target.ts)

PR surface

Source +1, Tests -5, Docs +2. Total -2 across 3 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 12 11 +1
Tests 1 5 10 -5
Docs 1 2 0 +2
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 19 21 -2

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #176152
Summary: The issue and both implementations identify the same refspec-less release-channel branch fetch in the shared Git target owner.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Labels

Label changes:

  • add P2: Repeated unnecessary transfers waste bandwidth and slow stable/beta source updates without establishing an unusable core workflow.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: Repeated unnecessary transfers waste bandwidth and slow stable/beta source updates without establishing an unusable core workflow.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Supply the published-updater-to-candidate upgrade result required by the update contract.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 18, 2026, 5:06 AM ET / 09:06 UTC.

@steipete
steipete merged commit 41f1624 into main Oct 18, 2026
207 of 209 checks passed
@steipete
steipete deleted the upd/upd-l1685 branch October 18, 2026 09:15
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 19, 2026
…penclaw#176155)

Stable and beta Git installs ran an unscoped git fetch of the release remote, which downloaded every remote branch on each openclaw update status and openclaw update although release selection reads only tags. Release channels now skip the branch fetch; the release tag fetch is unchanged and Dev keeps its selected-source scoping. Thanks @masatohoshino for the report and fix.

Fixes openclaw#176152

Co-authored-by: Masato Hoshino <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant