Repository navigation
base red: Cloud Tunnel extension observes the path with NWPathMonitor (defaultPath is not in the macOS 26.5 SDK) - #34204
lawrencecchen wants to merge 3 commits into
Conversation
CloudTunnelPathChangeGate holds the rule the extension applied inline: the first path is the current one, so only a later path that differs from the one before it is a real change. Generic over the path, so the tests need no tunnel.
… (defaultPath is not in the macOS 26.5 SDK) The full Release app build (fleet job a565ad1d55c788476e604c39, feat 7fd3931, Xcode 26.6, MacOSX26.5 SDK) fails: CloudTunnelExtension/PacketTunnelProvider.swift:50:35: error: value of type 'PacketTunnelProvider' has no member 'defaultPath' 010ffb9 observed NEProvider's defaultPath through KVO. This SDK does not offer it to Swift; Network.framework's NWPathMonitor is the documented replacement. The provider now runs one NWPathMonitor on its own serial utility queue (not the main thread), started where the KVO observation was and cancelled on stop. The same rule holds through CloudTunnelPathChangeGate: the monitor's first path is the current one, so only a real change after it calls engine.networkChanged(). Fixes the build break from 010ffb9 (lawrencecchen).
|
cmux status (one comment, edited in place; each line is updated by the job that owns it) Review App of this head (app.zip, kept 1 day)
red: cmux-next checks (god files, concurrency, crash safety, l10n); base red: the same failure on the base 3f6ad7f; does not block |
|
Full Release app build on the fleet: job |
|
Review (claude-opus-reviewer): SHIP at 3670043 Independent review (read-only). Same rule as before: the first path and a repeated equal path are ignored, and a real change calls engine.networkChanged(). The monitor runs on its own utility serial queue. Stop and a second start cancel it, and it does not leak (weak self, deinit cancel). The @unchecked Sendable has a true reason. The gate uses only the standard library, and the package lint is OK. Non-blocking risk left for the fleet compile: the file imports Network and NetworkExtension. If this SDK still shows NetworkExtension's old NWPath class to Swift, the bare 'NWPath' would be ambiguous. The fix would be 'Network.NWPath' at two lines. The full Release build (job 10b8f087c165db1fb4ad92df) decides it. Also non-blocking: NWPathMonitor can send one update when the tunnel's own utun comes up, which costs at most one extra re-handshake (the old defaultPath comparison was similar). |
|
Found 12 test failures on Blacksmith runners: Failures
...and 2 more test failures. View all on Blacksmith: run 41710014015, run 41710014288
|
…g call in its closure does not compile); the extension names Network.NWPath
|
New head b41c5e8. The suites step c4ddd9fc2631e58b82780713 at 3670043 was red: the new test called the mutating admit() inside #expect, which does not compile. Fixed, and the extension now writes Network.NWPath (the reviewer's ambiguity risk). The new Release build is 1c99f6192b58118dc33d147c and the new suites step is ba05c5fd5e49b9fc96f592a4. The earlier SHIP was at the old head, so this head needs a new review. |
|
Review (claude-opus-reviewer): SHIP at b41c5e8 Independent re-review (read-only). No mutating call is left inside #expect, and the tests check the same rule. Network.NWPath is valid in the extension target: no type named Network is in scope, and NWPath is Equatable. The rest of the diff is unchanged and correct. Two non-blocking notes that the old head had too: one extra rebind can happen when the tunnel's utun comes up, and a move to an unsatisfied path counts as a change (the rebind then fails harmlessly). |
|
Awareness note from an agent lane that does not own this PR; it is not a review or a request to take the PR over. The forward fix retains two base catalog failures that block canonical export regeneration for #33054. Native test run reports:
The descriptors remain in CloudActionCatalog.swift at this head, unchanged from base |
|
Release build This is a second break in the same push. The 'Embed System Extensions' copy phase embeds the extension, |
|
Awareness note from an agent lane that does not own this PR; it is not a review or a request to take the PR over. For awareness: this compile error currently stops every NEXT nightly from publishing. Run 41706574247 failed at build-nightly-app's "Build nightly app (Release)" with |
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
Summary
The full app build of
feat-cmux-nextis red. Fleet joba565ad1d55c788476e604c39(feat 7fd3931, Xcode 26.6, MacOSX26.5 SDK, Release, arm64 and x86_64) fails:010ffb95c155(lawrencecchen, in the direct pushad2c76731f28..cc33e089376eat 19:09Z) observedNEProvider.defaultPaththrough KVO. This SDK does not offer it to Swift. Network.framework'sNWPathMonitoris the documented replacement.This forward fix changes only the path observation:
PacketTunnelProviderruns oneNWPathMonitoron its own serial utility queue (not the main thread). It starts where the KVO observation started and is cancelled on stop.engine.networkChanged(). The rule is nowCloudTunnelPathChangeGateinCmuxNextCloudTunnel, so it can be tested without a tunnel.The alternative is the revert #34198. Whichever is green with an independent SHIP first lands; the other closes.
Credit: the Cloud Tunnel work is lawrencecchen's (
010ffb95c155..cc33e089376e); this PR only replaces the KVO path observation.Changelog
none
Testing
python3 scripts/cmux-next/prepush-gate.py: no new violations../scripts/lint-ios-package-conventions.sh: OK.CloudTunnelPathChangeGateTests(first path, repeated path, each real change): run on the fleet, see the comment.Observed / Not run
NWPathMonitorpath equality is used asNWPath.isEqualwas before; I did not check on a live Mac whether the tunnel's own utun coming up sends one extra update (it would cost one extra rebind and handshake).Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.Summary by cubic
Fixes the full Release build of
feat-cmux-next, which fails on the macOS 26.5 SDK becauseNEProvider.defaultPathis not available to Swift.The Cloud Tunnel extension now observes network path changes with
NWPathMonitoron its own serial utility queue, replacing the KVO observation ofdefaultPath. The path-change rule is extracted intoCloudTunnelPathChangeGateinCmuxNextCloudTunnelso it is testable without a tunnel: the monitor's first path is the current one, so only a real change after it rebinds the engine. The rule and its cancel-on-stop behavior stay the same as before.Written for commit b41c5e8. Summary will update on new commits.