Dokumen ini mencatat tahap implementasi pada versi yang disebutkan. Untuk status akhir seluruh fitur, baca audit implementasi.
#27 — versioned single-leg energy prediction
Validated 2026-09-19 on physical TECNO KF8, Android build 0.6.0-energy.
createJourney now owns profile reads, single-leg prediction and the independent prediction archive. The calculation is a minimal extraction of the earlier Python consumption() experiment, not a calibrated vehicle model. Version scenario-1 uses 0.75 pp/km from the reported solo Pantura baseline, plus assumed 4 pp/100 m ascent, assumed 180 kg motorcycle mass for payload scaling, nominal-capacity scaling and a 20% conservative margin. Reference capacity is aligned to the selected Smart profile's 5.38 kWh nominal value. There is no regeneration credit. These assumptions, payload, sampled ascent/descent and model version are displayed and persisted.
Departure SOC comes unchanged from the saved manual observation with its timestamp. The action explicitly uses that last observation and tells the rider to confirm it still matches the motor. Predictions never overwrite observations. Profile changes clear the displayed estimate. Arrival below zero is represented as unreachable plus energy deficit, not clamped into a feasible SOC. Exactly 20% fails the strict reserve rule; a value just above it is not rounded into an apparently equal threshold in the UI.
Missing/malformed elevation returns unavailable, distinct from a calculated route failing reserve. Samples must start at distance zero and span within 10% of the declared route distance; this tolerance allows sampled chord distance to differ from full road distance. This is a coverage check, not evidence that terrain or coefficients are calibrated.
Prediction documents contain unique ID, timestamp, captured profile/manual SOC, route endpoints/source/retrieval time, model assumptions, consumption in pp, physical arrival values or deficit, and reserve result. Fixed native document storage reuses the already tested atomic writer; filenames are chosen by native code, never supplied through JavaScript. Failed archive writes do not claim success. Predicted records remain distinct from future actual trip observations.
Verification:
- 27 Node tests pass: 65−60=5, exact/above reserve, unavailable and partial/null elevation, no downhill energy credit, payload/ascent changes, immutable prediction versions and storage failure.
- Android native tests (2), assemble and lint pass. Existing inset API deprecation warnings remain.
- TECNO used a live provider route from the map-selected Slawi origin to an explicitly selected Pemalang search result and synthetic manual starting SOC 65%. UI showed middle consumption 64.2 pp, conservative 77.0 pp, middle arrival 0.84%, conservative unreachable and 12.0 pp deficit. These are scenario outputs, not measured riding consumption.
- Force-stop/restart preserved the same prediction ID; the saved manual SOC stayed 65%. Temporary test profile/prediction data were restored afterward. Ignored detailed evidence:
research/runtime/issue27-device.json. - Standards and spec reviews resolved; coverage/null-sample validation and near-threshold display were corrected.
Charge-stop planning, reduced reserve exceptions, actual trip recording and calibration are subsequent tickets. This ticket does not turn a passing scenario into a verified travel guarantee.