Repository navigation
Start the relay connector only after a phone is enrolled - #6765
Merged
Merged
Conversation
The off-network relay connector dialed the hosted relay on every paid plan, even with no phone paired. It now starts only while at least one phone is enrolled and stops when the last one is revoked. The enroll and revoke routes tell the server through an internal endpoint, and each dial checks again. O8_NO_PHONE_HOME=1 now keeps it off too, and the privacy doc lists what that variable covers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
hurttlocker
enabled auto-merge
November 24, 2026 20:17
🔍 PR Review Bot
Automated review — CI workflow |
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.
What changes
The off-network relay connector now runs only while at least one phone is enrolled.
/internal/mobile-devices-changed, operator bearer only), and the first enroll starts the connector. The revoke route does the same, and the last revoke stops it.O8_NO_PHONE_HOME=1keeps the connector off.docs/user/product-telemetry-privacy.mdnow lists exactly whatO8_NO_PHONE_HOME=1turns off: automatic update install, crash-log upload, crash and error reports, usage analytics, the launcher's update check and the hosted relay connection. It also addsO8_RELAY_CONNECTOR=offto the per-setting table.At rest
On a paid plan with no phone, the connector held an outbound socket open and ran two timers:
relay-keepalive, every 20 s;relay-heartbeat, every 25 s.That is about 5.4 timer runs a minute, roughly 7,800 a day, plus the live socket. Both timers are classed
always, so the idle gate never paused them. With no phone enrolled, none of this runs now. The park check also stops reporting "phone relay on" as a reason Node cannot be parked. With a phone paired, behaviour is unchanged.Tests
tests/relay-connector-enrolled-real-path.test.ts(new), against a local relay fixture and the real enroll and revoke routes:O8_NO_PHONE_HOME=1the connector stops even with a phone enrolled.src/lib/mobile/relay-connector.test.ts: the existing 36 connector tests now enroll a fixture phone first.npm run typecheck:fast,npm run verify:ci.🤖 Generated with Claude Code