Repository navigation
fix(ble): stop the 5/MG history auto-continue at 0 pages behind (experimental, untested on a strap) - #2823
Open
LeonardSEO wants to merge 1 commit into
Open
fix(ble): stop the 5/MG history auto-continue at 0 pages behind (experimental, untested on a strap)#2823LeonardSEO wants to merge 1 commit into
LeonardSEO wants to merge 1 commit into
Conversation
…es behind shouldAutoContinue takes the pages-behind value read at the start of the pass and stops at 0; nil keeps the existing behaviour. Apple re-reads GET_DATA_RANGE before each 5/MG continuation pass, as the official app does before every history round (observation from LeonardSEO/wearable5.0 FINDINGS §10). Not tested on a strap. Refs ryanbr#1992
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.
Experimental: not tested on a strap. I am opening it because the change is small and reversible, but I do not expect it to be merged before someone confirms it on a 5/MG.
What this PR does
On a WHOOP 5/MG,
shouldAutoContinuenever sees a strap timestamp (a 5/MG GET_DATA_RANGE reply carries none in the place the 4.0 path scans), so the drain relies on branch 2b ("rows were persisted") alone and keeps re-kicking until the cap. The strap does report its ring backlog,pagesBehind, which is already decoded but diagnostic only.shouldAutoContinuetakes an optionalstrapPagesBehind. When it is0the drain stops.nil(not read this pass) keeps today's behaviour exactly.Source: the observation that the official app re-queries GET_DATA_RANGE before every history round (about every 600 s in an overnight iOS capture) comes from LeonardSEO/wearable5.0 (FINDINGS §3 and §10), an independent 5/MG protocol library built on NOOP's protocol docs.
Type of change
How it was tested
BackfillContinuationTests/BackfillContinuationTest:0pages behind stops, a backlog or no reading keeps today's decision../gradlew testFullDebugUnitTest: 6689 tests, all pass apart from the 2RecoveryDriversTesthalf-tie cases that fail the same way on unmodifiedmain.Tools/i18n_audit.py --ci,Tools/doc_comment_lint.py,docs/protocol-exampleschecks andTools/parity_ledger.py --refresh-derived(derived snapshots included): pass.Toolsunit tests, the parity acceptance suite and the R-R contract: pass apart from the 4test_check_source_referencescases (/varvs/private/vartemp path on macOS) that fail the same way on unmodifiedmain.Strand) builds with this change on my development branch;StrandTestsand the iOS target were not run locally for this branch.app-build.ymlcovers both.Not tested on hardware. I do not have a 5/MG strap for this. What would confirm it: a 5/MG strap log with a deep backlog showing the drain ending on the new line once
Strap backlog pages behind: 0is logged, instead of running to the cap.Checklist
android/(apart from the 2RecoveryDriversTesthalf-tie cases that fail the same way on unmodifiedmain)StrandDesign/Palette/Metricstokensdocs/CONTRIBUTING.mdStrand.xcodeproj/) or any secrets/keystoresRelated issues
Refs #1992
🤖 Generated with Claude Code