Skip to content

Add durable training pauses and retryable saves - #10

Closed
AlexSchmidt1999 wants to merge 2 commits into
codex/today-smooth-syncfrom
codex/training-pause-guard
Closed

AlexSchmidt1999 wants to merge 2 commits into
codex/today-smooth-syncfrom
codex/training-pause-guard

Conversation

@AlexSchmidt1999

Copy link
Copy Markdown
Owner

Normal workouts and Lift Log can pause explicitly without toggling a paused session back on. Lift clocks/rest warnings freeze, typed inputs survive restoration, and stored active workout duration excludes pauses.

Both save paths await successful storage before clearing the session. Failed saves keep the paused session available; Lift retry IDs are stable, and external callers can save only completed sets without modifying a program template. Normal workout scoring uses an immutable snapshot away from the main actor.

The shared 600-second pulse guard uses the existing accepted-live-packet funnel, including new packets with equal bpm. Its iPhone activation and external controls are in the following stacked PR. Existing coaching Live Sessions retain their original auto-end deadline basis. No database migration, backup-key change, destructive BLE command or new dependency is introduced. Scope is Apple only.

Validation: macOS app tests and iOS device builds passed locally. Focused tests cover pulse freshness/599–600 seconds, restoration, pause/resume/undo and frozen Lift clocks, preserved pending input/RPE, and an injected SQLite write failure followed by an idempotent retry. Accepted live packet and CRC tests passed. Hardware BLE behavior remains to be tested with the owner's strap.

Stacked on the Today/sync fix for the fork test build. No upstream PR is requested yet.

@AlexSchmidt1999

Copy link
Copy Markdown
Owner Author

Closing this older fork test PR. Its full head (1f1a13d8e4e9) is included in the combined test branch. New test-version work continues in #28. The branch and commits are kept.

The relevant changes are now submitted for upstream review in #2759.

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.

2 participants