Skip to content

feat(spo2): show the 5/MG SpO2 strap reading by default (experimental, not expected to merge) - #2826

Open
LeonardSEO wants to merge 1 commit into
ryanbr:mainfrom
LeonardSEO:feat/spo2-strap-reading-default-on
Open

LeonardSEO wants to merge 1 commit into
ryanbr:mainfrom
LeonardSEO:feat/spo2-strap-reading-default-on

Conversation

@LeonardSEO

Copy link
Copy Markdown

Experimental, and I do not expect this one to be accepted: it turns on by default a value the project deliberately keeps behind a default-off toggle until cross-device evidence agrees. I am opening it so the choice is visible; feel free to close it.

What this PR does

  • The SpO2 candidate display toggle defaults to on (an explicit off still wins). Apple: PuffinExperiment.spo2CandidateDisplayEnabled and the Settings @AppStorage default; Android: NoopPrefs.spo2CandidateDisplay and its flow.
  • The caption "strap estimate (unverified)" becomes "strap reading" in the Blood Oxygen tile and readouts, in all locales.
  • The Health screen hint no longer says the estimate is "off by default".
  • Nothing about the value changes: it is still never written to spo2Pct and never scored.

Reasoning: the strap computes this value itself during sleep (R18 byte 82, measured in 30 s windows every 1,200 s; the firmware logs "generated a valid SPO2 during sleep"), per LeonardSEO/wearable5.0 FINDINGS §13. It has still not been compared with the official app's SpO2 for a captured night.

Type of change

  • New feature

How it was tested

  • VitalReadingsTableTests and VitalSourceResolutionTests updated for the new caption; the Android caption test reads the resource, which keeps its id.
  • ./gradlew testFullDebugUnitTest: 6688 tests, all pass apart from the 2 RecoveryDriversTest half-tie cases that fail the same way on unmodified main.
  • Tools/i18n_audit.py --ci, Tools/doc_comment_lint.py, docs/protocol-examples checks and Tools/parity_ledger.py --refresh-derived (derived snapshots included): pass.
  • Tools unit tests, the parity acceptance suite and the R-R contract: pass apart from the 4 test_check_source_references cases (/var vs /private/var temp path on macOS) that fail the same way on unmodified main.
  • Apple: the macOS app (Strand) builds with this change on my development branch; StrandTests and the iOS target were not run locally for this branch. app-build.yml covers both.

Checklist

  • Swift package tests pass for any package I touched (none touched)
  • Android unit tests pass if I touched android/ (apart from the 2 RecoveryDriversTest half-tie cases that fail the same way on unmodified main)
  • No new build warnings introduced (Android: none; Apple warnings not checked per branch)
  • UI changes use only StrandDesign / Palette / Metrics tokens
  • No hardcoded hex frame bytes; protocol facts live in the schema / decoders
  • Follows the conventions in docs/CONTRIBUTING.md
  • I did not commit generated output (Strand.xcodeproj/) or any secrets/keystores

Related issues

Refs #103

🤖 Generated with Claude Code

The strap computes the value itself (LeonardSEO/wearable5.0 FINDINGS §13). Still never written to spo2Pct and never scored; an explicit off still wins.

Refs ryanbr#103
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