Repository navigation
fix: preserve recovery time across body map reads - #94
Merged
Merged
Conversation
Keep recovery reads derived from the stored baseline and refresh elapsed recovery before recording another workout. Add deterministic polling tests and document the snapshot behaviour. Co-authored-by: OpenAI Codex <noreply@openai.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.
Frequent body map reads discarded elapsed recovery time, so hourly polling could leave a sore region stuck indefinitely. BodyMapManager now derives each read from its stored baseline. Recording a workout refreshes elapsed recovery before applying fatigue, and the injected clock also controls recording and reset.
Part of #5.
Closes #93.
Verification passed on commit 3167cd6.
mise run lint- passed, 490 warnings and zero serious violations across the existing repository.mise run build- passed.mise run test- passed, including pipeline smoke tests and both Swift test frameworks.git diff --cached --check- passed before commit.Unit-test transcript provides proof for this package-only change. The regression suite failed against the original read mutation, including sore regions remaining sore after 72 hourly reads, before the snapshot fix.
No UI files or layout changed. Recovery status consumers receive the corrected elapsed-time results. A simulator screenshot does not demonstrate the 72-hour behaviour; deterministic unit tests provide the proof. Local iOS UI tests were not run for this core-only slice; repository CI runs the iOS build, UI coverage and mobile e2e gates.
Recovery still uses a shared timestamp across regions, and direct mutating BodyMapRecovery updates consume that value's baseline. Per-region timestamps and restoring persisted recovery during facade startup remain outside this slice. Epic #5 stays open.
Repository CI is green for the same commit.
ui-tests-xcresultartifact.e2e/tests/helpers.ts:60, then passed on retry Implement BetterFit iOS strength training coach core framework #1. Evidence was added to the existing Stabilise first app launch in mobile e2e on CI #62 launch-readiness issue; no test retries or assertions changed in this PR.