Skip to content

Add opaque bolusReference to enactBolus and DoseEntry#5

Closed
bjorkert wants to merge 19 commits into
loopandlearn:devfrom
bjorkert:feature/bolus-reference
Closed

Add opaque bolusReference to enactBolus and DoseEntry#5
bjorkert wants to merge 19 commits into
loopandlearn:devfrom
bjorkert:feature/bolus-reference

Conversation

@bjorkert

@bjorkert bjorkert commented Jul 1, 2026

Copy link
Copy Markdown
Member

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.

bastiaanv and others added 17 commits June 3, 2024 21:55
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.
bjorkert added 2 commits July 1, 2026 15:10
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.
@bjorkert

bjorkert commented Jul 1, 2026

Copy link
Copy Markdown
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.

@bjorkert bjorkert closed this Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants