Skip to content

Build the Athletic Standard library for iPhone and Android, as version 3.1.0 - #77

Open
mwhitham wants to merge 30 commits into
mainfrom
build/3.1.0-iphone-and-android-library
Open

mwhitham wants to merge 30 commits into
mainfrom
build/3.1.0-iphone-and-android-library

Conversation

@mwhitham

@mwhitham mwhitham commented Dec 1, 2026 •

Copy link
Copy Markdown
Owner

Implements #64: the Athletic Standard library for iPhone and Android apps, built with UniFFI on the shared Rust core, released as version 3.1.0.

The rules stay in Rust. Swift and Kotlin get generated bindings, so an app gets the same record checks, error messages, calculation results, and file handling as the desktop ath. Every record type and every calculation answer is a Swift and a Kotlin type. Local use needs no account or network connection.

The spec, the plan, and decisions D325–D335 are in build-history/v3.1.0/. Progress is in progress.md. App developers start at mobile/README.md.

What an app developer gets

  • Typed records and answers (D329). All 29 record types, their parts, the 46 lists of allowed values, the record wrapper, and every calculation answer are generated Swift structs and enums and Kotlin classes. Writes take them and run the npm client's request through the same protocol operation, so they get the desktop checks and messages. JSON stays available through converters.
  • The app's own values on a record, as extensions under the app's own key. extensionJson and withExtensionJson check the key and the limits. Swift adds Codable helpers; Kotlin takes JSON text from any JSON library.
  • Real .ath.sqlite files (Database): create, open, read, edit, migrate after a verified backup, and save a verified copy.
  • Picked documents (PickedDocument) from iCloud Drive or an Android picker, edited through a private copy and saved back only if the document did not change elsewhere.
  • Calculations from records in memory (RecordSnapshot) or from a file.
  • A host client with browser sign-in (AthleticStandardHost, ai.athleticstandard.host), reading and writing the same typed records.
  • Installation. iPhone: add https://github.com/mwhitham/ath by version; the Swift package is this repository (D332). Android: ai.athleticstandard:athleticstandard from Maven Central.
  • Guides and examples. mobile/README.md walks through eight steps, from choosing where the athlete's data lives to shipping. The Swift and Android guides show each call with code from example apps; a test checks that every sample is the example's code, unchanged. Each example is split by task and has a README on starting an app from it. mobile/CONTRIBUTING.md covers building, testing, and releasing the library.
  • Descriptions in Xcode and Android Studio for every call, type, field, and case an app sees, including every record field and every list value. Both crates deny missing documentation; all 1,742 items in the generated Swift have a description.

Version 3.1.0

3.0.0 was released before this work merged, so the phone packages ship as 3.1.0 (D334).

  • Under D290 this is a minor release. It adds packages and library calls and changes no record field, so all 3.0.0 data stays valid.
  • Migration step 9 records the new version and changes no table. A 3.0.0 program refuses a step-9 database and asks for an update.
  • The 3.0.0 migration, schemas, and host API description are now pinned as released.
  • The Open Wearables plan moves from 3.1.0 to 3.2.0, with migration step 10. It keeps D272–D289. Plan ath pull openwearables for 2.2.0 #40 still uses a v2.2.0 folder and will need its version updated.

