Add opaque bolusReference to enactBolus and DoseEntry#5
Closed
bjorkert wants to merge 19 commits into
Closed
Conversation
Bring Dana support into LoopKit for MockKit
Bring Dana support into LoopKit for MockKit
Proposed Fix Option 1 for Slow Build with Xcode 16, parallel to LoopKit PR 547
Carries a caller-supplied reference through the bolus request and echoes it back on the reported DoseEntry so the caller can correlate a delivered dose with the request that produced it. A default protocol implementation forwards to the existing enactBolus, keeping pump managers that do not adopt it source compatible. MockKit persists and echoes the reference as a reference implementation.
Use UUID for the opaque bolus reference instead of String so the public API is strongly typed. Codable encodes it natively; the plist-backed rawValue keeps storing it as uuidString.
This was referenced Jul 1, 2026
Correlates a bolus request with the dose the pump later reports, keyed by the request reference or the reported syncIdentifier, so a caller can record where a bolus came from and a consumer can read it back. File-backed so it survives an app restart while a bolus is in flight.
Share one BolusOrigin definition (remote/watch/manual/shortcut) so apps no longer duplicate it; the store now takes the enum directly. Autobolus/SMB is not a case here — that is conveyed by the dose's automatic flag.
Member
Author
|
Superseded by LoopKit#594 — landing the change upstream so it can flow down to loopandlearn/LoopKit and be shared by Loop and Trio. |
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.
Adds an optional UUID bolusReference to enactBolus that is echoed back on the reported DoseEntry, so the caller can tell where a bolus came from. A default protocol method keeps existing pump managers working unchanged. MockKit persists and echoes it too.
Part of the bolus origin work: loopandlearn/OmnipodKit#101 and nightscout/Trio#1252.