Repository navigation
Conversation
Adopts LoopKit's doseId: DeviceDataManager gives every bolus and temp basal its own dose id and stores a DoseMetadata record for it before sending the command, so a dose reported after a relaunch still finds its metadata. A failure to store the metadata is logged and does not stop the dose. - Automatic dosing: origin automatic, phone, the loop's dosing decision. A temp basal and a bolus from one cycle now get separate ids for the same decision. - Bolus screen and simple bolus: origin user, phone, their dosing decision. - Watch: origin user, watch. - Retry from a bolus failure notification: origin user, phone, the original decision. - Remote commands: origin remote. The bolus activation type is recorded too. The bolus and simple-bolus delegates take the metadata in place of a decision id. The insulin delivery log and the dose detail on the status screen find a dose's dosing decision through the metadata store; doses recorded before this change keep their decision id as their dose id.
This was referenced Nov 12, 2026
ps2
added a commit
to LoopKit/LoopWorkspace
that referenced
this pull request
Nov 12, 2026
…#586) Async CGM/pump manager delegate calls without delegateQueue (LoopKit/LoopKit#696, LoopKit/Loop#2677 and the plugin PRs), doses identified by a Loop-owned doseId (LoopKit/LoopKit#695, LoopKit/Loop#2675), and dose metadata carried on DoseEntry (LoopKit/LoopKit#699, LoopKit/Loop#2683). Submodules: CGMBLEKit, EversenseKit, G7SensorKit, LibreLoop, LibreTransmitter, Loop, LoopKit, MedtrumKit, MinimedKit, NightscoutRemoteCGM, OmnipodKit, TidepoolService, dexcom-share-client-swift.
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.
Adopts LoopKit/LoopKit#695: pump managers now get an opaque
doseIdinstead ofdecisionId, and Loop keeps the dose's metadata itself.DeviceDataManagercreates a dose id for each bolus and temp basal, stores aDoseMetadatarecord for it inDoseMetadataStore, then sends the command. Because the record is written first, a dose reported after a relaunch still finds its metadata. If storing fails, the failure is logged and the dose still goes out.The bolus activation type is recorded as well.
enactBolus(units:metadata:activationType:)) take metadata instead of a decision id.DeliveryDelegate.enact(bolus:tempBasal:decisionId:)is unchanged for automatic dosing.DoseMetadataStore.decisionIds(for:). Doses recorded before this change keep their decision id as their dose id, so they still resolve.Tests
DoseEnactorTests.testEachDoseGetsItsOwnDoseIdDeviceDataManagerTests.testEnactBolusStoresMetadataForTheDoseIdSentToThePumpDeviceDataManagerTests.testAutomaticDosesStoreMetadataWithTheDecisionBolusEntryViewModelTestschecks the metadata it sends.Needs LoopKit/LoopKit#695, plus the pump manager PRs for the workspace to build.