Changes to shared code (worth a close look)

  1. Calculations read through one interface (21f2f78, D326). The arithmetic and receipts move into core/src/calculate/; the desktop SQL stays in src/calculate/. No expected value in any existing test changed.
  2. A memory snapshot refuses the calculations that read device recordings or intensity references, with a message that says to run them on a database.
  3. A cli feature, on by default (91a56ea, D327), which the phone build turns off.
  4. A build fix (76bb349) for the ureq and uuid features that the sign-in runtime uses.
  5. Core types marked for UniFFI (a6d603f). The core gains an optional uniffi feature; only the phone crate turns it on. Model fields that hold any JSON are now the named types JsonObject and JsonValue (825e444). Result types that UniFFI cannot carry changed shape without changing their JSON: counts are u64, fixed names are String, readings around the best power are (offset, value) pairs, and a threshold answer is one untagged enum. Every desktop JSON golden is unchanged.
  6. Release workflow (cc3b475). A release from main now tags one commit on top of the tested commit, which points Package.swift at the tested XCFramework by address and checksum and adds the generated Swift. It builds that commit through the GitHub API. A release from a pushed tag cannot, and says so. The separate Swift package repository and its token are gone.
  7. Tracked Android XML files (0e416f0, renamed in c1cc8e0), each listed with its hash in tools/public-data-allowlist.json. None holds athlete data.
  8. zip 2.6.1 to 9.9.0 (511e1c3), for its open security advisories (two critical, two high, one medium; every version up to 9.0.4 is affected). Dependabot could not make this update, because the fix needs version 9 and both manifests asked for 2.x. Reading an entry's name can now fail, so three lines pass that failure on. zip 9 stops reading an entry at its declared size by itself, so the import safety test accepts either refusal. Only zip and its own dependencies change in Cargo.lock.
  9. A calendar-day bound on a range calculation covers the whole day (779f2e9, D335). This changes released results. Without grouping, --to 2026-10-31 was compared as text and left out all of 31 October, ignoring --timezone, against the 1.0.0 specification. Now a day uses the request's or the profile's time zone, as grouped calculations already did; with neither, the calculation is refused and asks for one. Exact instants, provider period summaries, and workout drift are unchanged. The two 2.1.0 reference cases this changes are named in tests/calculate_golden.rs.
  10. Text that disagreed with the code (dee6e11): SPEC.md now lists all six record types a coach may write, and two skill references list all six score types.

Tests

All data is synthetic. Everything ran on one Mac, from commit dee6e11 (the last code commit).

Check Result
cargo fmt --check, cargo clippy --all-targets -- -D warnings pass, also for the core with UniFFI, the library without the cli feature, and the phone crate without SQLite
cargo test (workspace) 946 passed, 0 failed, 18 ignored
npm (npm ci, typecheck, test) 105 passed, 1 skipped (Windows only)
WebAssembly gate (gate 5) passes
Model vectors through each binding 7,285 run, 114 skipped for the four documented reasons, 0 failed
Calculations through a phone Database 119 of 119 requests match the desktop, compared as the desktop's JSON
Calculations through a phone memory snapshot 105 match; 14 get the documented refusal
Swift package installed by version from a tagged clone of this repository, release commit staged 33 passed (28 library tests, 5 host tests), in each of two runs
Swift package from the repository root, on macOS 38 passed (adds the 5 example tests)
Android library installed by coordinate in the example app, emulators with 4 KB pages (API 36) and 16 KB pages (API 37), debug and shrunk release builds 37 passed on each (32 library tests, 5 example tests)
16 KB alignment in the shrunk release APK 4 of 4 native libraries aligned
Desktop round trip: ath creates a file, the phone edits it, ath checks it passes on macOS and both emulators
XCFramework zip two staging runs gave the same bytes
Guides 37 code samples match the example apps' code; every marked region is shown
Descriptions all 1,742 items in the generated Swift have one; both crates deny missing documentation

The details are in release-evidence.md.

Not tested

  • The iPhone simulator. Xcode's license is not accepted on the build machine. The mobile-apple job runs it in the release check.
  • The iCloud Drive picker on a signed-in device.
  • The browser sign-in sheets with a person, and a live WorkOS environment. That work belongs with Test the host sign-in recipes against real provider accounts #57.
  • The CI jobs and release workflows. None has run on GitHub. mobile-apple and mobile-android are in validate.yml, which runs only inside release-cross-platform.yml. The new release commit step ran only as a dry run with a stand-in for gh. A full check of this branch without a release is gh workflow run release-cross-platform.yml --ref build/3.1.0-iphone-and-android-library -f publish=false.
  • Publication. Nothing was published. The Maven namespace and the publishing credentials belong to the maintainer. Build the library for iPhone and Android apps with UniFFI #64 can close after the first published release.

