Skip to content

Keep workouts running offline and fill metrics after strap sync - #24

Closed
AlexSchmidt1999 wants to merge 5 commits into
codex/upstream-sync-oct09from
codex/offline-training
Closed

AlexSchmidt1999 wants to merge 5 commits into
codex/upstream-sync-oct09from
codex/offline-training

Conversation

@AlexSchmidt1999

@AlexSchmidt1999 AlexSchmidt1999 commented Oct 9, 2026 •

Copy link
Copy Markdown
Owner

Leaving Bluetooth range must not pause an intentional workout, and a workout without live HR/GPS must remain saved for later strap history.

The shared training coordinator suspends pulse deadlines and reminders while disconnected. Reconnection grants a fresh ten-minute window without treating the connection as a pulse receipt. Existing manual pauses remain explicit; accepted unchanged pulse values still count as fresh receipts.

Normal recorded workouts now save their interval with missing metrics instead of disappearing. A local, bounded history ledger keeps recorded workouts and Lift Log eligible for successive sync chunks through the existing rescorer. Stored pause intervals are excluded from scoring. Stream fingerprints avoid repeated work, scoring runs off the main actor, failed writes remain retryable, and hand-entered metric edits remain authoritative. No database migration, dependency, network endpoint or BLE command is added. Apple integration only; analytics formulas are unchanged and Android is not modified or built.

Validation: 52 focused macOS app tests passed, including 599/600-second boundaries, disconnected restore/reconnect, empty-HR workout persistence, failed-save retry, successive chunks, active device namespaces, manual edits, paused samples through the full analysis pass, and existing Today/sync layout tests. Source policy, translation coverage, doc-comment hygiene and diff checks passed. The final unsigned iOS Release app/widgets/watch build and binary policy passed (four bundles). NOOP 12.0.0 build 448 was locally signed, installed and launched on the paired iPhone with the existing bundle identity; the installed build was verified. Install provenance is retained locally with the exact commit and executable hashes. GitHub Actions remains disabled by GitHub for this fork's Actions usage; no CI success is claimed.

The Dynamic Island and centered Today pending-sync fixes are merged into the PR base. This PR provides their combined Apple test version as build 448. The real strap out-of-range scenario still needs the owner's device test; a disconnected phone cannot determine whether the strap is worn.

@AlexSchmidt1999

Copy link
Copy Markdown
Owner Author

Closing this older fork test PR. Its full head (fb1b26f0516f) 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 #2760, #2761.

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