Skip to content

Tidepool sync 2026-05-11#450

Open
loopkitdev wants to merge 61 commits into
LoopKit:devfrom
loopkitdev:tidepool-sync/2026-05-11
Open

Tidepool sync 2026-05-11#450
loopkitdev wants to merge 61 commits into
LoopKit:devfrom
loopkitdev:tidepool-sync/2026-05-11

Conversation

@loopkitdev
Copy link
Copy Markdown

@loopkitdev loopkitdev commented May 20, 2026

Refreshed Tidepool → DIY sync for the whole workspace, from the tidepool-sync/2026-05-11 branch. Supersedes and replaces the previous Tidepool merge PR (#213).

See Tidepool → LoopKit DIY Sync — 2026-03-10 and Tidepool → LoopKit DIY Sync — 2026-05-11 for more details

Submodule gitlinks currently point at the unmerged per-repo tidepool-sync/2026-05-11 branches. They will be updated to the merged commits as each submodule PR below lands.

Submodule PRs

Repo PR Base
Loop LoopKit/Loop#2438 dev
LoopKit LoopKit/LoopKit#591 dev
CGMBLEKit LoopKit/CGMBLEKit#213 dev
dexcom-share-client-swift LoopKit/dexcom-share-client-swift#53 dev
RileyLinkKit LoopKit/RileyLinkKit#15 dev
NightscoutService LoopKit/NightscoutService#24 dev
LoopOnboarding LoopKit/LoopOnboarding#34 dev
AmplitudeService LoopKit/AmplitudeService#30 dev
LogglyService LoopKit/LogglyService#27 dev
OmniBLE LoopKit/OmniBLE#169 dev
NightscoutRemoteCGM LoopKit/NightscoutRemoteCGM#33 dev
LoopSupport LoopKit/LoopSupport#29 dev
TidepoolService LoopKit/TidepoolService#36 dev
G7SensorKit LoopKit/G7SensorKit#55 main
OmniKit LoopKit/OmniKit#70 main
MinimedKit LoopKit/MinimedKit#32 main
MixpanelService LoopKit/MixpanelService#6 main
LibreTransmitter LoopKit/LibreTransmitter#40 main

Notes

  • dev was merged into the Loop sync branch to resolve conflicts (WatchApp Info.plist Live Activity launch keys + project.pbxproj localization file references). Loop builds clean.

loopkitdev and others added 30 commits March 12, 2026 15:50
- Point all 18 submodule URLs to https://github.com/loopkitdev/* forks
- Minizip and TrueTime.swift retain LoopKit origin (no forks)
- Add docs/tidepool-sync-2026-03-10.md (Tidepool sync documentation)
…ce docs

- Update all 17 submodule commit pointers to reflect rewritten history
  (filter-branch changed SHAs when fixing author to LoopKit Developer)
- Add Loop build fix commit (LoopDataManager init ordering)
- Add LOOPKIT_SYNC_PROCESS.md, SYNC_PROGRESS.md, sync-docs/
Catches the superproject up to all submodule work that has accumulated
on tidepool-sync/2026-03-10 since the initial sync commit, including:

- Loop: restore manual dose entry "+" button on insulin delivery screen
- LoopKit, NightscoutService, TidepoolService, LibreTransmitter:
  string catalog updates from Xcode build
- OmniKit: fix reentrant lock crash in isSignalLost
- Various submodules: merge upstream/{dev,main} into tidepool-sync branch
Parallel fix to OmniKit 924f10d — OmniBLE had the identical bug where
isSignalLost() read state.lastPumpDataReportDate from inside a
lockedState.mutate closure, causing recursive lock acquisition.
Tier 1
- LoopKit: bd30c463 (409 commits from tidepool/dev; 18 source conflicts + 19
  pbxproj regions resolved; DIY divergence preserved at BasalRateScheduleEditor)
- Loop: 76b6b1e3 (14 commits from tidepool/dev; 3 pbxproj regions)

Tier 3 - CGM drivers
- CGMBLEKit: 69562e7
- G7SensorKit: d024513
- dexcom-share-client-swift: 541de2f
- NightscoutRemoteCGM: b1ea9ee
- LibreTransmitter: c99daf1

Tier 3 - Pump drivers
- RileyLinkKit: 19f5ae8
- OmniKit: b3b6080 (preserves reentrant lock fix; adopts mutateState)
- OmniBLE: 645e0fc (preserves reentrant lock fix and Pod Keep Alive suspend
  special case; adopts mutateState)
- MinimedKit: f994d6e (preserves CAGE/IAGE tracking)

Tier 3 - Services
- TidepoolService: 5f6a064 (incl. DoseEntry dedupe follow-up)
- NightscoutService: 1b5cded (preserves APNS response feature)
- AmplitudeService: 77dae3e
- LogglyService: 8e18081
- MixpanelService: unchanged (already up to date with tidepool)

Tier 3 - Support/Onboarding
- LoopSupport: a312dfb
- LoopOnboarding: fd7e410

Package.resolved
- LoopAlgorithm: tidepool-org/LoopAlgorithm bd1a879 (4 test-only commits)
docs/tidepool-sync-2026-05-11.md describes the merge, conflicts, and
divergences. SYNC_PROGRESS.md updated to reflect the new branch and the
divergences carried forward.
Pulls in 3 small origin/dev updates that landed after this sync started:
- Loop: PR #2410 Live activity plot fixes (manual merge to preserve our
  post-Tidepool-sync API: kept async/await sample fetch + LoopUnit
  signature, adopted upstream's presetStart<=presetEnd guard and the
  adjustedChartStart/End helpers)