Found, not changed here

  • rustls, rustls-webpki, and libsql-sqlite3-parser alerts. They come only through libsql 0.10.0 in ath-host, which is already the newest release, so they wait for a libsql release.
  • training_impact can be read two ways. "Did it change your training: full, reduced, or none?" does not say whether full means full training or a full change. Its values are described only by their stored names until that is decided.

How to review

Each commit is one logical step, so reading commit by commit works best:

  1. a51201d the plan and D325–D333
  2. f60a0b2 the UniFFI crate, the Swift package, and the Android library, with record checks
  3. 91a56ea the cli feature and in-process protocol operations
  4. 653561a files on phones: Database and PickedDocument
  5. 21f2f78 calculations in the core, behind one reader interface
  6. 76bb349 the ureq and uuid feature fix
  7. 9090e11 calculations from the phone packages
  8. d689dd3 the test-only sign-in provider
  9. 37d8d8c the host client with browser sign-in
  10. 6bc7f7c staging, installing, the CI jobs, and the runnable examples
  11. 0e416f0 the tracked Android XML files
  12. 2b27a1b scripts that follow CARGO_TARGET_DIR
  13. 5e8f67b a phone storage test that compares the backup's file name, so it passes on Windows
  14. 36d3a74 the phone library recorded as 3.1.0: the v3.1.0 folder and D334
  15. 320c5bf version 3.1.0 and migration step 9
  16. c075431 the host refresh test ends only its own person's sessions
  17. 78b76c9 the first 3.1.0 evidence
  18. 825e444 named types for the model's free-form JSON values
  19. a6d603f typed records and calculation answers for Swift and Kotlin (D329 rewritten)
  20. cc3b475 the Swift package served from this repository (D332 rewritten)
  21. e95e347 descriptions for every phone library call, type, field, and case
  22. c1cc8e0 app guides and starting-point examples
  23. 463dfee the release comment says whether the tag carries the Swift package
  24. 1a31e37 progress, the guides gate, and the evidence
  25. 76f6e8d descriptions for every record and result type, and the core denies missing documentation
  26. 93b27be the evidence names the rebased commits
  27. 511e1c3 zip 2.6.1 to 9.9.0, for its security advisories
  28. 779f2e9 a calendar-day bound on a range calculation covers the whole day (D335)
  29. dee6e11 SPEC.md's coach record types and two skills' score types match the code
  30. c638b40 progress step 11 and the final evidence

🤖 Generated with Claude Code

mwhitham and others added 26 commits November 30, 2026 20:33
The approved plan for issue 64 goes into the 3.0.0 appendix with its
links fixed. D325 to D333 record the choices the plan left for the start
of the work: UniFFI bindings in version 3.0.0, built on the core of
D312; one reader interface for calculations, with the core holding their
arithmetic; the phone storage binding; where a phone keeps its file; the
boundary types; the host client and its sign-in; platform floors;
release packaging; and one shared test bundle.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`mobile/` holds the `athleticstandard-mobile` crate, built with UniFFI
0.33.0, which exposes the record checks: `validate`,
`validateCurrentRecord`, and `libraryVersion`. One failure type carries
the desktop error code and message, and validation issues keep field
names and list positions apart (D329).

`mobile/scripts/` builds an XCFramework for iPhone, the iPhone simulator,
and macOS, and the Android libraries for arm64-v8a and x86_64 with a
16 KB page alignment check. `mobile/swift/` is the Swift package and
`mobile/android/` is the Gradle build of `ai.athleticstandard`.

`mobile/tests/fixtures.rs` runs every recorded model vector through the
binding and writes the shared phone test bundle (D333). The vector
exceptions moved to `tests/vector_rules/`, so the desktop harness and the
bundle read one list. All 7,285 run cases match on a Mac through the
Swift package and on an Android emulator through the Android library.
The iPhone simulator run is not done yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tions in process.

