Repository navigation
feat(health): export activity ring summaries as CSV and JSON - #53
Merged
Merged
Conversation
Add unit-labelled CSV, lossless JSON and atomic file writers for parsed activity summaries. Verify mixed XML exports, missing values, zeroes and CSV escaping. Co-authored-by: OpenAI Codex <noreply@openai.com>
This was referenced Nov 13, 2026
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.
Add CSV and JSON exports plus atomic file writers for parsed activity ring summaries. CSV uses explicit units and safely quoted text, while JSON retains original energy values and units for a lossless round trip.
Part of #6. Closes #52.
Verification
mise run lintpassed with 0 serious violations. The 491 existing warnings are outside the changed files.mise run buildpassed.mise run testpassed, including the video pipeline smoke tests, 162 XCTest tests and 41 Swift Testing tests.git diff --checkpassed.mise run buildandmise run testpassed on Linux.mise run lintandmise run ios:build:cipassed.mise run ios:e2epassed all 3 tests.mise run ios:coveragepassed the iOS UI suite with coverage.Proof
Captured the full unit and integration test run in
.tmp/proof/issue-52-test.logand pasted the relevant passing lines below, with runner glyphs omitted. The 11 new tests cover the XML-to-export path, units, missing values, measured zeroes, order, duplicate days, unsupported units, CR/LF/CRLF and quote escaping, raw JSON round trips, non-finite JSON errors, file replacement and file errors.The mixed XML test exports a 2092 kJ ring total as 500 kcal without adding the separate 100 kcal record or 200 kcal workout. It also verifies measured zero and a missing following day. The file test creates and replaces real CSV and JSON files, then reads them back.
The mobile e2e job also passed, reporting
3 passed (3.5m).The iOS UI coverage job passed. Relevant captured output follows.
Unit and integration capture succeeded. No iOS or watchOS UI changed, so simulator screenshots were not needed; no capture path was blocked.
Reviewer notes
Ring summaries remain separate from record-derived daily summaries to avoid double counting. CSV leaves energy blank for missing or unsupported units; JSON retains the original unit and value. File writes require an existing parent directory. File-picking UI and recommendation integration remain deferred under #6, as recorded in #34. The parent epic stays open.
An earlier main build had a WebDriverAgent startup timeout and a sets-section UI assertion failure. Both simulator jobs passed on this PR, including that UI test; runner or timing flakiness remains a possible follow-up.