Repository navigation
Conversation
Materialize missing checkout and CI-reuse commits with normal fetch negotiation before local-only probes and checkout. Preserve partial-clone filters and private FETCH_HEAD, and reuse existing batched blob hydration.
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review endedClawSweeper stopped reviewing this revision because the pull request closed. |
steipete
marked this pull request as ready for review
November 7, 2026 10:07
Contributor
Codex Review Summary: ✅ CompletedThis 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. |
steipete
deleted the
steipete/perf-micro-pr-worktree-lazy-fetch-full-history-20260919
branch
November 7, 2026 10:18
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Nov 8, 2026
…enclaw#194577) Materialize missing checkout and CI-reuse commits with normal fetch negotiation before local-only probes and checkout. Preserve partial-clone filters and private FETCH_HEAD, and reuse existing batched blob hydration.
This was referenced Nov 8, 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
Fixes: PR preparation downloads the repository's entire reachable commit/tree history when a blobless clone encounters a commit it has not fetched yet.
User Impact
Maintainers preparing PRs in partial clones avoid duplicate history downloads and the associated disk, CPU, and checkout delay. No configuration or migration is required.
Why This Change Was Made
A revision lookup can silently perform Git's promisor lazy fetch, which sends no local-history negotiation. The checkout owner now resolves locally first and acquires a missing commit through its existing filtered canonical fetch owner. Existing batched blob hydration stays in place; final checkout disables lazy fetching. A changed reviewed preparation head hydrates its blobs before checkout.
Hosted-CI reuse had the same presence-probe bug and now explicitly fetches missing commits without changing tags or
FETCH_HEAD. Product worktree readers already suppress lazy fetching. The separate merge-admission filter repair in #193670 is intentionally left to that PR.Production growth is eight lines: the missing negotiated acquisition, a cold-blob prerequisite, and the hosted probe fix. No new helper, cache, dependency, schema, or config. The standalone synthetic benchmark is 203 lines; two real partial-clone regressions add 53 test lines with a matching scoped allocation.
Evidence
Acceptance: advertise haves, remove repeated history transfer (>99% fewer pack bytes), preserve checkout/filter/checkpoints, and improve wall/CPU without >20% peak-RSS growth.
The committed
scripts/perf/pr-worktree-fetch.pyexercises the actual checkout owner against a local syntheticblob:noneclone with 126,357 existing commits and 884,499 trees, followed by one missing PR-like commit. Five counterbalanced A/B pairs plus two A/A pairs used fresh object stores and equal packet tracing.Pack bytes fell 99.999032%; only the new commit, seven trees, and one blob were received. Both arms still fetched the required checkout blob. Every run preserved config/filter,
FETCH_HEAD, andorigin/main. A/A wall pairs were 6775/6493 and 6530/6414 ms with identical byte/object counts. Wall min–p95/max was 6472–8511 ms before and 596–2162 ms after (five samples; shared-host scheduling noise).Reproduce with:
pnpm check:changed --base HEADfound 20 historical changelog-attribution violations, reproduced with identical output on the exact main parent3f2e7078de23a41f21f14f57e76523be5c165f11. The signature was introduced by266a7aa0fe69/ fix(release): align attribution gate with human credit policy #194364: the four affected files pass on that commit’s parent and fail afterward. That parent had different pre-existing human-credit failures, so it was not globally green. This is an actionable main regression for the release/changelog owner, not a waived or passing check. All remaining changed checks passed, including formatting, script/root-test types, script/root-test lint, and all three dead-export scans. The aggregate exits 1 solely on that attributed main regression.Limits: macOS, Git 2.56.0, local file transport, compact synthetic trees, and one tracked checkout file. This models history amplification rather than absolute production bytes, a large workspace, database load, btrfs, concurrent callers, or GitHub latency. CPU includes the local server; peak RSS is not cumulative allocation, which was not measured. The existing Git compatibility policy is unchanged (
GIT_NO_LAZY_FETCHrequires Git 2.45+). No production host was accessed.