Repository navigation
fix(cbio): disclose the positions the stored history never received - #188
Merged
Merged
Conversation
This was referenced Sep 18, 2026
shroominic
added a commit
that referenced
this pull request
Sep 18, 2026
Merges fix/cbio-history-holes (#188). The one conflict was additive: the aggregate's closed-failure sentence test and the branch's hole-caption tests both insert at the same point, so both are kept. No credential, address, or vendor material is added by this merge.
Owner
Author
|
Rebase reminder (comment only, no edits to this branch). The lane head is now
Rebase onto |
shroominic
force-pushed
the
fix/cbio-history-holes
branch
from
September 18, 2026 09:41
f483880 to
8e44316
Compare
shroominic
force-pushed
the
fix/cbio-history-holes
branch
from
September 18, 2026 09:43
8e44316 to
b0dc99f
Compare
This was referenced Sep 18, 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.
Closes #187.
The defect
cbioStoredRangeTextreportedcount + first–last, which is an envelope, notwhat the app stored. The protocol's
indexcounter advances one per storedminute, so a span can contain positions that never arrived. Five records at
1, 2, 3, 6, 7 were captioned "sensor minutes 1–7".
RED
Both runs are against
17db5b4, the base this branch forks.GREEN
Same two commands on this branch:
exit 0,+1: All tests passed!each.The fix
cbioMissingPositions(readings)answers the question the caption was missing:distinct sensor positions, their span, and the difference. It works from the
readings the surface already has, so no new snapshot field or archive
plumbing is needed - the same arithmetic
CbioHistoryArchive.hasGapperformsat ingest time.
cbioStoredRangeTextappends the count when it is non-zero:5 readings stored · sensor minutes 1–7 · 2 positions not received.every contiguous history keep the caption they had.
Tests added
the stored range names a hole instead of printing an envelope- a full span,a holed span, and a single record.
the dashboard names a hole in the stored history- the real widget, found byits
ValueKey('cbioStoredRange'), asserts the rendered text.Observed, not fixed here
A hole also pins
historySync.inProgressto true forever, becauseCbioGlucoseSession._atLiveEdgereturns false whenCbioHistoryArchive.hasGap.The history section therefore shows "Fetching sensor history: 5 of 16 records"
for a fetch that is finished but holed. That is a different defect in the sync
contract - it is
inProgressconflating "still fetching" with "not at the liveedge" - and it changes when the session persists history and when
ensureFreshDatacatches up, so it is deliberately left out of this captionfix. The card now names the hole in the meantime.
Verification
cd openhealth && flutter test- exit 0,+482: All tests passed!flutter analyze-No issues found!dart formaton every line this branch adds - no change