- CGMBLEKit: PR LoopKit#211 handle inactive CGM sensor sessions (clean merge)
- OmniBLE: Lokalise translation update (clean merge)
… charts

Picks up loopkitdev/Loop@4eea0b24 — widens the carbStatus.dynamicGlucoseEffects
sampling window in fetchCarbAbsorptionReview and getHistoricalChartsData from
`from: end` to `from: start` so the model-predicted line spans the full chart
again (was only generating samples in now+1h … now+7h, outside the visible
window). UI-only; no dosing-path impact.
Pete Schwamb added 7 commits May 20, 2026 20:20
Document that upgrading dev→sync migrates the shared store to Modelv6 and cannot
be reverted: dev ships only up to Modelv4 and can't open a v6 store, so reverting
leaves the app unable to load its data store (no on-disk data loss, but dev needs
a delete+reinstall, rebuilding from HealthKit). Also records that the forward
migration now preserves dose amounts (value→deliveredUnits). Includes the earlier
2026-03-10 LoopAlgorithm-packaging callout.
@marionbarker
Copy link
Copy Markdown
Contributor

Test

Not all of the updates listed below were tested in this comment.
✅ successful build of 3.15 over 3.14 without crashing
✅ successful Browser Build with no warning messages in the email from Apple about Siri not supporting some intents strings

Summary of recent updates

A few more changes came in after my last test:

  • There were some private messages about handling deleting insulin that were addressed
  • ✅ The failure to build over existing Loop was addressed
    • Note going from main to tidepool is one-way, you cannot go back without deleting the app because of database changes, but you should be able to move forward with all your information
  • ✅ localized intents strings restore
  • NEW: both OmniBLE and OmniKit were updated to include pod faults as pump events
  • ✅ Version was bumped to 3.15 to be distinct from current main and dev branches that are at 3.14

Configuration

iPhone SE 3rd gen running iOS 26.5

  • Delete the Loop app from the phone
  • Build LoopWorkspace dev branch, 3.14.0, commit e49a7cc (identical code to main branch, commit a2b527d)
    • Configure CGM (Nightscout), Pump (rPi DASH)
    • Enable closed loop, choose Automatic Bolus Dosing Strategy
    • Enable both algorithm experiments
    • Enable Missed Meal and Live Activity
    • Add 15 g carbs and accept recommended bolus
    • Ten minutes later, add 15 g carbs and save without bolusing
    • Allow phone to Loop for a couple of hours
    • Export critical events and LoopReport

Events and Report from 3.14.0

Loop_v3.14.0_Export-20260521T163630Z.zip

Loop_v3.14.0_Loop Report 2026-05-21 093645-0700.md

Test Transition from Loop 3.14 to 3.15.0

Build LoopWorkspace tidepool-sync/2026-05-11, commit 14d1987
✅ Successful transition without crashing

  • need to examine events and reports
  • confirmed settings are same
  • will post Live Activity in a separate comment

Events and Report from 3.15.0

Loop_v3.15.0_Export-20260521T163957Z.zip

Loop_v3.15.0_Loop Report 2026-05-21 094014-0700.md

Screenshots

main and setting screen for 3.14.0 immediately before transition

loop-3 14

main and setting screen for 3.15.0 immediately after transition

loop-3 15

Browser Build Test

✅ The browser build succeeded again. This time there were no warning messages about some items not being supported by Siri.

@ps2
Copy link
Copy Markdown
Contributor

ps2 commented May 21, 2026

Thanks @marionbarker ! Also did you see the new Health page in settings?

@marionbarker
Copy link
Copy Markdown
Contributor

Test Live Activity

