Skip to content

improve: make git installs use a blobless clone - #123835

Merged
steipete merged 2 commits into
mainfrom
steipete/installer-git-partial-clone-123823
Aug 14, 2026
Merged

steipete merged 2 commits into
mainfrom
steipete/installer-git-partial-clone-123823

Conversation

@steipete

Copy link
Copy Markdown
Contributor

Closes #123823

What Problem This Solves

Fixes an issue where users choosing the homepage-advertised Git install method downloaded the repository's complete blob history before checking out one release tag. In a clean Ubuntu 24.04 container, the clone took 689.08 seconds and occupied 2.8 GB after checking out v2026.7.1-2, before dependency installation or builds began.

Why This Change Was Made

New Git installs now clone with --filter=blob:none, retaining refs and commit metadata while deferring historical file blobs. This preserves tag switching, --version main, version derivation, and normal fetch/pull updates; unlike --depth 1, it does not make the repository shallow. Git itself warns and continues with a full clone when a server does not support filtering, so the installer does not add a duplicate retry path.

User Impact

Git-method installs use substantially less bandwidth, disk, and wall-clock time while remaining ordinary updatable Git checkouts. In the same clean Ubuntu 24.04 measurement, the blobless clone took 77.87 seconds and occupied 641 MB after checking out the same tag and commit—a 9x faster clone and roughly 77% less disk.

Evidence

  • Clean ubuntu:24.04, Git 2.43.0, direct clone-step comparison using the installer's exact old/new clone flags:
    • Before: git clone ... — 689.08s, 2.8G after checkout; v2026.7.1-2 at 0790d9f593ad.
    • After: git clone --filter=blob:none ... — 77.87s, 641M after checkout; the same tag and commit; remote.origin.promisor=true.
  • Actual installer run, stopped intentionally when a stubbed dependency command failed after checkout:
    • Tag: Using git ref: v2026.7.1-2 → Fetching requested version → Checking out v2026.7.1-2.
    • Subsequent update on the same partial clone: Using git ref: main → Fetching requested version → Checking out main → Updating repository; final branch main, with remote.origin.promisor=true.
  • Unsupported-server contract: Git v2.43.0 documents --filter=blob:none in Documentation/git-clone.txt lines 180–188, and fetch-pack.c lines 1179–1184 warns filtering not recognized by server, ignoring rather than failing. A local non-filter-capable upload-pack probe exited 0 with that warning.
  • node scripts/run-vitest.mjs test/scripts/install-sh.test.ts — 90/90 passed.
  • bash -n scripts/install.sh — passed.
  • shellcheck -e SC1091 scripts/install.sh scripts/install-cli.sh — passed.
  • git diff --check — passed.
  • Autoreview — clean, no accepted/actionable findings.

AI-assisted implementation; the behavior and dependency contract were independently exercised with the commands above.

@clawsweeper

clawsweeper Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@steipete
steipete marked this pull request as ready for review August 14, 2026 21:08
@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: XS maintainer Maintainer-authored PR labels Aug 14, 2026
Keep the file's comment convention (comments on their own lines) instead of a
150-column trailing comment, and record why blob:none is preferred over
--depth 1 plus why no fallback is needed.

Narrow the ordering test's source needle to the stable prefix so it stops
duplicating the behavioral flag assertion and no longer breaks whenever the
clone flags change.
@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 14, 2026
@clawsweeper

clawsweeper Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Codex review: found issues before merge. Reviewed August 14, 2026, 5:24 PM ET / 21:24 UTC.

ClawSweeper review

What this changes

The branch makes install.sh request a blobless Git partial clone and adds a behavioral regression test for that clone invocation.

Merge readiness

⚠️ Needs maintainer review before merge - 4 items remain

Keep open: blobless cloning is a sound improvement, but this patch updates only one of three documented Git-install paths, leaving CLI-prefix and Windows Git installs with the costly full clone. The protected maintainer label also requires explicit maintainer handling.

Priority: P2
Reviewed head: 1e236f45749a8c7a2b80777bf46643b7a9fc0863

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Strong real installer evidence supports the Bash change, but the implementation is incomplete across documented Git installers.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): The PR body provides clean Ubuntu before/after clone measurements and an actual installer tag-to-main update trace with the resulting promisor configuration.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The PR body provides clean Ubuntu before/after clone measurements and an actual installer tag-to-main update trace with the resulting promisor configuration.
Evidence reviewed 5 items Changed installer path: Current main uses an ordinary clone in the interactive Bash installer; the PR changes this call to request --filter=blob:none.
Published sibling installers: The installer documentation presents install.sh, install-cli.sh, and install.ps1 as supported Git-install paths; the latter two retain unfiltered clone calls.
Sibling full-clone calls: The local-prefix installer has two fresh-checkout branches using plain git clone, and the Windows installer has one; all serve the same documented Git-install capability.
Findings 1 actionable finding [P2] Apply blobless cloning to every documented Git installer
Security None None.

How this fits together

OpenClaw ships separate interactive Bash, local-prefix Bash, and PowerShell installers, each of which can create a Git checkout before selecting a ref and building OpenClaw. Their clone behavior determines the bandwidth and disk cost of fresh Git installs.

flowchart LR
A[Install command] --> B[Choose installer]
B --> C[Create Git checkout]
C --> D[Select release or branch]
D --> E[Install dependencies]
E --> F[Build OpenClaw]
C --> G[Later Git update]
Loading

Before merge

  • Apply blobless cloning to every documented Git installer (P2) - This changes only the interactive Bash installer. install-cli.sh still has two plain-clone branches and install.ps1 has another, despite all three being documented Git-install paths; those users still incur the full-history download this PR says new Git installs avoid. Update those sibling paths and add focused coverage for each.
  • Resolve merge risk (P1) - Merging leaves two published Git-install routes performing the full-history clone, so the stated bandwidth and disk improvement is inconsistent across installers.
  • Resolve merge risk (P1) - Both Bash installers currently accept any available Git binary without a client-capability check; validate documented old-client behavior before making filtering the default.
  • Complete next step (P2) - This protected maintainer-label PR has a concrete contributor-side repair, so it should remain with its author and maintainer review rather than enter an automated repair lane.

Findings

  • [P2] Apply blobless cloning to every documented Git installer — scripts/install.sh:2881
Agent review details

Security

None.

PR surface

Tests +33, Other +4. Total +37 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 36 3 +33
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 5 1 +4
Total 2 41 4 +37

Review metrics

Metric Value Why it matters
Production versus test LOC production +5/-1 (net +4); tests +36/-3 (net +33) The production growth is small and justified by the clone rationale, but the meaningful review concern is incomplete coverage of equivalent installer paths.

Stored data model

Persistent data-model change detected: vector/embedding metadata: scripts/install.sh. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #123823
Summary: This PR is a candidate fix for the linked report about full-history Git installs; the remaining issue is that its implementation does not yet cover all documented installer owners.

Members:

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

Merge-risk options

Maintainer options:

  1. Complete the published installer surface (recommended)
    Apply the clone filter and focused argument coverage to both local-prefix Bash branches and the PowerShell Git installer, then verify old-client behavior before merge.

Technical review

Best possible solution:

Use the same blobless-clone policy across all three supported Git installers, with focused tests for both install-cli.sh fresh-checkout branches and the PowerShell path plus explicit old-Git behavior coverage.

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

Yes—current main directly invokes unfiltered clones in each documented Git-install path, and the PR supplies a clean-container before/after run for the interactive Bash path; this review did not rerun the networked clone.

Is this the best way to solve the issue?

No—the chosen Git option is appropriate, but applying it only to install.sh is too narrow because the documented local-prefix and Windows installers implement the same fresh Git-install behavior.

