# Move internalbridge under internal/ so it is truly unimportable

`994971a`→[main](/content/gh/entireio/git-sync/commits/main/index.html)·  
  
Soph·1mo ago·6 files·+3 added/-3 removed

internalbridge lived at the module root, so despite its name it was a public,
importable package: external callers could construct an internalbridge.Config
via SyncConfig/ProbeConfig and call Run/Probe directly, skipping the stable
API's Validate() entirely. The stable types are aliases into it
(type RefKind = internalbridge.RefKind ...), which also froze it into the v1
surface.

Move it to internal/internalbridge. The Go internal-package rule now bars any
out-of-module importer (compiler-enforced), closing the Validate() bypass,
while the root-package type aliases keep resolving for external users (an alias
to an internal type stays usable through the alias). Package name is unchanged,
so only the three in-module import paths move; no call sites change.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

## Changes

6

- Mclient.go+1/-1

- internal/internalbridge

- Rconfig.go

- Rmodel.go

- Rmodel_test.go

- Mtypes.go+1/-1

- unstable

- Mclient.go+1/-1

```
6 unmodified lines

7
8
9
10
10
11
12
13

6 unmodified lines

"net/http"

"entire.io/entire/git-sync/internal/validation"
	"entire.io/entire/git-sync/internalbridge"
	"entire.io/entire/git-sync/internal/internalbridge"
// Options configures a Client. It is intentionally small in the first public cut.
```

Mclient.go+1/-1

```
1

No patch available.
```

Rinternal/internalbridge/config.go

```
1

No patch available.
```

Rinternal/internalbridge/model.go

```
1

No patch available.
```

Rinternal/internalbridge/model_test.go

```
3 unmodified lines
4
5
6
7
7
8
9
10

3 unmodified lines

"context"
	"errors"

"entire.io/entire/git-sync/internalbridge"
	"entire.io/entire/git-sync/internal/internalbridge"
// ProtocolMode controls source-side protocol negotiation.
```

Mtypes.go+1/-1

```
9 unmodified lines

10
11
12
13
13
14
15
16

9 unmodified lines

"entire.io/entire/git-sync"
	"entire.io/entire/git-sync/internal/syncer"
	"entire.io/entire/git-sync/internal/validation"
	"entire.io/entire/git-sync/internalbridge"
	"entire.io/entire/git-sync/internal/internalbridge"

const DefaultMaterializedMaxObjects = syncer.DefaultMaterializedMaxObjects
```

Munstable/client.go+1/-1
