# U3 calibration evidence

Implementation: quaternion hemisphere mean and geodesic stillness checks; guided peak-axis fit; fixed rider-frame orientation/vector transforms; sign-checked standard mount; main-actor calibration lifecycle with prior-reference retention and recording guard. Raw neutral and gestures remain unchanged and configuration/duration/dispersion persist through Codable.

Test-first RED: `/tmp/rideform-u3-red.log` records unresolved OrientationMath/CalibrationSolver symbols before implementation. Initial SwiftPM attempt hit nested `sandbox_apply: Operation not permitted`; `--disable-sandbox` removes SwiftPM's nested sandbox and does not change the workspace sandbox.

Worker core command:

```sh
DEVELOPER_DIR=/Applications/Xcode-beta.app/Contents/Developer swift test --disable-sandbox --package-path Packages/RideFormCore --scratch-path /tmp/rideform-u3-build
```

Standard mount test-first correction RED: `/tmp/rideform-u3-standard-red.log` rejects a mismatched documented mount basis before correcting the sign to the right-handed screen-out portrait mapping.

GREEN artifact: `/tmp/rideform-u3-green.log`: 13 tests passed, 0 failures (5 calibration tests), 2026-10-01 10:57:40 local. Tests prove hemisphere q/-q averaging, 179/-179 wrap, two oblique mounts with noncommuting neutral rotations, ±20-degree lateral/axial and ±15-degree forward recovery within 0.1 degree, current-device vector rotation, exact persisted/reloaded calibration, inverse adapter convention, retained raw returning-gesture samples, standard-mount sign checks, and rejection of short/moving/dispersed/collinear/unverified input.

App integration tests are in `Tests/RideFormAppTests/CalibrationIntegrationTests.swift`: raw neutral then verified snapshot, required sensor coverage, complete lifecycle, recording rejection, failed replacement retaining prior calibration, unverified convention preventing Record, and standard-mount method selection with saved signs. Main coordinator owns the authoritative simulator run and records its result separately.

Physical mounting/sign verification, repeat-neutral noise and yaw drift remain pending James on the actual device. No simulator result is hardware evidence. No session-file persistence or UI was added in U3; the controller accepts ordered records and CaptureSummary from the single shared capture owner in U5.
