Skip to content

Use partial fetch (blob:none) for checkpoints metadata#712

Merged
pjbgf merged 3 commits intomainfrom
pjbgf/partial-fetch-sync
Apr 9, 2026
Merged

Use partial fetch (blob:none) for checkpoints metadata#712
pjbgf merged 3 commits intomainfrom
pjbgf/partial-fetch-sync

Conversation

@pjbgf
Copy link
Copy Markdown
Member

@pjbgf pjbgf commented Mar 17, 2026

Skip downloading blobs when fetching the remote metadata branch during push recovery. Consolidate that practice across the different use cases of git fetch for checkpoints.

Blobs are already local or fetched on demand by git during entire resume.

Depends on #680.


Note

Medium Risk
Changes the git fetch behavior used in push-recovery sync, which could behave differently on older git/server setups or if partial clone filters are unsupported. Otherwise the change is localized to metadata-session syncing and should reduce network/IO by avoiding blob downloads.

Overview
During push recovery, the metadata-branch sync now performs a partial fetch by adding --filter=blob:none to the git fetch invocation in fetchAndMergeSessionsCommon.

This aims to speed up/trim network usage by fetching only commits/trees needed for the tree-merge step, skipping blob objects.

Reviewed by Cursor Bugbot for commit 226de0e. Configure here.

Copilot AI review requested due to automatic review settings March 17, 2026 17:00
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR optimizes the push recovery sync flow for Entire’s metadata/session branches by switching the recovery git fetch to a partial fetch that avoids downloading blobs, since the merge logic only needs commit/tree structure.

Changes:

  • Use git fetch --filter=blob:none when fetching the remote metadata branch during non-fast-forward push recovery.
  • Expand inline comments to explain why blobs are not required for the merge.

@pjbgf pjbgf added the performance Performance issues label Mar 18, 2026
@pjbgf pjbgf force-pushed the pjbgf/partial-fetch-sync branch from d6ab7ca to 226de0e Compare April 9, 2026 08:33
@pjbgf pjbgf marked this pull request as ready for review April 9, 2026 08:41
@pjbgf pjbgf requested a review from a team as a code owner April 9, 2026 08:41
@pjbgf pjbgf changed the title Use partial fetch (blob:none) for metadata session sync Use partial fetch (blob:none) for checkpoints metadata Apr 9, 2026
@pjbgf pjbgf force-pushed the pjbgf/partial-fetch-sync branch from 842f8aa to 1f48a50 Compare April 9, 2026 14:25
@pjbgf pjbgf enabled auto-merge April 9, 2026 20:06
pjbgf and others added 3 commits April 9, 2026 21:07
Skip downloading blobs when fetching the remote metadata branch during
push recovery. The merge only needs the tree structure to combine
entries — blobs are already local or fetched on demand by git.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: 56094f38982e
Signed-off-by: Paulo Gomes <paulo@entire.io>
Entire-Checkpoint: d8c9d9506694
Signed-off-by: Paulo Gomes <paulo@entire.io>
@pjbgf pjbgf force-pushed the pjbgf/partial-fetch-sync branch from 1f48a50 to 73bea7b Compare April 9, 2026 20:07
@pjbgf pjbgf merged commit 0c1e173 into main Apr 9, 2026
9 checks passed
@pjbgf pjbgf deleted the pjbgf/partial-fetch-sync branch April 9, 2026 20:11
Soph added a commit that referenced this pull request Apr 13, 2026
git fetch --filter=blob:none <remote-name> persists
remote.<name>.promisor=true and remote.<name>.partialclonefilter=blob:none
into .git/config. Since #712, the four fetch helpers in git_operations.go
passed "origin" as a named remote, which turned users' origin into a
promisor remote repo-wide — affecting future `git fetch origin` / `git pull`
and not just checkpoint reads.

Resolve origin's URL first and pass the URL as both CheckpointGitCommand
target and the remote argument. Anonymous URL fetches do not touch
remote.*.promisor / remote.*.partialclonefilter in local config.

Adds a regression test that fails against the pre-fix code and passes
after. Does not yet unstick the config on users who already ran the
affected CLI — that cleanup is a follow-up.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: 4e0f55d5b407
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

performance Performance issues

Development

Successfully merging this pull request may close these issues.

3 participants