Repository navigation
refactor(discovery): Phase 2 — promote internal/discovery to pkg/discovery - #141
Merged
Merged
Conversation
internal/discovery (mDNS browse/advertise: Manager, Config, ServerInfo, ClientInfo, NewManager) is the maintained discovery implementation, used by both the server (advertise + browse-for-clients) and the player CLI (browse-for-servers). For the repo split the CLI repos must reach it across a module boundary, where Go forbids importing another module's internal/. Move it verbatim to pkg/discovery (the name Phase 0 freed by deleting the orphaned stale fork) and repoint the four importers (main.go, server.go, client_dialer.go + test). No behavior change; pkg/sendspin no longer imports internal/discovery. Phase 2 of the three-repo split.
…CLAUDE.md Address public-API hygiene from the PR review now that discovery is a public package: add a godoc package comment to pkg/discovery, and remove the internal/discovery bullet from CLAUDE.md's internal layout (the package was promoted to pkg/discovery in this PR).
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.
Phase 2 of the three-repo split (1 of 3 promotions). See
docs/superpowers/plans/2026-06-11-three-repo-split.md.Phase 2 promotes the cross-boundary
internal/packages to publicpkg/packages, because Go forbids importing another module'sinternal/— so the futuresendspin-player/sendspin-serverrepos must reach this code through the SDK's public API. This PR does the first and most self-contained one: discovery.Change
internal/discovery(mDNS browse/advertise —Manager,Config,ServerInfo,ClientInfo,NewManager,Advertise,BrowseClients, …) is the maintained discovery implementation, used by both sides: the server advertises + browses for clients, and the player CLI browses for servers.git mv, history preserved) topkg/discovery— the name freed in Phase 0 when the orphaned/broken stale fork was deleted.main.go,pkg/sendspin/server.go,pkg/sendspin/client_dialer.go(+ its test). gofmt re-sorted the import blocks (pkg/sorts afterinternal/).pkg/sendspinno longer importsinternal/discovery(verified viago list -deps).Verification
go build ./..., fullgo test -race ./...(10 packages) — green. gofmt clean; no new lint findings.Remaining Phase 2 (separate PRs)
pkg/audio/encode(CGO/opus build-tag care).pkg/audio/source(needs reconcilinginternal/server's ownAudioSourceinterface +Default*constants).Only after all three does
pkg/sendspinreach zero cross-boundaryinternal/imports (the Phase 2 gate). Kept separate for reviewability and to isolate the CGO risk.