Files
rippr/tool/parity/stubs.kt
Dylan 398157b1f5 Complete Phase 1: accumulator, exports, and full parity coverage
T05 — ride_accumulator.dart with the cross-batch anchor intact (12 tests).
T06 — ride_export.dart, GPX 1.1 and GeoJSON (15 tests), parsed with real
parsers rather than substring matching.
T07 — parity harness extended to cover export byte output.

GPX and GeoJSON are byte-identical across Kotlin and Dart: same length, same
FNV hash, including the escaped hostile name and all %.7f/%.1f formatting.

Two harness bugs found and fixed while building it. String.hashCode is not
comparable across Java and Dart, so text comparison used FNV-1a instead. And a
missing jar let a failed Kotlin compile pass as a green run -- run.sh now checks
for the artifact and exits non-zero, the same failure mode as the v2 sweep that
hid a compile error behind /dev/null.

Phase 1 done: 79 tests passing, analyze clean.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-15 01:08:30 -05:00

20 lines
848 B
Kotlin

package com.rippr.data
data class TrackPoint(
val id: Long = 0, val tripId: Long, val segmentId: Long, val timestamp: Long,
val latitude: Double, val longitude: Double, val speedKmh: Float,
val altitudeM: Double, val accuracyM: Float = 0f, val bearingDeg: Float = 0f,
val synced: Boolean = false,
)
data class Segment(
val id: Long = 0, val tripId: Long, val startedAt: Long, val endedAt: Long? = null,
) { val isOpen: Boolean get() = endedAt == null }
enum class TripState { RECORDING, PAUSED, COMPLETED }
data class Trip(
val id: Long = 0, val startedAt: Long, val endedAt: Long? = null,
val name: String? = null, val state: TripState = TripState.RECORDING,
val distanceM: Double = 0.0, val movingMillis: Long = 0,
val maxSpeedKmh: Float = 0f, val elevationGainM: Double = 0.0,
val pointCount: Int = 0,
)