Skip to content

fix(oura): refresh Last seen on authenticated ring sessions - #2767

Open
kavemang wants to merge 1 commit into
ryanbr:mainfrom
kavemang:agent/oura-last-seen-2739
Open

kavemang wants to merge 1 commit into
ryanbr:mainfrom
kavemang:agent/oura-last-seen-2739

Conversation

@kavemang

@kavemang kavemang commented Oct 11, 2026 •

Copy link
Copy Markdown

What this PR does

An Oura ring's Devices card keeps showing its original pairing time as “Last seen” because later sessions never update the registry sighting. Observe the existing authenticated-session phase on Apple and Android and refresh only that source's captured registry id. Failed connection attempts do not count; repeated phase publications count once, and a later authenticated reconnect counts again even with no new history.

The observation is cancelled with the source. This does not change BLE commands, authentication, reconnect sequencing, scoring, schema or visual tokens. The timestamp records the most recent confirmed session rather than every packet or a failed scan.

Type of change

  • Bug fix

How it was tested

  • Three Kotlin regression methods passed locally using the verbatim production ouraSightings helper and LinkPhase declaration, pinned Kotlin 1.9.24/JDK 17/coroutines 1.8.1/JUnit 4.13.2. This bounded harness does not compile the full Android app or exercise Bluetooth.
  • Private mutations removing duplicate suppression and counting AUTHENTICATING instead of AUTHENTICATED were rejected by one and three methods respectively.
  • Added Apple tests through the production Combine publisher and real in-memory registry: failed connections, correct row and published Devices state, duplicate notifications, reconnect without history and cancelled observation. A second test covers an already-authenticated source. Both new Apple methods passed in native macOS StrandTests at the PR head; Apple builds/tests were run by CI rather than locally on Linux.
  • Core Tools: 153 tests passed. Source hygiene and whitespace pass. Diff-scoped i18n passes.
  • Verified the unchanged head 532e17a4901745b014d74a9c2f429e03ff8d3c1f: a stable complete roster of six successful checks, including native Android app compilation/APK build and full testFullDebugUnitTest, universal macOS Strand build and StrandTests, iOS NOOPiOS build, Tools Python, hygiene and i18n.
  • macOS executed 2,281 tests, with two skipped and zero failures; both new OuraLastSeenTests methods passed explicitly. iOS validation is compile-only; its test step is skipped by design. XcodeGen generation included the new test via the existing source glob. No warning names the changed source/test files in the inspected native logs.
  • CI's merge-current-main steps were skipped; evidence validates this PR head rather than a speculative merge with later main changes.
  • No ring hardware was available; no on-device connection or reconnect claim is made. The change observes the existing successful-session signal and writes local registry metadata only.

Checklist

  • Android full native unit suite passes
  • Apple builds and macOS StrandTests pass
  • No warnings naming changed source/test files in inspected native logs
  • No hardcoded hex frame bytes
  • No UI styling changes
  • Follows docs/CONTRIBUTING.md
  • No generated artifacts or secrets committed
  • Both platforms updated

Related issues

Refs #2739

@kavemang
kavemang marked this pull request as ready for review October 11, 2026 01:34
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