Repository navigation
fix(autoisf): unlock lgsThreshold pref + remove SMB objective gate - #4
Merged
Merged
Conversation
Mainline ships the lgsThreshold override commented out in the autoISF determine_basal (DetermineBasalSMB keeps it active), so the user's Low Glucose Suspend threshold setting silently did nothing whenever autoISF was the active APS — the suspend floor fell back to the target-derived default (~4.4 mmol at target 6.5). Re-enable the block, identical to the SMB plugin's, so the pref can raise the floor. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ing objectives isSMBModeEnabled forced SMB off whenever the SMB objective was not started. After the CamAPS->autoISF switch that objective was never started, so SMB was silently disabled for an experienced operator who has run SMB on this loop before — autoISF ran basal-only for days. Remove the objective- progression gate. SMB is still gated by closed-loop (SafetyPlugin) and the use_smb preference, so the real safety checks are untouched. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This was referenced Nov 20, 2026
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.
Two independent fixes that make the autoISF plugin behave as an experienced operator expects.
1. Honour the lgsThreshold preference (was inert)
Mainline ships the lgsThreshold override commented out in
DetermineBasalAutoISF.kt, whileDetermineBasalSMB.ktkeeps it active (both from base commit43cc754677). So the user's Low Glucose Suspend threshold silently did nothing whenever autoISF was the active APS — the suspend floor fell back to the target-derived default (min_bg − 0.5·(min_bg−40), ≈4.4 mmol at target 6.5). Re-enabled the block, identical to the SMB plugin's. The pref still only raises the floor above the derived value.2. Remove the SMB objective gate
ObjectivesPlugin.isSMBModeEnabledforced SMB off unless the SMB objective was started. After a CamAPS→autoISF switch that objective was never started, so SMB was silently disabled for days and autoISF ran basal-only. Removed the objective-progression gate. SMB is still gated by closed-loop (SafetyPlugin) and theuse_smbpreference, so the real safety checks are untouched. Test updated accordingly.Testing
:plugins:aps+:plugins:constraintscompile;ObjectivesPluginTestupdated + passing.loopAPK and installed live (3.4.2.3-hovorka-autoisf-unlock): loop looping, no moreObjective 8 not started, algorithm now logsSMB requested.🤖 Generated with Claude Code