feat(testcentre): master "Diagnostics capture" switch to gate on-device research artifacts#702
Open
pipiche38 wants to merge 2 commits into
Open
feat(testcentre): master "Diagnostics capture" switch to gate on-device research artifacts#702pipiche38 wants to merge 2 commits into
pipiche38 wants to merge 2 commits into
Conversation
pipiche38
force-pushed
the
diagnostics-capture-toggle
branch
2 times, most recently
from
July 24, 2026 17:47
c115a41 to
bc61f9f
Compare
…ce research artifacts The app writes several research artifacts to <App Support>/OpenWhoop/Diagnostics with no user control: the Oura Tier-B JSONL sidecars (oura-activity today; oura-ibihr / oura-raw on their own branches) plus the WHOOP 5/MG raw-frame capture. The Oura sidecars were always-on, so the folder fills up during normal use. Add a single "Diagnostics capture" master switch in the Test Centre → Diagnostic tools (default OFF, opt-in), so nothing is captured unless a tester turns it on for a session: - New shared pref key `noopDiagnosticsCapture` (Swift PuffinExperiment.diagnosticsCaptureKey / Kotlin PuffinExperiment.KEY_DIAGNOSTICS_CAPTURE) — same string both platforms. - Oura sidecar creation (OuraLiveSource, both platforms) is gated on the master switch, so the default-off state writes no sidecar file. - WHOOP raw-frame capture ORs the master into its existing gate via `rawCaptureActive` (= per-strap enableRawCapture/isCaptureEnabled OR the master), so the master turns raw capture on too while the independent per-strap flag keeps working. The on-demand bounded raw-capture window is untouched (always honoured). - Test Centre toggle on both platforms (Swift @AppStorage, Kotlin Switch), mirroring the existing PuffinExperiment cross-platform idiom. All new UI copy is fully localized — no hardcoded strings: the two toggle strings are extracted to Strand/Resources/Localizable.xcstrings (Apple) and values/strings.xml + values-de/es/fr/zh (Android), passing Tools/i18n_audit.py --ci. Takes effect on the next ring/strap connection (read where each dump/capture is created). No protocol change; the raw-capture edits only widen a read-only capture gate. Behavior change: the Oura activity/MET sidecar was always-on and is now OFF by default. Built: Strand macOS BUILD SUCCEEDED; Android compileFullDebugKotlin clean; i18n audit green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016DN6cU2ERWZUS9tWYCjPvi
The Diagnostics-capture switch's copy was added without pt-PT, which the i18n gate (now that `main`'s LANGS includes pt-PT) flags on both platforms: `Strand/Resources/Localizable.xcstrings` pt-PT missing=2 and `values-pt-rPT/strings.xml` missing the two keys. Add the European-Portuguese translations of "Diagnostics capture" and the research-artifacts explainer. `python3 Tools/i18n_audit.py --ci origin/main` now exits 0 (all focus locales de/es/fr/pt-PT complete). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AtXcBU1t6Xk1qJhaQEeDx6
pipiche38
force-pushed
the
diagnostics-capture-toggle
branch
from
July 25, 2026 07:43
d7ce999 to
e419b82
Compare
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.
Summary
Adds a single "Diagnostics capture" master switch to Test Centre → Diagnostic tools (default OFF, opt-in). Today the Oura Tier-B JSONL sidecars are always-on and fill /OpenWhoop/Diagnostics during normal use; this puts every on-device research artifact behind one switch a tester flips on for a capture session.
Motivation
The Diagnostics folder accumulates artifacts (oura-activity, and — on other branches — oura-ibihr / oura-raw, plus the WHOOP raw-frame capture) with no user control. A single opt-in switch keeps the folder empty in normal use and gives a clean way to arm capture only when debugging.
What changed
Cross-platform parity
Symmetric Swift/Kotlin: same pref key, same gate placement (dump creation + raw-capture guard), same UI toggle. No stored-data or analytics change, so nothing crosses the .noopbak boundary.
Behavior change
The Oura activity/MET sidecar was always-on and is now OFF by default — testers must enable the switch before a capture night. This is the intended effect (stop the folder filling).
Scope / notes
Verification