Address 25 issues reported by golangci-lint following the structural
refactor:
- cyclop: split common.Reassembler.Push into upsert/storeChunk/deliver
helpers (12→5). Move seichannel option-default fill into Options.
withDefaults so New stays under the limit.
- exhaustive: enumerate ResultPartial / ResultIgnore explicitly in
seichannel and videochannel switches over common.Result.
- gosec G115: annotate the test-fixture int→uint16/uint32 conversions
in common_test.go with //nolint:gosec.
- lll: break up the 130+ character one-liners in transport
unit/integration tests and the videochannel track-ID construction.
- nolintlint: drop the stale //nolint:cyclop in mobile_test.go where
the underlying complexity already cleared the limit.
- wrapcheck: wrap errors returned from internal/framing and
internal/runtime in their public callers (handshake, control,
server.setupCipher, client.setupCipher) so they carry the layer name.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
internal/link and internal/link/direct were a single-implementation
abstraction layer where directLink mechanically proxied every method to
transport.Transport — only Features() lived above transport.Transport,
and even that was a Features() alias. Six layers of plumbing for zero
behavioural value.
Drop the layer entirely:
- muxconn.Conn now takes a transport.Transport directly.
- server.Server and client.Client store transport.Transport, call
transport.New, and expose Features() through transport.Transport's
built-in method.
- server.Config and client.Config lose their Link string field.
- session.Config loses Link + validateLink + ErrLinkRequired/ErrUnsupportedLink.
- config.File and config.Profile lose the link YAML key.
- pkg/olcrtc/tunnel.Config loses Link.
- mobile drops defaultLink, SetLink, and mobileConfig.link.
Two e2e tests that exercised link.New directly are renamed to call
transport.New (TestTransportCreatesAllProviderTransportCombinations and
TestTransportConnectsFastProviderTransportMatrix); behaviour is unchanged.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
transport.Config used to carry a flat union of video+vp8+sei tuning fields
that every transport ignored except its own. Replace with an opaque
transport.Options marker interface and per-transport Options structs
(videochannel.Options, vp8channel.Options, seichannel.Options). Datachannel
keeps an unset Options.
link.Config gains TransportOptions and drops the 16 transport-specific
fields. server.Config and client.Config follow suit. session.Config is
left untouched in this commit — buildTransportOptions packs its existing
flat fields into the typed Options bundle before calling server/client
(session.Config is rebuilt in a later commit when YAML config moves to
typed sections).
Tests that synthesized link/server/client/transport configs are updated
to pass typed Options bundles. The shared e2eTransportOptions helper
replaces three copies of the flat field bundle in e2e/tunnel_test.go.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Break CLI backwards compatibility as planned for refactor/universal-carrier:
- Drop -carrier flag; add -auth (auth provider name), -engine (engine
name for -auth none), -url and -token (SFU endpoint + access token for
direct/none auth mode).
- session.Config.Carrier → Auth + Engine + URL + Token.
- session.Gen() is now generic: auth.Get(cfg.Auth).(auth.RoomCreator)
replaces the hard-coded switch on carrier names.
- Register a "none" carrier in builtin (registerDirect) that bypasses
auth and connects directly to any engine with caller-supplied URL+Token.
- auth/telemost.Provider.Issue now accepts a raw room-ID hash in addition
to a full https://telemost.yandex.ru/j/<id> URL.
- Plumb Engine/URL/Token from session.Config through server.Run,
client.Run/RunWithReady, bringUpLink, link.Config, transport.Config, and
carrier.Config so the "none" carrier has access to them end-to-end.
- Update all tests and mobile.go call sites.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>