pin seam test reads to the git-refs primary · Entire
pin seam test reads to the git-refs primary
dca2300→main·
pfleidi·2w ago·1 file·+9 added/-0 removed
Removing the checkpoint_version assert left the seam test unable to tell whether reads came from the git-refs primary or the git-branch mirror — both stores now return identical content. Probe it directly instead: delete the mirror's v1 branch and assert the composed store still serves full reads, which only the primary can.
Sessions
afcc38e41a31View transcript
[?
Refactor Checkpoint Policy Write-Guard SemanticsClaude Code·1 step](/content/gh/entireio/cli/session/3226bd70-0500-4e6d-a29a-8384e972f47d#timeline-afcc38e41a31/index.html)
Changes
1
cmd/entire/cli/checkpoint
Mrefs_store_seam_test.go+9
6 unmodified lines
7
8
9
10
11
12
13
14
15
16
17
18
57 unmodified lines
76
77
78
79
80
81
82
83
84
85
86
87
88
6 unmodified lines
"testing"
git "github.com/go-git/go-git/v6"
"github.com/go-git/go-git/v6/plumbing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/entireio/cli/cmd/entire/cli/checkpoint/id"
"github.com/entireio/cli/cmd/entire/cli/paths"
"github.com/entireio/cli/cmd/entire/cli/testutil"
"github.com/entireio/cli/redact"
)
57 unmodified lines
mirror := NewGitStore(repo, DefaultV1Refs())
assertSeamVariants(t, mirror, cid)
})
// Reads must be served by the git-refs primary, not the mirror: after the
// mirror's v1 branch is deleted, the composed store still reads everything.
t.Run("reads resolve from primary", func(t *testing.T) {
require.NoError(t, repo.Storer.RemoveReference(plumbing.NewBranchReferenceName(paths.MetadataBranchName)))
assertSeamVariants(t, stores.Persistent, cid)
})
}
func assertSeamVariants(t *testing.T, store PersistentStore, cid id.CheckpointID) {
Mcmd/entire/cli/checkpoint/refs_store_seam_test.go+9