# Watch companion — build 6

James authorized Watch development while continuing iPhone calibration trials. This follows the brief’s torso-mounted Watch experiment. It does not add a wrist remote for the phone.

## Implemented

- watchOS10+ target shares the existing Core Motion adapter, bounded calibration retries, spoken waiting guidance, recording controller, immutable storage and portable analysis. Platform and OS metadata distinguish Watch sessions.
- Foreground recording, fused or combined sensors, calibration stage haptics, diagnostics, markers, save/reopen and a basic session summary. Inactive scene stops capture and saves an interrupted session; no workout or extended-runtime entitlement is claimed.
- WatchConnectivity queues exact ZIP archives. The iPhone retains incoming temporary files synchronously before the callback returns, under unique names in a separate inbox. The phone can share these ZIPs; full Watch chart import is not implemented.
- Outbox cleanup preserves outstanding transfers and runs only outside archive preparation. Original session masters are untouched.

## Evidence

- Xcode27 beta/watchOS27 SDK: generic Watch simulator build passed. Optional heading accuracy is gated for watchOS27 as well as iOS27.
- Watch simulator integration: synthetic calibration → automatic recording → marker → interruption → persisted Apple Watch session → shared analyzer passed. Full Watch UI calibration → record → save → relaunch → saved-session list passed. `/tmp/rideform-watch-tests-final.log` and its xcresult.
- Initial UI failure was a pre-tap hit-testing assertion after manual swipes. The same run successfully tapped, recorded and reopened. Replacing that assertion with existence checks and XCTest’s automatic tap scrolling produced a passing workflow. Saved-screen screenshot inspected.
- 40 iPhone integration tests passed after platform adaptation: `/tmp/rideform-watch-ios-app-final.log`. Three transfer regression tests and the full iPhone UI suite passed after staging cleanup: `/tmp/rideform-watch-ios-ui.log`.
- Signed device build including embedded Watch app passed: `/tmp/rideform-watch-device-final.log`. Deep strict signature verification passed with signing-keychain access. Artifact: `/tmp/rideform-watch-device/Build/Products/Debug-iphoneos/RideForm.app`.
- Independent Swift reviewer identified retained duplicate staging ZIPs. Fixed with outbox reconciliation and a regression preserving pending transfers and original bytes; final review returned no findings.

## Boundaries

Build 6 is not installed on a physical Watch. Build 5 remains installed and successfully launched on James’s iPhone. Simulator evidence is synthetic and does not establish sensor rate, noise, signs, audio audibility, off-wrist runtime, battery behavior or physical transfer delivery. WatchConnectivity success is transport completion, not an application-level acknowledgement that the phone retained an archive; inspect the phone inbox before relying on receipt.

Run `./scripts/test-watch.sh` for repeatable Watch checks. Actual Ultra2 mounting, sleep/lock interruption, spoken guidance and paired-device delivery remain the next physical checks. Full comparison protocol remains in `docs/watch-readiness.md`.

## Platform references

- [Apple single-target Watch app guidance](https://developer.apple.com/documentation/technotes/tn3157-updating-your-watchos-project-for-swiftui-and-widgetkit)
- [WatchConnectivity data transfers](https://developer.apple.com/documentation/WatchConnectivity/transferring-data-with-watch-connectivity)
- [Testing watchOS apps](https://developer.apple.com/documentation/watchos-apps/setting-up-tests-for-your-watchos-app)
