# U6 deterministic analysis evidence

Date: 2026-10-01. Worker verification used an isolated copy of `Packages/RideFormCore` at `/tmp/rideform-u6-snapshot/RideFormCore`, with a separate scratch directory, while U5 worked on App files. The coordinator owns the authoritative shared-workspace test/build and commit. This document does not claim device or simulator motion as hardware evidence.

This is the original v1 implementation evidence. Subsequent independent checks found three defects, now fixed in `rideform-analysis-2`; see `u6-independent.md` for the preserved findings and `u6-fix-evidence.md` for observed regression RED/GREEN and the fresh passing independent oracle.

## RED and GREEN

Before production analysis sources existed, the first two `AnalysisTests` were copied into the isolated package. The focused test invocation failed compilation with `cannot find type 'AnalysisResult' in scope` and `cannot find 'MotionAnalyzer' in scope`. Log: `/tmp/rideform-u6-red.log`. This is the observed initial RED.

Further transition/spectral/filter/sidecar/summary tests were added during implementation, rather than all being present at the initial RED. The first behavioral run failed because the irregular polynomial fixture crossed the default absolute 0.1-second gap threshold, correctly splitting its derivatives, and because correction magnitudes were compared with exact floating-point equality. The polynomial fixture now explicitly configures a 0.5-second absolute gap allowance; correction magnitudes use a 1e−9-radian tolerance. A separate gap test verifies default gap splitting and unavailable short-segment jerk. No acquisition timestamps were changed to hide the gap.

Final worker command:

```sh
DEVELOPER_DIR=/Applications/Xcode-beta.app/Contents/Developer \
  swift test --package-path /tmp/rideform-u6-snapshot/RideFormCore \
  --scratch-path /tmp/rideform-u6-green --disable-sandbox
```

Final isolated result: **32 tests, 0 failures** (13 U6 tests, 19 existing core tests). Log: `/tmp/rideform-u6-all.log`. SwiftPM reports a readonly manifest-cache warning in this sandbox, but builds and tests complete. This is worker evidence; coordinator rerun remains the shared-source gate.

## Numeric fixture outcomes

| Fixture | Independent expected value / assertion |
|---|---|
| Irregular gyro ωx = −3t², times 0, .07, .18, .27, .39, .51, .63 | αx = −6t within 1e−8; jx = −6 within 1e−7, including boundaries |
| Constant lateral jerk 6 over .63 s | ∫j²dt = 22.68; peak and RMS = 6; normalized value = .63⁵/4 × 22.68 |
| Piecewise neutral → 20° left → neutral → 20° right | Onsets 1/3/5 s; deceleration ends 2/4/6 s; confirmed holds 2.4/4.4/6.4 s, within .020001 s; duration 1 s; settling .4 s; ranges 20° |
| Peak 24°, correction to 18°, correction to 20°, hold then return | Overshoot 4°; corrections 6° and 2°; return is separate and adds no outbound correction |
| Asymmetric outbound ranges left [10°,20°], right [10°,10°] | Left mean 15°; sample variance 50 degree² (stored rad²); normalized asymmetry .4; return asymmetry unavailable |
| Low-frequency gyro + 8-Hz perturbation | Spectral ratio rises by >.05; squared jerk increases >10×; derived 50-Hz grid/Hann metadata disclosed |
| Cubic angle A(t/T)³, (T,A) = (1,1) versus (2,3) | Normalized squared jerk = 36 for both; unnormalized squared jerk differs |
| Saved neutral speeds [.15,.16,.17] rad/s | Median .16, MAD .01, effective onset threshold .22 rad/s, persisted and reproducible |

Additional assertions cover stationary noise-only data (zero transitions), direct crossings, gaps, unconfirmed/truncated/no-hold legs with nil endpoints, short/ineffective-band spectral unavailability, local-polynomial filter flags and insufficient windows, fixed-frame 90° vector rotation, hash/count preservation, marker retention, and identical phone/watch traces from identical common samples.

The sidecar test serializes an actual master artifact, writes/decodes `DerivedSidecar<AnalysisResult>` in a sibling derived directory, compares the master bytes and file inventory unchanged, verifies current identity/configuration and changed-input rejection, and rejects a sidecar inside the master.

## Remaining evidence

No labeled real-session corpus was supplied. Independent metric recomputation from exported physical captures, physical mounting/sign verification, fused/raw matched captures, approximately 50 garage transitions, and detection sensitivity/false-positive assessment remain pending human/device gates. These candidate metrics are not validated riding quality or displacement. U7 must display units, parameters, uncertainty and unavailable reasons alongside traces and distributions.