Full review comments:

  • [P2] Apply blobless cloning to every documented Git installer — scripts/install.sh:2881
    This changes only the interactive Bash installer. install-cli.sh still has two plain-clone branches and install.ps1 has another, despite all three being documented Git-install paths; those users still incur the full-history download this PR says new Git installs avoid. Update those sibling paths and add focused coverage for each.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.99

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 204416747e8d.

Labels

Label changes:

  • add P2: This is a normal-priority installer improvement with a concrete incomplete-path defect, not an availability or data-loss incident.
  • add merge-risk: 🚨 compatibility: The default clone command now requires a Git partial-clone capability while the installers only establish that a Git executable exists.
  • add proof: sufficient: Contributor real behavior proof is sufficient. The PR body provides clean Ubuntu before/after clone measurements and an actual installer tag-to-main update trace with the resulting promisor configuration.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦞 diamond lobster and patch quality is 🦐 gold shrimp.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Sufficient (live_output): The PR body provides clean Ubuntu before/after clone measurements and an actual installer tag-to-main update trace with the resulting promisor configuration.

Label justifications:

  • P2: This is a normal-priority installer improvement with a concrete incomplete-path defect, not an availability or data-loss incident.
  • merge-risk: 🚨 compatibility: The default clone command now requires a Git partial-clone capability while the installers only establish that a Git executable exists.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦞 diamond lobster and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Sufficient (live_output): The PR body provides clean Ubuntu before/after clone measurements and an actual installer tag-to-main update trace with the resulting promisor configuration.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body provides clean Ubuntu before/after clone measurements and an actual installer tag-to-main update trace with the resulting promisor configuration.

Evidence

What I checked:

  • Changed installer path: Current main uses an ordinary clone in the interactive Bash installer; the PR changes this call to request --filter=blob:none. (scripts/install.sh:2877, 204416747e8d)
  • Published sibling installers: The installer documentation presents install.sh, install-cli.sh, and install.ps1 as supported Git-install paths; the latter two retain unfiltered clone calls. Public docs: docs/install/installer.md. (docs/install/installer.md:14, 204416747e8d)
  • Sibling full-clone calls: The local-prefix installer has two fresh-checkout branches using plain git clone, and the Windows installer has one; all serve the same documented Git-install capability. (scripts/install-cli.sh:1382, 204416747e8d)
  • Git partial-clone contract: The locally installed Git documentation defines --filter as partial clone and states that blob:none omits file blobs until needed.
  • Recent installer ownership: Recent current-main installer work and the local-prefix installer introduction were authored by Peter Steinberger, tying the relevant sibling paths to the same recent area history. (scripts/install-cli.sh:1348, 727a4a621a2e)

Likely related people:

  • steipete: Peter Steinberger authored the recent interactive-installer work and the commit that introduced the local-prefix installer path. (role: recent installer contributor; confidence: high; commits: af3118b1877c, 727a4a621a2e; files: scripts/install.sh, scripts/install-cli.sh, scripts/install.ps1)

Rank-up moves

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

  • Apply the filter to both install-cli.sh clone branches and install.ps1.
  • Add focused command-argument coverage for the sibling fresh-install paths and state the supported older-Git behavior.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete
steipete merged commit d27e318 into main Aug 14, 2026
176 checks passed
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

@steipete
steipete deleted the steipete/installer-git-partial-clone-123823 branch August 14, 2026 21:38
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 15, 2026
* perf: use blobless clone in git installer

* refactor(install): move clone-filter rationale above the call

Keep the file's comment convention (comments on their own lines) instead of a
150-column trailing comment, and record why blob:none is preferred over
--depth 1 plus why no fallback is needed.

Narrow the ordering test's source needle to the stable prefix so it stops
duplicating the behavioral flag assertion and no longer breaks whenever the
clone flags change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. scripts Repository scripts size: XS status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: install.sh --install-method git full-clones ~4.9 GB to check out a pinned release tag

1 participant