feat: fall back to origin/entire/sessions when local branch missing#139
Merged
feat: fall back to origin/entire/sessions when local branch missing#139
Conversation
Add TestListCommitted_FallsBackToRemote which verifies that ListCommitted can find checkpoints when only origin/entire/sessions exists (simulating post-clone state). This test currently fails because getSessionsBranchTree only checks for the local branch refs/heads/entire/sessions and doesn't fall back to the remote-tracking branch refs/remotes/origin/entire/sessions. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Entire-Checkpoint: a7f087274d3b
After a fresh clone, entire/sessions only exists as a remote-tracking branch (origin/entire/sessions). This change makes getSessionsBranchTree() check the remote-tracking branch when the local branch doesn't exist, allowing 'entire explain' to show checkpoints without manual fetch. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Entire-Checkpoint: af83563936ee
gtrrz-victor
approved these changes
Feb 4, 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.
Summary
git clone,entire/sessionsonly exists as a remote-tracking branch (origin/entire/sessions), not as a local branchentire explainwas showing no checkpoints becausegetSessionsBranchTree()only checked the local branchorigin/entire/sessionswhen the local branch doesn't existTest Plan
TestListCommitted_FallsBackToRemotetest that simulates post-clone state🤖 Generated with Claude Code
Note
Low Risk
Low risk: small, targeted change to checkpoint listing/reading that only affects repos where
entire/sessionsisn’t checked out locally; covered by a new integration-style test simulating post-clone state.Overview
Fixes post-clone checkpoint discovery by updating
getSessionsBranchTree()to fall back from the localentire/sessionsbranch to the remote-trackingorigin/entire/sessionsref when the local branch doesn’t exist.Adds
TestListCommitted_FallsBackToRemote, which creates a remote repo with a committed checkpoint, clones it without creating the local sessions branch, fetchesorigin/entire/sessions, and assertsListCommitted()still returns the checkpoint.Written by Cursor Bugbot for commit e01f873. This will update automatically on new commits. Configure here.