fix: collapse mobility context to one applicability boundary - #4
Merged
Conversation
Two corrections to 0.2.0, both found by checking the behavior against Apple Watch rather than reasoning from the metric names. `stand_hours` is no longer removed by any context. In wheelchair mode Apple Watch turns the Stand ring into a Roll ring, counting hours that contain at least a minute of movement against the same daily goal, so hourly movement stays observable. The 0.2.0 table was wrong to drop it. With that fixed, `assistedAmbulation` and `nonAmbulatory` removed exactly the same instruments, so the distinction described no distinct behavior. They are replaced by a single `assistedMobility` case covering weight-bearing walking aids and wheeled mobility, which is where the evidence actually draws the line: step and gait detection fails for both, while cane use stays within reported measurement noise and remains `ambulatory`. Callers on 0.2.0 map both removed cases to `assistedMobility`. Encoded profiles carrying a removed raw value decode to `ambulatory` through the existing decodeIfPresent default. Behavior for `ambulatory` is unchanged and golden fixtures are unchanged. Signed-off-by: Stefano Novelli <murdercode@gmail.com>
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 corrections to 0.2.0, both found by checking behavior against Apple Watch instead of reasoning from metric names.
1.
stand_hoursshould never have been removedIn wheelchair mode Apple Watch turns the Stand ring into a Roll ring, counting hours that contain at least a minute of movement against the same daily goal. Hourly movement stays observable, so removing it discarded a valid signal. The 0.2.0 applicability table was wrong on this point.
2. The third case described no distinct behavior
With
stand_hoursrestored,assistedAmbulationandnonAmbulatoryremoved exactly the same nine instruments. A case that changes nothing is a case that misleads, so both are replaced by oneassistedMobilitycovering weight-bearing walking aids and wheeled mobility.That is where the evidence draws the line anyway: step and gait detection fails for walkers, crutches and wheels alike, while cane use stays within reported measurement noise (~2% wrist error) and remains
ambulatory.ambulatoryassistedMobilitystand_hoursMigration
Callers on 0.2.0 map both removed cases to
assistedMobility. Encoded profiles carrying a removed raw value decode toambulatorythrough the existingdecodeIfPresentdefault. Behavior forambulatoryis unchanged; golden fixtures unchanged.41 tests pass.