The `athleticstandard` crate gains a `cli` feature, on by default, that
holds the command line, terminal handling, provider import readers,
prediction and log planning, and the network runtime. Without it the crate
builds the store, files, packages, calculations, and views, which is what
a phone needs (D327). The two provider-import operations and the
prediction operations are left out of that build; the operation order the
npm client is generated from does not change.

`protocol::run_in_process` runs one protocol operation on a store the
caller keeps open and returns its output and streamed items. The worker
keeps its events in memory for such a call. An operation that calls back
to its client is refused.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The phone binding gains `Database`, behind the mobile crate's default
`sqlite` feature. It creates and opens `.ath.sqlite` files through the
desktop store, reads records, runs the npm client's record operations in
process, previews and runs migrations after a verified backup, and writes
verified single-file copies that include edits still in the companion log.
A closed handle refuses every call (D327).

`PickedDocument` in Swift and Kotlin works on a picked document through a
private copy and saves it back only when the document still has the
content it started from (D328). `FileLocationAdvice` holds the suggested
wording that recommends local storage.

Tests run the same storage steps in Rust, Swift, and Kotlin: create, edit,
close, reopen, a stale correction, a read-only open, an outdated 2.1.0
file, and a copy taken while edits were in the log. `roundtrip.sh` has the
desktop `ath` create a file and then check the file the phone library
saved. The round trip passed on a Mac and on Android emulators with 4 KB
and 16 KB pages. A dependency test checks that the storage build has
SQLite and no command-line or network crate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…interface.

The calculation settings, methods, range arithmetic, and receipts move
to `core/src/calculate/`, with the calendar rules in `core/src/calendar.rs`
and the shipped skills in `core/src/assets.rs` (D312). The core has its own
error type; the desktop error converts from it with the same codes and
messages.

Every calculation now asks for its data through `CalculationReader`
(D326). The desktop's SQLite reader in `src/calculate/sqlite.rs` runs the
same indexed queries as before, inside one read snapshot. A memory
snapshot in the core answers the same requests from supplied records,
with the same filters and order. A batch with an invalid record or a
repeated ID is refused and leaves the builder as it was.

The 3.0.0 workout operations and threshold methods ask for their
recordings, intensity references, and workout windows as one request
each. The SQLite reader answers with the 3.0.0 queries, unchanged, in
`src/calculate/recorded.rs`, `recorded_inputs.rs`, and `window.rs`; the
arithmetic, results, and `apply_with` move to the core. A memory snapshot
does not hold recordings yet, so it refuses those calculations and says
to run them on a database.

`tests/calculate_readers.rs` runs every worked example and a set of
synthetic edge cases on both readers and compares the complete results,
including failures and the input limit at 100,000 and 100,001 inputs.
A calculation that reads recordings must get exactly the documented
refusal from the snapshot: 30 worked examples and 69 case requests agree,
and 12 examples and 2 requests need a database. Every existing
calculation, golden, and query-plan test passes unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`src/runtime/sign_in.rs` and `src/runtime/host_sync.rs` send and read JSON
with `ureq` and make random `uuid` values, but the root manifest did not
turn on `ureq/json` or `uuid/v4`. A workspace build got them from
`host/`, so `cargo check -p athleticstandard --bin ath` failed only when
the program was built alone. The `cli` feature now turns both on, so the
phone build without it still has neither.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The phone binding gains `RecordSnapshotBuilder` and `RecordSnapshot`,
which calculate on records an app supplies, and `apply`, `applyWith`, and
`calculate` on an open `Database`. Both give the desktop JSON. A skill is
either a shipped name or the text of an edited copy, `applyWith` takes the
options of `ath apply --set` for the threshold methods, and `RangeRequest`
carries the options of `ath calculate`.

