Skip to content

sync(trio): merge upstream/dev at 4cc5e7b0e (Syai Ultra CGM, TIR rename, 60 commits) - #39

Merged
mountrcg merged 62 commits into
devfrom
sync/trio-2026-10-25
Oct 25, 2026
Merged

mountrcg merged 62 commits into
devfrom
sync/trio-2026-10-25

Conversation

@mountrcg

Copy link
Copy Markdown
Owner

sync(trio): merge upstream/dev at 4cc5e7b (Syai Ultra CGM, TIR rename, 60 commits)

Source branch: sync/trio-2026-10-25 → target: dev
Merge commit: 804801c50cd444b2787f2f4b4c506e6f655f8427 (parents 781f22efe + 4cc5e7b0e)
Baseline dev: 781f22efe79d515e8cf82d9dfc7bfa6de536cf38
Incoming: upstream/dev 4cc5e7b0ecfa09766f90bf93f898828eacb29b51 — 60 commits, 12 merged upstream PRs
Diff scope: 46 changed paths (10 submodule gitlinks included), +807 / −100

Summary

Routine upstream sync of upstream/dev into Tai dev, cutting in upstream Trio from f5cdbfa8b up to
4cc5e7b0e (APP_DEV_VERSION 1.0.2.14 → 1.0.2.26). The 60 incoming commits add Syai Ultra CGM support
via the new SyaiKit submodule, move the CGM/pump-bolus and TIR surfaces forward, and bump ten kit
submodules. All ten conflicts were resolved against the architecture spec; the branch is committed
locally and has not been pushed. Nothing is built locally — CI is the build gate.

What the 60 commits bring

