Preserve Tailscale access across Nightly Iroh upgrades
Merged
AZ
3mo ago+53+53+01234567890123456789-10-10-01234567890123456789
Summary
- preserve the historical legacy mobile listener default for dev and Nightly Macs when no preference has ever been written
- keep explicit current and legacy preferences authoritative, including an explicit off
- keep stable builds opt-in and retain the new iOS fail-closed rule for bearer tokens over raw Tailscale TCP
This is compatibility ingress only. An older iOS app can still reach an updated Nightly Mac, where the Mac performs same-account Stack authentication. A new iOS app still requires Iroh from a truly old Mac because that Mac has no cryptographic challenge that can attest a raw Tailscale route.
Verification
- regression-only commit
9a688df060fails before the policy overload exists xcodebuild -project cmux.xcodeproj -scheme cmux-unit -configuration Debug -destination "platform=macOS" -derivedDataPath /tmp/cmux-tsmigr test -only-testing:cmuxTests/MobileHostServiceSettingsTests CODE_SIGNING_ALLOWED=NO(14 passed)swift test --package-path Packages/iOS/CmuxMobileTransport --filter CmxNetworkByteTransportFactorySecurityTests(5 passed)swift test --package-path Packages/iOS/CmuxMobileShell --filter IrohReconnectRouteSelectionTests(24 passed)- cloud tagged build
tsmigrsucceeded: https://github.com/manaflow-ai/cmux/actions/runs/29676343291 - tagged runtime reported the legacy listener running and published both IPv4 and IPv6 Tailscale routes
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.
Summary by cubic
Preserves Tailscale pairing access across Nightly Iroh upgrades by keeping the legacy mobile listener on for dev/nightly builds when no preference exists. Explicit settings still win, and stable builds remain opt-in.
- Bug Fixes
- Default listener depends on build flavor: dev/nightly on, stable off when no preference is set.
- Explicit current or legacy preference overrides, including an explicit off.
- Made build flavor explicit via
isListeningEnabled(defaults:buildFlavor:)for deterministic behavior; added tests for nightly compatibility, explicit and legacy disables, and stable default.
Summary by CodeRabbit
- Bug Fixes
- Fixed listener-enable behavior to consistently respect explicit current and legacy preferences.
- Updated defaults by build type: nightly retains the prior behavior, while stable remains opt-in to avoid local network permission prompts.
- Tests
- Added/expanded unit tests for build-flavor-specific defaults, including nightly behavior, explicit true/false handling, legacy overrides, and stable-build opt-in.