The phone test bundle gains a calculation suite, with the 42 worked
examples and the reader edge cases, each with its records, a SQLite file,
and the desktop outcome, and a coaching suite for the 20 record-example
blocks. All 113 calculation requests match the desktop through the
database. Through the memory snapshot, 99 match and 14, which read device
recordings or intensity references, get the documented refusal, which
the bundle carries as `expected_memory`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`host/examples/test-sign-in-provider.rs` answers like the WorkOS AuthKit
recipe: OpenID Connect discovery, a browser authorization endpoint that
requires S256 PKCE, a token endpoint that exchanges the code and rotates
refresh tokens, and the signing keys. Tokens carry `client_id` and the
requested `resource` as their audience, and are signed with the fixed
test key. `mobile/scripts/host-test-env.sh` starts it with a real
`ath-host` that trusts it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…kages.

`AthleticStandardHost` in Swift and `ai.athleticstandard.host` in Kotlin
connect to `ath-host` (D330). Sign-in reads the host's protected-resource
metadata and the provider's discovery document, runs the authorization
code flow with S256 PKCE in the system browser, checks the callback's
address and `state`, asks for a token for the host's resource, and
refreshes it. Tokens stay in the Keychain or in a file encrypted with an
Android Keystore key. An app with its own session can supply the token.

Owner writes are prepared as exact request bytes with an idempotency key,
so a retry after a lost reply sends the same request. The tests run both
clients against a real host and the test provider: retries, a stale
correction, a reused key, refresh and a refused refresh, cancelled and
foreign callbacks, a revoked coach, and a disconnected app.

The record snapshot builder also accepts the host's record list and the
`ath records list --json` output, which hold the array under `records`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…le examples.

`mobile/scripts/stage-apple.sh` zips the release XCFramework with fixed
file times, writes the Swift package repository as released and a tagged
staged copy that differ only in the binary target line, and runs every
package test through a consumer that resolves the staged copy by version.
`mobile/scripts/stage-android.sh` publishes the Android library to a local
Maven repository, checks that the POM declares JNA, and has the consumer
app resolve it by coordinate: it checks 16 KB alignment of every native
library in a shrunk release APK and runs the library's tests through the
installed copy in a debug and a shrunk release build (D332).

`validate.yml` gains the `mobile-apple` and `mobile-android` jobs. The
release job adds the tested zip and both reports to the GitHub release and
uploads the tested Maven bundle for the maintainer to publish.
`release-mobile-packages.yml`, run by hand, tags the Swift package
repository with the tested checksum and installs both packages from their
public locations. None of these workflows has run on GitHub yet.