New submodule: SyaiKit

  • SyaiKit (https://github.com/nightscout/SyaiKit, pinned 816108980650863b637934367dc5e35212001956, dev)
    is added to .gitmodules and as an Xcode subproject, with SyaiKit/SyaiKitUI frameworks linked and
    embedded and included in Trio.xcworkspace — Syai Ultra CGM support (#1618).
  • Syai Ultra is wired through the CGM plugin/device catalog and has entries in the alert catalog.

Submodule pointer bumps (11 including the new one)

Submodule dev merged upstream branch
CGMBLEKit ea224e771 776543fca dev
DanaKit e157a861c eadb9fefc dev
EversenseKit e1bb6faf0 e7a1850fd dev
G7SensorKit 5c0fc075a f45545185 feat/trio-g7-direct
LibreLoop 82c92f2cf a76748161 legacy-loopkit-compat
LoopAlgorithm 4604ee36f 7ef67243a main
LoopKit f974241f5 ff8c30e28 trio
MedtrumKit ef866fa68 c33699595 dev
OmnipodKit 928bb7950 0c6d68b00 dev
RoundWhiteDiscKit e66da6cc3 7dd6396f0 main
SyaiKit — (new) 81610898 dev

Features and fixes

  • Syai Ultra CGM (#1618) — new kit, CGM plugin/device wiring, alert catalog entries.
  • CGM sensor warnings (#1659) — sensor warnings now surface regardless of sensor age; G7 sensor
    lifecycle alerts cataloged.
  • CGM kits (#1656, #1662) — submodule housekeeping; G7SensorKit moved to feat/trio-g7-direct
    (SystemMemoryReset reconnect fix), LibreLoop to legacy-loopkit-compat, RoundWhiteDiscKit bumped for
    the SwiftFormat parse fix.
  • TIR terminology (#1558, #1580) — clearer Time-in-Range wording, TIR Lower Threshold rename and
    help text, TimeInRangeType model update, settings-search targets, Stat chart touch-ups.
  • Pump-programmed boluses (#1666) — BolusStored.isPumpUI renamed isProgrammedByPumpUI; pump icon
    and accessibility label in History → Treatments; the flag is uploaded with Nightscout treatments.
  • Carb entries in a single transaction (#1646) — CarbEntryMutationService,
    CarbsStorage.insertCarbEntry(_:into:areFetchedFromRemote:).
  • Inverted SMB low temp fix (#1651) — sub-30-minute zero temp rates corrected, with upstream's
    documented deviation from the oref JS in DosingEngine.
  • Target-glucose line gap (#1665) — target profiles rebuild when the chart window passes their end.
  • Edit Override form (#1652) — closes when the Nightscout profile upload fails.
  • Alarm sounds (#1658) — CC0 licence recorded, ACKNOWLEDGEMENTS.md updated.
  • Tooling — scripts/define_common_trio.sh (G7SensorKit branch), scripts/swiftformat.sh excludes
    SyaiKit.

CI version progression

Fork-owned APP_DEV_VERSION was bumped 12 times in range, 1.0.2.15 through 1.0.2.26; the merged
Config.xcconfig carries 1.0.2.26.

Conflicts resolved (10)

Path Resolution
Trio/Sources/APS/Storage/CarbsStorage.swift Tai's authorization/throwing store structure kept; upstream's atomic insert helper adopted.
Trio/Sources/Modules/Home/View/Header/CurrentGlucoseView.swift HEAD at the conflict; upstream's statusDemandsAttention fix ported for warning/critical only.
Trio/Sources/Modules/Settings/SettingItems.swift Upstream's five TIR-lower-threshold mappings; two stale duplicate "Time in Range Type" keys deleted (duplicate dictionary keys crash at runtime).
Trio/Sources/Modules/UserInterfaceSettings/View/UserInterfaceSettingsRootView.swift Tai's layout (single Home Statistics Panel, .listRowBackground(Color.chart)) with upstream's TIR rename and hints.
Trio/Sources/Modules/History/View/HistoryRootView+Treatments.swift (modify/delete) Tai's deletion stands; upstream's pump-programmed bolus icon/accessibility block ported into the consolidated HistoryRootView.swift.
4× TrioTests/OpenAPSSwiftTests/Parity/goldens/*/determination.json Kept ours verbatim (checkout --ours); not hand-merged.
Trio.xcodeproj/project.pbxproj Union + dedupe by 24-hex object ID: Tai's ID scheme kept, SyaiKit framework refs and build/embed memberships added, AlertCatalogRegistryOmniFaultTests membership restored, all ConfigEditor refs purged (Tai removed the feature in d21a90cf5a), stale upstream-removed refs dropped, pre-existing duplicate definitions/memberships fixed (SettingsSearchTests, RileyLinkKit, CalibrationsTests, ContainerResolutionTests, alarm.caf, CriticalAlertAlarmScheduler).

Documented deviations from the architecture directive (all reviewed and accepted):

  1. CurrentGlucoseView.swift: a leaked upstream guard shouldShowArc else { return nil } had landed
    outside the markers in Tai's non-optional color getter (compile error) and was removed.
  2. CurrentGlucoseView.swift: the statusDemandsAttention port is gated on warning/critical rather than
    on any CGM status, so Tai's normal-tier sand-colour/hourglass progression inside the 48-hour window is
    unchanged while upstream's fix applies at any sensor age.
  3. UserInterfaceSettingsRootView.swift: upstream's Home Statistics Panel section was not taken verbatim —
    Tai already carries that section (moved, with a Tai-specific hint) and upstream did not change it in
    this range, so taking it would have rendered the picker twice.
  4. project.pbxproj: no second AlertEntry.swift build file — Tai already compiles the file through
    492B88F5, a second entry would compile it twice.
  5. project.pbxproj: the MKRingProgressView.framework file reference was not kept (no group child in
    Tai's project, it would be an orphan); the SPM product reference stays.

Verification

  • Merge parentage exact (781f22efe + 4cc5e7b0e), single merge commit, correct message, no
    co-author/tool-attribution trailers.
  • No unmerged index entries, no conflict markers, git diff --check clean; no unexpected deletions —
    both the HEAD→worktree and first-parent→merge deletion lists are empty.
  • plutil -lint on project.pbxproj passes; object definitions are unique, every build file sits in
    exactly one phase list, every file reference in exactly one group, no dangling file/product/list refs
    (checked independently by coder and reviewer).
  • xcrun swiftc -parse passes on all five resolved Swift files (syntax only).
  • Trio/Sources/Localizations/Main/Localizable.xcstrings is byte-identical to upstream
    (blob 7bc0ec1180b6bea9fe1405e8939b4959ae8eddc1).
  • Every changed submodule pointer resolves on its configured public URL at the recorded SHA
    (git ls-remote, all eleven).
  • Tai's parity fixtures are unchanged from dev; four conflicted determination.json files retain Tai's
    values. Upstream's low-temp rate/reason change is in the merged engine, so these fixtures may be stale —
    the CI parity run must confirm or regenerate them. This is a follow-up, not evidence that parity passes.
  • Ancestry: this sync introduces no private/alpha commits. The Tai-private alpha commit 49250fe5 is not
    an ancestor; the older local alpha commit 4e5703f4 was already part of the dev baseline and
    remains so.
  • Not verified locally: no full build, no unit or UI suite, no push. PR CI is the gate.

Known limitation: Garmin watch-command and autoISF localized strings

Tai's own localized strings for the Garmin/watch-command feature and for autoISF are absent from
dev's Localizable.xcstrings. This predates this sync: an earlier sync resolved the localization file
to upstream, and the re-add shipped on main in release 1.0.2 but was never backported to dev.

This sync again takes upstream's file unchanged, so those keys deliberately remain absent — verified at
804801c50: keys such as Enable Watch Commands, Allow Bolus Commands,
Bolus from watch is disabled. and Override started. are missing, and the catalog contains no autoISF
keys at all. Consequence: those UI surfaces fall back to the English source literal in every language.
Re-adding the strings (extracting Tai's fork strings into the catalog) is a separate dev fix and is
out of scope for this sync.

CI checklist

  • Submodules initialized before build (git submodule update --init --recursive) — SyaiKit is new
    and ten pointers moved; local working copies currently differ from the committed pointers.
  • Workspace build green: Trio.xcworkspace, scheme Trio (not the project file).
  • Unit and UI test targets pass, including the restored AlertCatalogRegistryOmniFaultTests.
  • Tai parity harness runs; the four retained determination.json fixtures are confirmed or regenerated.
  • SwiftFormat/lint job clean (SyaiKit excluded in scripts/swiftformat.sh).
  • Smoke: Syai Ultra selectable in the CGM picker; exactly one Home Statistics Panel in UI settings.

Robert merges after CI is green. The orchestrator does not merge.

Full commit list

All 60 incoming commits, oldest first (`origin/dev`..`upstream/dev`)
08fafb251 New clearer terminology for TIR and its lower threshold
cd99c253a Rename TIR Lower Threshold and refine help text
135ee8e53 Label pump-programmed boluses in History > Treatments
cde0a80ff Rename BolusStored.isPumpUI to isProgrammedByPumpUI
33e1843e6 feat(cgm): add Syai Ultra as CGM
cc8a9c01f Merge branch 'dev' into TIR-bottom-threshold
78288eb7e Use pump icon with accessibility label for pump-UI boluses in History
ecb79e574 Merge branch 'dev' into claude/busy-babbage-x2bwzo
a3c7546bd Merge branch 'dev' into feat/syai
b29cc886f Replace carb entry in a single transaction
75e44e2ef Fix inverted SMB low temp rate for sub 30m zero temps
547abe44b Fix OpenAPS golden parity test
915881e60 Close the Edit Override form when the Nightscout profile upload fails
6b94bd0a0 Document intentional deviation from oref JS in SMB low temp
6f086a96b Merge pull request #1651 from lolzivkovic/fix/inverted-smb-low-temp
d78bc8213 CI: Bump APP_DEV_VERSION to 1.0.2.15 [skip ci]
bec255f28 Merge branch 'dev' into claude/busy-babbage-x2bwzo
0c690f143 Update submodules to current upstream
9f0a1ccfd Bump LoopKit to current trio
ca6187b9b Merge pull request #1646 from ostap-korkuna/fix/edit-carb-entry-in-transaction
ab11fea57 CI: Bump APP_DEV_VERSION to 1.0.2.16 [skip ci]
c92995639 chore: update syaikit submodule
9db673308 Merge branch 'dev' into feat/syai
2420af7b8 Record the CC0 licence for the alarm sounds
7b7121b36 Bump submodules for the 22 Oct translation round
f61cefbc5 Bump LibreLoop to current upstream
165ef16b8 Merge pull request #1658 from dnzxy/docs/alarm-sound-license
3951550b8 CI: Bump APP_DEV_VERSION to 1.0.2.17 [skip ci]
0a8c2587e Bump G7SensorKit for the SystemMemoryReset reconnect fix
9b593b283 Show CGM sensor warnings whatever the sensor's age
0c511a797 Catalog the G7 sensor lifecycle alerts
2c99e1f01 Merge pull request #1656 from nightscout/chore/update-submodules-1022
3a57aef80 CI: Bump APP_DEV_VERSION to 1.0.2.18 [skip ci]
5bcbed724 Merge branch 'dev' into fix/cgm-sensor-issue-surfacing
74ee666e9 Merge branch 'dev' into feat/syai
aec0e43db feat(alerts): add Syai entries to alert catalog
457fe4890 chore: update syaikit submodule
0df3c74d9 chore: update syaikit submodule
f38186473 chore: update syaikit submodule
b66108397 chore: update syaikit submodule
cc8dd5d4b Merge pull request #1659 from dnzxy/fix/cgm-sensor-issue-surfacing
d166b09a1 CI: Bump APP_DEV_VERSION to 1.0.2.19 [skip ci]
eb3293829 Merge pull request #1558 from munchyk-loop/TIR-bottom-threshold
db974e1fc CI: Bump APP_DEV_VERSION to 1.0.2.20 [skip ci]
11f1ca357 Merge pull request #1580 from jwoglom/claude/busy-babbage-x2bwzo
02fa0cfb6 CI: Bump APP_DEV_VERSION to 1.0.2.21 [skip ci]
f672737b3 Merge branch 'dev' into feat/syai
fe95d14d7 Merge pull request #1652 from Lamercho/Lamercho/edit-override-save-dismiss
979419f0b CI: Bump APP_DEV_VERSION to 1.0.2.22 [skip ci]
3c8cf877e Bump RoundWhiteDiscKit for the SwiftFormat parse fix
4405d72a8 Merge pull request #1618 from ETolboom/feat/syai
4b4251012 CI: Bump APP_DEV_VERSION to 1.0.2.23 [skip ci]
2b8d4aee9 Rebuild glucose target profiles when the chart window passes their end
25936ebc8 Upload pump-programmed bolus flag to Nightscout
480253769 Merge pull request #1665 from Lamercho/fix/target-glucose-line-gap
938e5880e CI: Bump APP_DEV_VERSION to 1.0.2.24 [skip ci]
2ef7645cb Merge pull request #1666 from jwoglom/ccr-5a5f0336-6kkxht
aff37ac93 CI: Bump APP_DEV_VERSION to 1.0.2.25 [skip ci]
c4470012d Merge pull request #1662 from nightscout/chore/update-submodules-1024
4cc5e7b0e CI: Bump APP_DEV_VERSION to 1.0.2.26 [skip ci]

munchyk and others added 30 commits September 19, 2026 18:01
Persist LoopKit's DoseEntry.wasProgrammedByPumpUI on BolusStored as
isPumpUI (optional, default NO; covered by lightweight migration) on
both the insert and the mutable-bolus finalize paths, and show a
"Pump UI" secondary label on the treatment row next to "External".

Rows stored before this change stay unlabelled, since the flag was
never persisted for them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Fpqi9Wu9PGTDMKdoD8PSfA
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Fpqi9Wu9PGTDMKdoD8PSfA
Editing a meal deleted the old entry and inserted the replacement as two
separate Core Data commits. If the insert failed the delete was already
durable, and because the save error was only printed the edit still
reported success, so the meal was dropped locally and then from
Nightscout, Apple Health and Tidepool. A crash between the two commits
had the same effect.

Add CarbsStorage.replaceCarbs, which deletes the old meal root and its
carb equivalents and inserts the new ones on one context, committed by a
single save(). Deletes and inserts go through the context rather than
batch requests, which would commit on their own. CarbEntryMutationService
uses it for replaceMeal, so a failure now leaves the old meal in place
and skips the remote deletes.
Saving an edited override awaited uploadProfiles() before it disabled the
previous active override, refreshed the configuration and dismissed the form.
When the upload threw (e.g. unknown host, non-200 reply), the edit was saved
but the form stayed open and the follow-up steps never ran.

Upload the profiles after the dismiss, in their own do/catch, and log the
error like the other profile editors do.

Fixes #1601
- G7SensorKit: flag unusable readings as a sensor issue
- OmnipodKit: shared signal-loss test, simplified PKA view
- EversenseKit: 365 GetTxCertificate retry with inverted tx_flags
- LoopAlgorithm: per-point correction range, emulation options
- Pin G7SensorKit to feat/trio-g7-direct in the update script,
  matching .gitmodules
Carries next-dev's Core Data model (v4 to v8) and its migration. Trio
instantiates no LoopKit PersistenceController, so nothing migrates.
…ansaction

fix: replace carb entry in a single transaction
Record the CC0 licence for the alarm sounds
The status tag was gated behind the arc's 48h-to-expiry window, so a
warning or critical highlight — sensor issue, signal loss, connection
refused, sensor failed — could not reach the home screen until the last
two days of a session. Until then the user saw a stale reading and a
timestamp with no reason for either.
ETolboom and others added 28 commits October 23, 2026 18:46
 Surfaces CGM sensor problems that were reaching the user as silence.
Updates "TIR Type" setting with newer terminology for improved clarity and accuracy.
Persist wasProgrammedByPumpUI for boluses
…smiss

Close the Edit Override form when the Nightscout profile upload fails
Unblocks local builds: the format phase aborted on this package and then
reformatted excluded submodule sources.
Boluses programmed on the pump itself are stored as
BolusStored.isProgrammedByPumpUI but were not included in the
Nightscout treatment payload. Send it as isProgrammedByPumpUI on bolus
treatments (omitted when false), re-upload an uploaded row when the
flag changes on finalization, and include it in the upload-stamp check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012tnAW2LeHupxFWSc9HjqUg
Rebuild glucose target profiles when the chart window passes their end
Upload pump-programmed bolus flag to Nightscout
Bump RoundWhiteDiscKit for the SwiftFormat parse fix
Upstream 75e44e2 corrected the inverted SMB low temp rate for sub-30m
zero temps (basal * (30 - d) / 30). Four autoISF-off scenarios recorded
under the old formula now differ in rate/duration/reason only; the
"no temp required" branch flips accordingly. No algorithm source changes.
@mountrcg
mountrcg merged commit b5e9d2f into dev Oct 25, 2026
1 of 2 checks passed
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.

10 participants