Repository navigation
fix: detect the Minimed Flex pump (#91) - #93
Merged
Merged
Conversation
The Flex (MMT-8062/8063/8082-8085, "Minimed Flex") is already shipping and reported live upstream (domien-f#3): silent zero-data fetch after a 780G-to-Flex upgrade. Neither its family string nor its models match anything in BLE_DEVICE_MODELS, so isBleDevice() returns false and the bridge falls back to monitor/data, which returns {} for BLE devices. - Six Flex model prefixes, labelled INFERRED from the vendor bundle. - The FLEX family token as a deliberate substring test (unlike BLE, which is prefix-only): audited that FLEX is not a substring of any other known family value, with the reasoning recorded next to the code. - Call-site test proving a family-only Flex payload takes the BLE endpoint and never touches connect/data (verified to fail with the token removed). Tests: 246 passing (baseline 242). tsc --noEmit clean.
NovaLux12
force-pushed
the
fix/flex-detection-91
branch
from
October 9, 2026 12:42
8fde156 to
c93ac46
Compare
NovaLux12
added a commit
that referenced
this pull request
Oct 9, 2026
Medtronic publishes the complete device-family vocabulary, unauthenticated, at GET /patient/v2/configuration/public — the same host the bridge already talks to. #93 added the six Minimed Flex model prefixes and, alongside them, guessed the family token as a FLEX substring match. The published document settles it. personal.device.family.to.model.mapping lists sixteen families, and system.settings.transfer.feature.config.device.mapping independently maps "CC880" to the display name "MiniMed™ Flex". So CC880 is the Flex family, and the six models #93 added do appear under it. isBleDevice() now matches the exact published token CC880, so a family-only payload is detected without relying on deviceModel being present. Before this, isBleDevice('CC880', undefined) returned false — reproducing #91's silent zero-data fetch, the failure mode a Flex user actually hits, since monitor/data returns deviceFamily while medicalDeviceFamily is undefined on the patient path and models are not guaranteed. The FLEX substring match is kept as a fallback for the display-name spelling the vendor also publishes ("Minimed™ Flex"), on the same reasoning that SIMPLERA_SYSTEM may arrive as "Simplera™ system". Audited against all sixteen published families: none contains FLEX, so no real device is misrouted today, and CC880 detection never depended on it since that token has no FLEX in it. The residual looseness — a substring match also accepts nonsense like "REFLEX" — is documented rather than eliminated and is deliberately not pinned as a contract, so a later contributor can tighten the matcher without rewriting an assertion that enshrined it. New test classifies the entire published vocabulary: all sixteen families, each with its expected verdict and a stated reason. CC840, EAGLE, GST, NMX7, NMX8, GM and INSTINCT are deliberately left unmatched — nothing confirms they are BLE-paired, and routing a non-BLE device down the BLE endpoint is its own silent failure. The table means a family Medtronic adds later is a decision someone makes rather than a gap that surfaces weeks later as "the bridge uploaded nothing". Its completeness check is a self-consistency guard, not a vendor-change detector, and is labelled as such. Caveat: this is Medtronic's published configuration, not an observation of a monitor/data response. It establishes the vocabulary, not which field carries it or in what casing. #81 stays open until a token confirms. Tests: 323 passing (baseline 298). npm run typecheck clean.
NovaLux12
added a commit
that referenced
this pull request
Oct 9, 2026
Medtronic publishes the complete device-family vocabulary, unauthenticated, at GET /patient/v2/configuration/public — the same host the bridge already talks to. #93 added the six Minimed Flex model prefixes and, alongside them, guessed the family token as a FLEX substring match. The published document settles it. personal.device.family.to.model.mapping lists sixteen families, and system.settings.transfer.feature.config.device.mapping independently maps "CC880" to the display name "MiniMed™ Flex". So CC880 is the Flex family, and the six models #93 added do appear under it. isBleDevice() now matches the exact published token CC880, so a family-only payload is detected without relying on deviceModel being present. Before this, isBleDevice('CC880', undefined) returned false — reproducing #91's silent zero-data fetch, the failure mode a Flex user actually hits, since monitor/data returns deviceFamily while medicalDeviceFamily is undefined on the patient path and models are not guaranteed. The FLEX substring match is kept as a fallback for the display-name spelling the vendor also publishes ("Minimed™ Flex"), on the same reasoning that SIMPLERA_SYSTEM may arrive as "Simplera™ system". Audited against all sixteen published families: none contains FLEX, so no real device is misrouted today, and CC880 detection never depended on it since that token has no FLEX in it. The residual looseness — a substring match also accepts nonsense like "REFLEX" — is documented rather than eliminated and is deliberately not pinned as a contract, so a later contributor can tighten the matcher without rewriting an assertion that enshrined it. New test classifies the entire published vocabulary: all sixteen families, each with its expected verdict and a stated reason. CC840, EAGLE, GST, NMX7, NMX8, GM and INSTINCT are deliberately left unmatched — nothing confirms they are BLE-paired, and routing a non-BLE device down the BLE endpoint is its own silent failure. The table means a family Medtronic adds later is a decision someone makes rather than a gap that surfaces weeks later as "the bridge uploaded nothing". Its completeness check is a self-consistency guard, not a vendor-change detector, and is labelled as such. Caveat: this is Medtronic's published configuration, not an observation of a monitor/data response. It establishes the vocabulary, not which field carries it or in what casing. #81 stays open until a token confirms. Tests: 323 passing (baseline 298). npm run typecheck clean.
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.
Summary
The Minimed Flex pump (MMT-8062/8063/8082/8083/8084/8085) is already shipping and reported live upstream (domien-f#3, where a minimal version of this fix is also proposed as upstream PR #5): silent zero-data fetch after a 780G-to-Flex upgrade.
Neither the Flex family string nor its models match anything the bridge recognises, so
isBleDevice()returns false and the account falls back tomonitor/data, which returns{}for BLE-era devices.Closes #91.
FLEXfamily token as a deliberate substring test — unlikeBLE, which is prefix-only because it is a substring of ordinary words. Audited:FLEXis not a substring of any other known family value (GUARDIAN,NGP,CGM,CC,PARADIGM,BLE_*,SIMPLERA*); the reasoning is recorded next to the code.connect/data.Verification
Revert-verified: removing the six rows fails the model test; removing the
FLEXtoken fails both the family test and the call-site test (which then resolves the monitor payload instead of the BLE payload — the exact upstream symptom). Both spellings INFERRED, unverified on the wire.