Repository navigation
Report what Guard + Runway did in AlgorithmOutput - #12
Merged
Merged
Conversation
AlgorithmOutput.guardAndRunway carries the run's volatility (σ5), whether the volatility band was applied or kept off by active carbs, its depth at the 60 min horizon, the runway's aim shift and whether the post-low rise cut is active. guarded(_:) applies the same band to another forecast, so a display can compare forecasts with and without it.
This was referenced Oct 25, 2026
Trpl7ca
pushed a commit
to Trpl7ca/LoopWorkspace
that referenced
this pull request
Oct 25, 2026
- 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
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
AlgorithmOutput.guardAndRunwayso Loop can show what Guard + Runway did on the Predicted Glucose screen.It's set when the
guardAndRunwayexperiment ran and dosing was recommended:volatility: σ5 for this run, mg/dLbandApplied: false when active carbs kept the volatility band offbandDepth: how far the band lowers the forecast at 60 min, mg/dL (0 when off)bandGain: the band's depth multiplier from the volatility baselinerunwayShift: how far the automatic-dosing target was lowered, mg/dLpostLowRiseCutActive: whether the post-low cut is scaling down rising RCguarded(_:): applies the same band to another forecast, so a display can draw the comparison curve with or without itNothing about dosing changes. The output is nil without the experiment, and the fixture encoding is unchanged. Tests extend the existing experiment tests;
swift testpasses (179).