Skip to content

fix: collapse mobility context to one applicability boundary - #4

Merged
murdercode merged 1 commit into
mainfrom
fix-mobility-context-boundaries
Aug 10, 2026
Merged

fix: collapse mobility context to one applicability boundary#4
murdercode merged 1 commit into
mainfrom
fix-mobility-context-boundaries

Conversation

@murdercode

Copy link
Copy Markdown
Contributor

Two corrections to 0.2.0, both found by checking behavior against Apple Watch instead of reasoning from metric names.

1. stand_hours should never have been removed

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. 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_hours restored, assistedAmbulation and nonAmbulatory removed exactly the same nine instruments. A case that changes nothing is a case that misleads, so both are replaced by one assistedMobility covering 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.

ambulatory assistedMobility
step- and gait-derived (9 metrics) applies not observable
stand_hours applies applies

Migration

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; golden fixtures unchanged.

41 tests pass.

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>
@murdercode
murdercode merged commit 6ed5852 into main Aug 10, 2026
5 checks passed
@murdercode
murdercode deleted the fix-mobility-context-boundaries branch August 10, 2026 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant