Repository navigation
The watch keeps its session and central across a sensor change - #128
Merged
ps2 merged 1 commit intoNov 24, 2026
Merged
Conversation
…tral The watch built a second G7CGMManager for each new sensor or code while the first was still registered with the restore identifier. watchOS refuses the duplicate and the new central reports .unsupported for good: the watch never scanned for the new sensor until Loop was relaunched. Seen on a device with the old sensor still live at the switch. - G7CGMManager joins ShareableDeviceControl. adoptConfiguration(_:) takes the phone's changed export in place, as a pairing does on the phone: same session, same central; the old sensor's link or request is cancelled. A manager set up on this device keeps its own sensor. - G7WatchAcquisition.sensorForgotten(): drops the old sensor's state; a hold, settle or backoff started for it stands down when it returns. A late link to the old sensor does not end the search. - A central reporting .unknown or .unsupported starts the existing recheck and recreate itself, and says so in the device log; before, only a scan request did, and nothing asked once it arrived. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jeremybarnum
pushed a commit
to jeremybarnum/G7SensorKit
that referenced
this pull request
Nov 26, 2026
…it#134), with the early bond record Upstream's phone reconnect changes (a 2 s rescan and a connect when another app connects, the connect reissued at power-on after a restore, a link with a reading is not a stopped session) and the watch's in-place sensor change (LoopKit#128, the same as this branch's own). Also: a watch whose bond was lost records it at the handshake's bond step, not only at its end. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
yurique
added a commit
to Artificial-Pancreas/G7SensorKit
that referenced
this pull request
Nov 27, 2026
… s rescan, connect after restore, watch handoff Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
dnzxy
pushed a commit
to loopandlearn/G7SensorKit
that referenced
this pull request
Dec 1, 2026
…tral (LoopKit#128) The watch built a second G7CGMManager for each new sensor or code while the first was still registered with the restore identifier. watchOS refuses the duplicate and the new central reports .unsupported for good: the watch never scanned for the new sensor until Loop was relaunched. Seen on a device with the old sensor still live at the switch. - G7CGMManager joins ShareableDeviceControl. adoptConfiguration(_:) takes the phone's changed export in place, as a pairing does on the phone: same session, same central; the old sensor's link or request is cancelled. A manager set up on this device keeps its own sensor. - G7WatchAcquisition.sensorForgotten(): drops the old sensor's state; a hold, settle or backoff started for it stands down when it returns. A late link to the old sensor does not end the search. - A central reporting .unknown or .unsupported starts the existing recheck and recreate itself, and says so in the device log; before, only a scan request did, and nothing asked once it arrived. Co-authored-by: Jeremy Barnum <prefer not to supply> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit c86d9bb)
kristinkand
pushed a commit
to kristinkand/G7SensorKit
that referenced
this pull request
Dec 4, 2026
…tral (LoopKit#128) The watch built a second G7CGMManager for each new sensor or code while the first was still registered with the restore identifier. watchOS refuses the duplicate and the new central reports .unsupported for good: the watch never scanned for the new sensor until Loop was relaunched. Seen on a device with the old sensor still live at the switch. - G7CGMManager joins ShareableDeviceControl. adoptConfiguration(_:) takes the phone's changed export in place, as a pairing does on the phone: same session, same central; the old sensor's link or request is cancelled. A manager set up on this device keeps its own sensor. - G7WatchAcquisition.sensorForgotten(): drops the old sensor's state; a hold, settle or backoff started for it stands down when it returns. A late link to the old sensor does not end the search. - A central reporting .unknown or .unsupported starts the existing recheck and recreate itself, and says so in the device log; before, only a scan request did, and nothing asked once it arrived. Co-authored-by: Jeremy Barnum <prefer not to supply> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit c86d9bb) (cherry picked from commit 4134099)
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.
Needs LoopKit/LoopKit#706
On the watch, a new sensor or code from the phone now goes to the existing
G7CGMManagerthroughadoptConfiguration(_:), as a pairing does on the phone: same session, same Bluetooth central. Before, the watch built a second manager while the first still held the restore identifier, and the new central reported.unsupportedfor good..unknownor.unsupportednow starts the existing recheck-and-recreate itself.Testing: G7SensorKit tests pass (210), including new ones for the same session and central across a sensor change and a code change. On a real watch with two emulated sensors, the watch followed each sensor and code change in place with no
.unsupported. That run used the earlier, opt-in version of the call; this version has the same G7 behaviour and is not yet run on a device. The.unsupportedrecovery path has not been exercised on a device.🤖 Generated with Claude Code