Cap + rotate the Oura activity MET research corpus (#676 follow-up) - #680
Merged
Conversation
The #676 sidecar is always-on for every paired Oura and appended forever with no bound — ~100 KB/day, growing without limit. Every other diagnostic log in the tree is capped (the WHOOP5 deep-buffer log rotates at 60 MB); this one wasn't. Add a 25 MB cap with single-'.1' rotation on both platforms (bounded to ~50 MB on disk), mirroring the deep-buffer pattern. Best-effort: a rotation error just falls through to the append. No encoder/schema change. Verified: compileFullDebugKotlin + OuraActivityDumpLineTest. iOS mirrors the Kotlin change; compiles on the app-build run. Author: ryanbr <mp3geek@gmail.com>
Re-review catch: resolveURL() reuses one cached URL object across every record() call, and URL.resourceValues caches the fileSize on it — so the rotation size check could read a stale small value and never fire on iOS. FileManager.attributesOfItem is a fresh stat each call. Android's File.length() was already fresh; no Kotlin change needed. Author: ryanbr <mp3geek@gmail.com>
ryanbr
added a commit
that referenced
this pull request
Jul 20, 2026
Marketing version stays 9.0.3; Android versionCode 296->297 and iOS CURRENT_PROJECT_VERSION 206->207 so the new staging build installs over the previous one. Content since the last testing build: Health Connect writeback failure surfacing (#672), SpO2/respiration empty-track explanation (#673), WHOOP 5/MG raw-IMU offload persist (#675), hide stale sleep recompute entries (#679), Oura activity MET research corpus + cap/rotation (#676/#680), trend chart date alignment (#528), and corrupt-DB quarantine preservation (#681).
DX23876
pushed a commit
to DX23876/noop
that referenced
this pull request
Jul 22, 2026
…-up) (ryanbr#680) Bounds the always-on ryanbr#676 Oura sidecar with a 25 MB cap + single-.1 rotation on both platforms (~50 MB on disk max), mirroring the WHOOP5 deep-buffer log. Best-effort; no encoder/schema change. iOS size read via FileManager (fresh stat) to avoid URL resource-value caching. Verified: Android compileFullDebugKotlin + OuraActivityDumpLineTest; iOS+macOS app-build green.
DX23876
pushed a commit
to DX23876/noop
that referenced
this pull request
Jul 22, 2026
Marketing version stays 9.0.3; Android versionCode 296->297 and iOS CURRENT_PROJECT_VERSION 206->207 so the new staging build installs over the previous one. Content since the last testing build: Health Connect writeback failure surfacing (ryanbr#672), SpO2/respiration empty-track explanation (ryanbr#673), WHOOP 5/MG raw-IMU offload persist (ryanbr#675), hide stale sleep recompute entries (ryanbr#679), Oura activity MET research corpus + cap/rotation (ryanbr#676/ryanbr#680), trend chart date alignment (ryanbr#528), and corrupt-DB quarantine preservation (ryanbr#681).
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.
Follow-up to #676. That sidecar is always-on for every paired Oura and appends forever with no cap (~100 KB/day → unbounded). Every other diagnostic log is bounded (the WHOOP5 deep-buffer log rotates at 60 MB); this one wasn't.
Adds a 25 MB cap + single-
.1rotation on both platforms (bounded ~50 MB on disk), mirroring the deep-buffer log's rotation. Best-effort — a rotation error falls through to the append. No encoder/schema/dedup change; the corpus stays always-on (gating would starve the research data, so bounding is the right lever).Verified: Android
compileFullDebugKotlin+OuraActivityDumpLineTest✓. iOS mirrors the Kotlin change (rotation inrecord()+maxBytes); compiles on the app-build attached here.