The Android consumer app and `swift run AthleticStandardExample` are the
runnable examples: offline work on a local file, a picked document, and
host sign-in with a read and a saved edit. The phone tests read the
expected version from the bundle, and a test checks that every phone
build file names it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The root `.gitignore` ignores every `*.xml` so a real health export is
never added by accident, which also left out the five Android build
files the phone library needs: two library manifests, the example app's
manifest, its strings, and its network rule. Each is reviewed, listed with
its hash in `tools/public-data-allowlist.json`, and named in an explicit
`.gitignore` exception, as `tests/public_data.rs` requires. None holds
athlete data.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The build, round-trip, and host scripts read Cargo's output from
`target/`. Cargo writes to `CARGO_TARGET_DIR` when it is set, as a fresh
clone built against a shared target folder showed, so the scripts now
read from there too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The test expected the backup path to end in `/before-migration.ath.sqlite`.
On Windows the path uses `\`, so the check failed although the migration
and its backup worked. It now compares the file name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Version 3.0.0 was released before the phone library was merged, so the
phone packages ship as 3.1.0. D334 says why: under D290 the release only
adds packages and library calls, so it is minor, and migration step 9
records the version without changing a table, as step 4 did for 2.1.0.
The Open Wearables plan moves to 3.2.0 with step 10 and keeps D272–D289,
which replaces the version D317 named for it.

The new `build-history/v3.1.0/` folder holds a short spec, D325–D334, the
plan, the progress notes, and the evidence. These were added to the
3.0.0 folder on this branch and never released, so they move; the 3.0.0
folder is back to its released text. D325 now names 3.1.0, and the
plan's links reach the files where they are now. AGENTS.md lists 3.1.0
as the current version, and the phone README links the new folder.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The program, the record, the database, the npm package, the crates, and
the phone packages move to 3.1.0 under D334. Migration step 9 sets
athleticstandard_version to 3.1.0 and changes no table, as step 4 did for
2.1.0. New records, packages, and databases declare 3.1.0, and 3.0.0
packages and databases are still read, imported, and migrated.

3.0.0 is released, so its migration, JSON Schemas, and host API
description are pinned, and its 31 calculation skills join the released
files, so `ath skill install` replaces an unedited 3.0.0 copy (D231). The
generated 3.1.0 schemas match the 3.0.0 files except for the version list
and the schema IDs. A test checks the published 3.0.0 files against
2.1.3, and another runs step 9 as a file after step 8. The demo database
changed only in its metadata row.

SPEC.md, the README, the hosting guide, AGENTS.md, and every skill name
3.1.0. The phone tests read the migrated schema step from the test bundle,
as they already read the version.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The refresh test asks the test sign-in provider to forget refresh tokens,
then checks that the next refresh asks for sign-in. The provider forgot
every token, so when two emulators ran the test at once, one device could
end the other's session between its sign-in and its refresh. The staged
Android run failed that way once. The provider's test route now takes a
`subject` and forgets only that person's tokens, and the Swift and Kotlin
tests name the person each signed in as.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The evidence for 3.1.0 now comes from the 3.1.0 build: the Swift package
installed by version, the Android library installed by coordinate on
emulators with 4 KB and 16 KB pages in a debug and a shrunk release
build, the desktop round trip on each platform, two Swift staging runs
with the same zip bytes, and the whole workspace. It also names the two
test problems found while gathering it. The simulator, the release CI
jobs, and publication are still not run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`supplied_fields`, sleep stage minutes, and record extensions were plain
JSON maps, and a calculation parameter's value was a plain JSON value.
They become `JsonObject` and `JsonValue`, which hold the same JSON and
read and write the same text. The Swift and Kotlin bindings need a type
of their own to carry them across as JSON text, and a plain map would
take the name `Map`, which Kotlin already uses. Nothing in the format or
the published schema changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
UniFFI now generates a Swift and a Kotlin type for every record type,
every part of a record, every list of allowed values, the record wrapper,
and every calculation answer, from the Rust model and result types (D329).
The core marks them under an optional `uniffi` feature, so the desktop
program and the WebAssembly build do not depend on UniFFI.

Phone writes take the typed values and run the npm client's request
through the same protocol operation, so they get the desktop checks and
messages. Reads check the stored JSON before returning a type. JSON stays
available through converters, `addRecordsJson`, and `runOperation`.

An app keeps its own values as extensions under its own key. The library
reads and sets one key and checks the key and the format's limits. The
Swift package adds Codable helpers; the Kotlin library adds helpers that
take the app's own JSON text. The host clients read and write the typed
records too.

Result types that UniFFI cannot carry change shape without changing their
JSON: whole-number counts are u64, fixed names are String, readings around
the best power are (offset, value) pairs, and a threshold answer is one
untagged enum.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Apps add https://github.com/mwhitham/ath by version. The root
Package.swift builds the package from mobile/swift/. On main its binary
target is the XCFramework that build-apple.sh writes. A release from main
tags one commit on top of the tested commit that names the zip on the
GitHub release by address and checksum and adds the generated Swift, so
Swift Package Manager installs the tested bytes (D332).

stage-apple.sh stages that commit in a tagged clone of this repository and
installs it by version. The release workflow builds the commit through the
GitHub API, tags it, and adds the zip to the release. The separate package
repository, its token, and its templates are gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
UniFFI copies Rust doc comments into the Swift and Kotlin that Xcode and
Android Studio show. The phone crate now denies missing documentation, so
every call, and every type, field, and case it defines, has a description.
Every call is in this crate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mobile/README.md walks an app developer through eight steps, from looking
around and choosing where the athlete's data lives to shipping, staying
current, and asking for what is missing. The Swift and Android guides show
each call with code from the example apps. mobile/tests/guides.rs checks
that every sample is a marked region of an example file, unchanged, and
that every region is shown.

Each example is split by task: records, calculations, the app's own
values, picked files, and the host. Each has a README that says how to
start an app from it. Their tests run the guide's code on a Mac and on the
emulators. The Android consumer app is now mobile/android/example.

mobile/CONTRIBUTING.md holds the build, test, and release notes, and the
main README gains a "Build an app" section.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A release from a pushed tag names the tested commit, which Swift Package
Manager cannot install. The pull request comment and the release summary
now say so instead of naming a release commit that does not exist.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Progress gains steps 8 to 10, the spec gains the guides as a release gate,
and the evidence is gathered again from commit 797813b: 942 Rust tests,
the Swift package installed by version from a tagged clone (33 tests), the
Android library installed by coordinate in the example app (37 tests on
each emulator, debug and shrunk release), two identical XCFramework zips,
and the round trip on every platform.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
UniFFI copies Rust doc comments into the Swift and Kotlin that app
developers read. The core now denies missing documentation, so every
record type, part of a record, list of allowed values, calculation
answer, field, and value has a description: about 1,700 new lines, from
the code, SPEC.md, the skills, and the studies behind the methods.

Each value of a list of allowed values also says how it is stored, such
as "Stored as `import_time`.", with a line on what it means where its
name says too little. Several existing descriptions that sat on one
field but described a group, or that left out cases, were corrected.

The generated Swift has a description on all 1,742 of its items.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The branch was rebased onto two npm lockfile updates on main, which
changed every commit ID. The evidence now names the rebased commits and
records the checks run after the descriptions commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mwhitham and others added 4 commits November 30, 2026 21:51
zip 2.6.1 has open security advisories: two critical (a zip whose two
copies of an entry's header disagree can bypass checks and overwrite
files), two high (unbounded symbolic link targets during extraction),
and AES authentication on an early end of file. Every version up to
9.0.4 is affected. The fix needs version 9, which the "2.2" requirement
does not allow, so the update changes both manifests.

In zip 9 reading an entry's name can fail, so the three places that
read a name now pass that failure on. zip 9 also stops reading an entry
at its declared size by itself. The import safety test no longer
expects the library to read past it, and accepts either refusal: the
library's, or the import's own measured reader's. Nothing is written in
either case.

zip's compression code now uses Rust libraries for bzip2 and xz instead
of three C libraries. No other dependency changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A calculation that did not group by day, week, or month compared a
`--from` or `--to` day with the stored timestamps as text, so
`--to 2026-10-31` left out every reading of 31 October and ignored
`--timezone`. The 1.0.0 specification says a day bound uses the
request's or the saved time zone. Now every range calculation does that,
as the grouped ones already did; with no time zone it is refused and asks
for one (D335). Exact instants, provider period summaries, and workout
drift are unchanged.

The 2.1.0 reference test names the two cases this changes. A new test
works the rule through by hand, and a shared reader case runs it through
the database, the memory snapshot, and the phone bundle. The repair test
looked for "999" anywhere in the output, which the new range end
contains; it now checks the mean.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SPEC.md said in three places that a coach writes only coaching notes,
training plans, and planned sessions. Since 3.0.0 a coach also writes
intensity references, events, and approvals, as SPEC.md section 6 and
the code already say.

The tool skill's grading reference and the CrossFit skill's records
reference listed three score types. `power`, `distance`, and `energy`
were added in 3.0.0, with `power_w`, `distance_m`, and `energy_kcal`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Progress gains step 11: the zip security update, calendar-day range
bounds (D335), the coach record types in SPEC.md, and the score types in
two skill references. The evidence is gathered again from commit dee6e11:
946 Rust tests, the Swift package installed by version (33 tests in each
of two runs, with byte-identical zips), the Android library installed by
coordinate in the example app (37 tests on each emulator, debug and
shrunk release), and the round trip on every platform.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant