Dokumen ini mencatat tahap implementasi pada versi yang disebutkan. Untuk status akhir seluruh fitur, baca audit implementasi.

#31 — native trip recording and immutable actual history

Android build 0.10.0-recording, physical TECNO KF8. Validation date: 2026-09-19.

Recording is owned by a non-exported Android location foreground service. The visible app initiates the session after location permission; its ongoing notification provides a pause action. No background-location permission, PC routing backend, boot restart, screen wake lock or automatic resurrection is used. Location callbacks write individual SQLite event rows rather than rewriting the trip archive. The WebView only sends bounded commands and reads status/history.

Trips support start, pause, explicit resume and end. The archive records the vehicle/payload snapshot, manual SOC observations, actual leg boundaries, GPS samples with accuracy/time, and charging start/end SOC, elapsed wall time and known/unknown power. Charging pauses location recording and must be finished explicitly before resuming. Charging location is labelled as the last recorded location and retains its timestamp, rather than claiming it is a fresh fix.

Each actual leg can copy the chosen pre-leg prediction from a saved plan, including model version and assumptions. Plan legs now retain those fields at calculation time. Subsequent profile, model or observation changes do not rewrite the copied prediction. Existing plans without model metadata remain explicitly unknown. No prediction is invented when the user leaves the optional plan-leg selection blank.

Events are committed before they affect visible durable state. A new process changes a previously active trip to interrupted and requires explicit resume; it does not register location from a stale checkpoint. Pause/end reject late callbacks. Fix deduplication survives recording generations and process restart within the same Android boot; a new boot can restart the elapsed clock. The service also rejects fixes timestamped before the current recording interval, older than 30 seconds, out of order, invalid or worse than 100 m accuracy. Missing fixes produce an uncertain location status, not interpolated observations.

Mock-provider fixes permanently mark their trip synthetic. The controlled replay receiver exists only in debug builds, requires the shell/DUMP permission plus Android mock-location app-op, and requires a trip already marked synthetic. It is absent from release source sets.

Automated verification:

Physical-device evidence from controlled Android mock-provider replay:

Ignored runtime evidence: research/runtime/issue31-device.json. Synthetic database/profile changes, mock-provider registration/app-op and location permission are restored after testing. TECNO Android 11 cannot validate Android 13 notification denial or Android 14–15 foreground launch enforcement; SDK guards, manifest declarations and lint are covered, newer physical-device validation remains a platform limit.

Implementation references: foreground service launch, LocationManager API, and navigation lifecycle decision. Screen-off recording uses the same documented foreground-location permission model; navigation/TTS remains #32.