# feat(import): add local-only entire/imports/v1 ref topology

`4138fbf`→[main](/content/gh/entireio/cli/commits/main/index.html)·

computermode·3w ago·3 files·+27 added/-0 removed

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

## Sessions

3d478cdad9c1View transcript

[?\
Implement Claude History Import FeatureClaude Code·Opus 4.8·3 steps](/content/gh/entireio/cli/session/897809d4-ecab-4dc6-aa21-97661cb62607#timeline-3d478cdad9c1/index.html)

## Changes

3

- cmd/entire/cli

- checkpoint

- Mpersistent_refs.go+12

- Mpersistent_refs_test.go+11

- paths

- Mpaths.go+4

```
25 unmodified lines

26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43

25 unmodified lines

}\n// ImportsRefs returns the local-only topology for imported checkpoints.\n// Primary and Read target entire/imports/v1; Push is empty so imports are\n// never sent to a remote in this pass. A future opt-in adds the ref to Push.\nfunc ImportsRefs() PersistentRefs {\n\timportsBranch := plumbing.NewBranchReferenceName(paths.ImportsBranchName)\n\treturn PersistentRefs{\n\t\tPrimary: importsBranch,\n\t\tRead: importsBranch,\n\t\tPush: nil,\n\t}\n}\n\n// PrimaryFetchableFromOrigin reports whether Primary has an origin-tracking shadow.\nfunc (r PersistentRefs) PrimaryFetchableFromOrigin() bool {\n\treturn r.Primary.IsBranch() && slices.Contains(r.Push, r.Primary)\n```

Mcmd/entire/cli/checkpoint/persistent_refs.go+12

```
5 unmodified lines

6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24

5 unmodified lines

\t"github.com/go-git/go-git/v6/plumbing"\n\t"github.com/stretchr/testify/assert"\n\n\t"github.com/entireio/cli/cmd/entire/cli/paths"\n}\n\nfunc TestImportsRefs_NeverPushed(t *testing.T) {\n\tt.Parallel()\n\trefs := ImportsRefs()\n\twant := plumbing.NewBranchReferenceName(paths.ImportsBranchName)\n\tassert.Equal(t, want, refs.Primary, "Primary should target the imports branch")\n\tassert.Equal(t, want, refs.Read, "Read should target the imports branch")\n\tassert.Empty(t, refs.Push, "imports are local-only and must never be pushed")\n}\n\n// Not parallel: uses t.Chdir() to exercise on-disk settings being ignored.\nfunc TestResolveCommittedRefs(t *testing.T) {\n\tv1 := v1BranchRef()\n```

Mcmd/entire/cli/checkpoint/persistent_refs_test.go+11

```
40 unmodified lines

41
42
43
44
45
46
47
48
49
50

40 unmodified lines

// MetadataBranchName is the orphan branch used by manual-commit strategy to store metadata\nconst MetadataBranchName = "entire/checkpoints/v1"\n\n// ImportsBranchName is the local-only orphan branch holding imported\n// (commit-less, read-only) checkpoints. It is intentionally never pushed.\nconst ImportsBranchName = "entire/imports/v1"\n\n// TrailsBranchName is the orphan branch used to store trail metadata.\n// Trails are branch-centric work tracking abstractions that link to checkpoints by branch name.\nconst TrailsBranchName = "entire/trails/v1"
