Repository navigation
fix(session): bound the sensor sync wait and fail closed - #134
Closed
shroominic wants to merge 1 commit into
Closed
shroominic wants to merge 1 commit into
shroominic wants to merge 1 commit into
Conversation
<
8000
div data-view-component="true" class="TimelineItem-body">
A connected sensor whose frames never decode parked setup on "Syncing sensor history" forever: the Cbio session enables FF31 notifications, one five-byte reply fails the offline parser with reason `length`, and the passive timer has already been cancelled, so no further state arrives. Sessions now arm a 45-second bounded wait for the first readable result while they sit in the syncing stage and have no decodable data. When the deadline elapses the host publishes a terminal error snapshot carrying `cgm.session.syncStalled`, blocks automatic reconnect, and the connect screen shows a next action instead of a spinner. Drivers that own their terminal outcome (Libre 2 phases) or an in-progress history sync are left untouched, and the Cbio driver's fail-closed write discipline is unchanged.
This was referenced Sep 17, 2026
Owner
Author
|
Carried by the GS1 consolidation in PR #209 (branch feature/cbio-gs1, head 3eca4f4). This PR is contained in the consolidated line; the merge that carries it is c85f827. Closing as subsumed by the consolidation - not as won't fix. The per-defect evidence stays in this thread, and the carrying commit above is where the change now lives. |
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.
Closes #133. Stacked on
feature/cbio-gs1-live.Problem
A connected sensor that never returns a decodable frame parked setup on
"Syncing sensor history" forever. On the real SIBIONICS/CBio GS1 sensor the
link came up, FF31 notifications were enabled, one five-byte reply failed the
offline parser with reason
length, and the passive timer had already beencancelled — so no further session state arrived and the card never changed.
Change
The host now owns a bounded wait for the first readable result.
CgmAppControllerarms a 45-second deadline while a live session sits in thesyncing stage with no decodable data.
cgm.session.syncStalled, blocks automatic reconnect, and stops acceptingfurther syncing snapshots until the driver reports data, an error, or a
disconnect.
and a next action: Try again / Choose another sensor.
terminal outcome) and in-progress history syncs (bounded, driver-owned) are
not bounded.
read discipline.
Copy
No reading from this sensorThis sensor didn't return a readable reading. Try again, or choose another sensor. Some sensor models are not supported yet.Sensor sent no readable readingTests
openhealth/test/session_sync_failure_test.dart(written RED first):Verification:
./scripts/flutter-workspace.sh test-unitgreen (477 openhealthtests plus every package),
analyzeclean,format-checkclean.Device gap
The debug APK was rebuilt (
make build-androidgreen) and installed on thePixel 6, and the app was driven to the nearby-sensor scan, but the GS1 sensor
did not advertise during that window, so a live connect could not be observed
on-device. The bounded failure is covered by the widget tests above. Scan-state
completion is a separate lane tracked in #129.