Skip to content

Bump Loop and LoopAlgorithm: show and record what Guard + Runway did - #560

Merged
ps2 merged 1 commit into
next-devfrom
bump/next-dev-guard-and-runway-display
Oct 25, 2026
Merged

ps2 merged 1 commit into
next-devfrom
bump/next-dev-guard-and-runway-display

Conversation

@ps2

@ps2 ps2 commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

Bumps on next-dev:

With Guard + Runway on, the Predicted Glucose screen gets a Guard + Runway row. It shows how far the forecast was lowered and whether the automatic dosing target was lowered. Checking or unchecking the row draws the comparison curve with or without the guard. The Retrospective Correction row notes when the post-low rise cut is active.

Each dosing decision now records what Guard + Runway did (volatility, band depth, runway shift, rise cut), and those values are uploaded to Nightscout and Tidepool with the decision. Nothing changes for anyone with the experiment off.

- LoopKit/LoopAlgorithm#12: AlgorithmOutput.guardAndRunway
- LoopKit/LoopAlgorithm#13: Report the guard band's actual depth
- LoopKit/Loop#2611: Show and record what Guard + Runway did
@marionbarker

Copy link
Copy Markdown
Contributor

Test

✅ The change in this PR is to report the effect of Guard + Runway if it is enabled

  • This is not a test on the capabilities of the new algorithm experiment

Configuration

Start with LoopWorkspace, next-dev, commit 32fdf0d

  • Point to Loop dev branch
  • Point to LoopAlgorithm main branch
% git diff -- Loop LoopAlgorithm 
diff --git a/Loop b/Loop
index c057065..417d966 160000
--- a/Loop
+++ b/Loop
@@ -1 +1 @@
-Subproject commit c0570656963c80bb299386d6bfada715e3973512
+Subproject commit 417d96694d60390f2ceddbd0e6cba76bf0c454bb
diff --git a/LoopAlgorithm b/LoopAlgorithm
index 273fcfe..3e5c268 160000
--- a/LoopAlgorithm
+++ b/LoopAlgorithm
@@ -1 +1 @@
-Subproject commit 273fcfe99f190692656dc66391f6d25d644374e9
+Subproject commit 3e5c26838cd7cea0f4763223ec1898d46f829d78

Test Details

The test phone, SE 3rd gen, iOS 27.0.1, was running the default next-dev, commit 32fdf0d overnight with a glucose pattern consistent with an unannounced meal. (Note the glucose pattern is fixed, and does not respond to the amount of insulin delivered.)

The setting on the phone for algorithm experiments are:

  • Guard + Runway enabled
  • GBPA disabled
  • IRC disabled

Nightscout Dashboard

The screenshot shows the Nightscout dashboard. I figured the predicted decrease in glucose was from the Guard + Runway. That is confirmed by the updated report in the Glucose Prediction view of Loop.

Screenshot 2026-10-25 at 9 33 38 AM

Loop Glucose Prediction

The screenshots below are from the Loop Glucose prediction screen

  • left screenshot is the plot with the checkmark for the guard + runway removed
    • this show that without guard + runway, the prediction would be flat instead of below target
  • right screenshot has the reported change in forecast
workspace-pr560-guard-runway

@ps2
ps2 merged commit 28f25d2 into next-dev Oct 25, 2026
1 check 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.

2 participants