Part of the testing from #450 (comment)

The Live Activity shows up, but the button to always allow was really had to see. I knew it was there so I kept hitting it until I hit the right spot.

  • Screenshot on the left was after turning on live activity. (I could faintly see the always allow option, but not read it and it wasn't captured by the screenshot)
  • Screenshot on the right, after I successfully hit the correct spot.
loop-3 15-live-activity

@marionbarker
Copy link
Copy Markdown
Contributor

Test continued

❓ Should there be a row indicating if Loop can write to Carbohydrates?

New screen for Apple Health

The screenshot below shows the new Apple Health screen reached by Loop->Settings->Apple Health. I used the Health App and tested disabling the ability for Loop to read from Apple Health (no change on the Loop screen as expected) and then disabling the ability for Loop to write to Apple Health (each green check changed to red x and said Denied). I restored the Health app settings, and green checks returned.

IMG_7691

@marionbarker
Copy link
Copy Markdown
Contributor

Test

The test build includes up through commit fc9293e from tidepool-merge/2026-05-11.

This was a fresh build of an independent Loop-TP app on my looping phone (different bundle ID)
✅ Modifying Therapy settings was very smooth
✅ The default Dosing strategy is Automatic Bolus with warning that Temp Basal Only is deprecated and may be removed

Configuration

iPhone 15 pro running iOS 26.5 (my personal Looping phone)

  • Real App name is Loop
  • CGM G7 15-day
  • Pump Pod
  • Connected to Apple Health and uploading to my real Nightscout and real Tidepool sites

Build an independent version on the same phone

  • Add a suffix of "-TP" to the identifier: com.${DEVELOPMENT_TEAM}-TP.loopkit
  • App name is Loop-TP, version 3.15.0
  • Do NOT enable Apple Health
  • Upload to a test Nightscout site
  • Use my G7 15-day sensor for the CGM
  • Use a simulated pump for the pump
  • Disable Live Activity to avoid confusion
  • ✅ Modify Therapy settings from default to my personal settings
  • Configure simulated pump to Pod with Fiasp

Allow Loop-TP (test build) to run in parallel with Loop (app controlling my pump).

Attempt to remember to match manual entries of carbs on the test Loop-TP app.

@marionbarker
Copy link
Copy Markdown
Contributor

Test

✅ Side-by-side comparison of Loop with G7/Pod with Loop-TP (3.15) with G7/Simulated Pump on same phone looks qualitatively the same
✅ Both Loop and Loop-TP picked up the G7 Sensor change at the same time
❓ I disabled Live Activity for Loop-TP but it still displays on the Lock screen

  • when it asked on Lock Screen initially I said Allow - but later disabled in Loop-TP app

Configuration

See #450 (comment) for configuration

Morning Coffee

I entered 10 g for 1 hour for my morning coffee. Both Loop and Loop-TP recommended the same 1.15 U dose.

Overnight Review

Compare a few screenshots.

Lock Screen

Both Loop (upper plot) and Loop-TP (lower plot) show the same Live Activity on the lock screen

Loop_Loop-TP_LiveActivity

Nightscout

The graphic on the left is my real Nightscout site and the one on the right is the test site. Because I was previously running a glucose trace uploaded to the test site, the vertical scaling is different. But qualitatively the dosing response is the same.

nightscout-Loop_v_Loop-TP_2026-05-24_06am

G7 Sensor transition

There are 2 grey dots visible in the Loop-TP nightscout site.

  • The first is when the new G7 Sensor was started
    • That same indication is in the real Loop nightscout site on the left but is harder to see
  • The second dot is when Loop-TP started to upload to my "Loop Test Site"
    • All data to the left of that second dot is from a different test phone with a different glucose trace
  • ✅ I stopped the old sensor before bed and both Loop and Loop-TP picked up the new sensor at the same time

ps2 added 10 commits May 24, 2026 15:42
Add LoopAlgorithm as a git submodule (tracking LoopKit/LoopAlgorithm) and
reference it as a local Swift package, removing the remote package pin from
the workspace. LoopAlgorithm can now be edited in place like the other
workspace components.

Bump LoopKit pin for the local package reference.
Add LoopAlgorithm to the workspace so the LoopWorkspace owns and versions it
(via the submodule gitlink); projects consume the product. Bump LoopKit pin.
@marionbarker
Copy link
Copy Markdown
Contributor

marionbarker commented May 25, 2026

Test Status

There have been a couple of issues I reported to Pete via DM and he fixed but I have not had time to thoroughly test. In addition, he provided one feature request.

Issue with the Build Order

  • not fixed yet
  • it is not uncommon to get a failure to build the first time because something in the build order is off; sometimes a second try will work

Issue with Nightscout as a CGM

  • commit abad56f did not update readings from Nightscout as a CGM promptly even with a pump heartbeat (worked fine with a CGM with a heartbeat)
  • some updates were pushed but not yet tested

Request LoopAlgorithm be provided as a submodule

  • This will enable us to continue using customizations
  • some updates were pushed and an issue was found

Issue: could not build onto a phone with an existing Loop app of an earlier vintage

  • commit 339b188
  • did a test build over an existing tidepool-sync instance on a test phone and hit an assertion failure
  • did a test build over an existing dev instance on a test phone and hit the same assertion failure
  • explanation for the assert failure: it was a "defensive assert, made to hold our assumptions about other code actually keeping things sorted. Looks like we had a couple places doses weren't being sorted correctly."
  • some updates were pushed but not tested yet

@marionbarker
Copy link
Copy Markdown
Contributor

marionbarker commented May 25, 2026

Test Summary

✅ Looks like I can build Loop 3.14 over Loop-TP 3.15 (will be confirming this)

  • ❓ Pete is looking into this - see note
    ✅ The issue with Nightscout as a CGM was fixed
    ✅ The LoopAlgorithm is provided as a submodule

NOTE: Regarding migration backwards from Loop-TP 3.15 to Loop 3.14, this is what Pete had to say:
Loop 3.14 is using database v4
Loop 3.15 is using database v6
I think it's CoreData's automatic lightweight migration running, and auto migrating back down to 4. I'm not 100% sure it will always work; might be some data issues for some people doing that. I wouldn't recommend it, even if it doesn't crash.

Configuration

iPhone SE 3rd gen running iOS 26.5

  • delete all Loop apps from phone both Loop (3.14) and Loop-TP (3.15)
  • test the latest commit: 4e5d839 (Bump LoopKit: sort normalized doses before filterDateRange)

Test backward compatibility

Attempt to buiild Loop (3.14) dev branch over Loop-TP (3.15)

  • ✅ This succeeded - but might not be real - first put some stuff into the database
  • Delete the app again and build Loop-TP (3.15)
    • Attach a pump and CGM
      • pump is pump simulator so need to keep Loop-TP open and phone unlocked
      • CGM is Nightscout as a CGM
    • Enter carbs an bolus
    • Get a green loop
    • See Test Nightscout as a CGM section

Repeat the attempt to build Loop (3.14) dev branch over Loop-TP (3.15)

  • ✅ This succeeded again - check with Pete to make sure this is expected

Test Nightscout as a CGM

While testing for backward compatibility, I wanted to let Loop-TP run for a while. This doubles as a test for Nightscout as a CGM. Previously, the value only updated once every 30 minutes (starting at commit abad56f).

  • ✅ Using Nightscout as a CGM updates properly at 5 minute intervals

@marionbarker
Copy link
Copy Markdown
Contributor

marionbarker commented May 26, 2026

Test Summary

✅ Live Activity responds to the Enable/Disable flag
❌ But later it shows up again even if disabled for Loop-TP - probably cross talk between the apps not being separated enough (used different bundle ID for Loop and Loop-TP). In future - test again on a different phone with only one version of the app loaded and come back to this comment with an update.

Configuration

Run parallel version on my personal Looping phone, iPhone 15 pro running iOS 26.5

  • Build the latest commit: 4e5d839 (Bump LoopKit: sort normalized doses before filterDateRange)
  • Use my G7 as CGM
  • Use simulated pump on the Loop-TP app

Test Live Activity

  • Notice that Live Activity is no longer present with this latest build (before it was always present regardless of enable/disable selection)
  • Enable it and it returns
  • Disable it and it stops

Edited because later - both Live Activites were showing again.

Continue parallel Apps

Continue entering carbs and bolusing with the Loop-TP (3.15) version when I do it for real with my pump.
Over the last 36 hours there continues to be good agreement between the two versions on my phone.

As of 2026-05-25 19:00 PDT, stop uploading the parallel data to Nightscout so I can use the site for a different test.

Screenshot below shows real Loop on the left and Loop-TP running a simulated pump on the right. I mostly entered carbs at the same time into the two apps over the last 24 hour.

nightscout-Loop_v_Loop-TP_2026-05-25

The 'one-way / forward-only' claim was wrong. Core Data lightweight migration
downgrades the v6 store to dev's Modelv4 in place (verified by round-trip
test). It only fails once a v6 row has a null deliveredUnits (dev's 'value' is
mandatory -> NSCocoaError 134110), which is why an immediately-reverted tester
saw it work but a long-running sync store would not.
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