Files
yaris-obd/BUGS.md
T

101 lines
4.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# yaris-obd Bug Tracker
Standalone bug/issue tracker. One `## BUG-XX` per issue. Numbering sequential.
**Status**: `OPEN` → `IN PROGRESS` → `CLOSED` (with commit ref + verification).
When CLOSED, move the entire entry to Resolved — don't duplicate.
---
## Open bugs
### BUG-01 — WiFi/hotspot unreachable from phone while cell data is on
- **Status**: `OPEN`
- **Severity**: Medium
- **Area**: Networking / Pi hotspot (`yaris-uplink`, NetworkManager shared AP, docs)
- **Phase**: Phase 26
- **Symptom**: Phone on Pi's no-internet hotspot can't load the web UI while cell data is on.
Actual AP subnet is `10.112.0.x`, not the documented `10.42.0.1`.
- **Root cause**: Phone-OS "smart network switching" routes all traffic through cellular when
WiFi has no internet gateway. `yaris.local` mDNS not resolved from phone on Pi AP.
- **Fix scope**: Surface real DHCP address in UI. Extend `yaris.local` unicast to AP subnet.
Document cell-data limitation.
- **Acceptance**: Phone can load web UI via a correct documented address.
---
### BUG-02 — Micro-USB power port on the Pi is physically damaged
- **Status**: `OPEN`
- **Severity**: Hardware
- **Area**: Hardware / power
- **Phase**: Phase 26
- **Symptom**: Pi's micro-USB 5V connector is worn — unreliable under vibration.
- **Fix scope**: Owner hard-wires 5V/GND to GPIO header (pins 2/4 for 5V).
---
### BUG-06 — Server timestamps are shifted (naive local time stored as UTC)
- **Status**: `OPEN`
- **Severity**: High-ish
- **Area**: `modules/app_upload.py`, `server/sql`, `server/modules/db.py`, portal
- **Phase**: Phase 26
- **Symptom**: Server trip times shifted by EDT offset (~4-5h).
- **Root cause**: Pi sends naive local time; Postgres `TIMESTAMPTZ` interprets as UTC.
- **Fix scope**: Pi sends timezone-aware timestamps. Server stores/reads consistently.
One-time migration for existing rows — **get owner sign-off**.
- **Acceptance**: New data at correct local time; existing rows corrected or accepted.
---
### BUG-07 — Trip replay on portal sometimes does nothing
- **Status**: `OPEN`
- **Severity**: Low/Medium
- **Area**: `static/js/history.js`, server `/api/v1/portal/trip/<id>`
- **Phase**: Phase 26
- **Symptom**: Clicking a trip to replay intermittently does nothing — no route, no error.
- **Root cause**: Not isolated. Possible API/DB race, DB lock, map readiness.
- **Fix scope**: Add diagnostics. Add explicit error state.
- **Acceptance**: Replay reliable; failures show visible error.
---
## Resolved
### BUG-03 — DTC/MIL codes never persisted
- **Status**: `CLOSED` 2026-08-11
- **Commit**: `e2f2314`
- **Fix**: `save_dtc_state()` persists MIL+codes each poll. `/api/dtc` falls back to
`get_persisted_dtc_state()` when OBD offline. Cleared codes tracked via IS_SET timestamps.
- **Verification**: Deployed to Pi, `/api/dtc` returns persisted snapshot, stats show `active_dtc: 0`.
### BUG-04 — Server merges two trips into one
- **Status**: `CLOSED` 2026-08-11
- **Commit**: `96fb897`
- **Fix**: Replaced time-gap splitting with Pi's motion-aware logic: OBD > 1 km/h primary,
GPS >= 8m × 3 consecutive fallback, 5-min inactivity gap.
- **Verification**: Server trips cleared + recomputed. 17 trips on both Pi and server.
### BUG-05 — Server route replay speed_source always "gps"
- **Status**: `CLOSED` 2026-08-11
- **Commit**: `e2f2314`
- **Fix**: `"obd" if speed > 0 else "gps"` matching Pi logic.
- **Verification**: Docker rebuild, `/health` OK LAN + Cloudflare.
### BUG-08 — No trip deletion on local Pi
- **Status**: `CLOSED` 2026-08-11
- **Commit**: `c5c478b`
- **Fix**: `deletable` macro, `window.confirmDelete`, `DELETE /api/trip/<id>`, configurable
`data-delete-url` in shared `history.js`. Raw tracking preserved.
- **Verification**: Trip 1967 deleted (18→17 trips), 2028 tracking rows preserved.
### BUG-09 — Server trip scrubber geocoding is slow
- **Status**: `CLOSED` 2026-08-11
- **Fix**: `preloadGeocodes()` batch-fetches all unique coords (concurrency 4) on trip load.
`geocodePoint()` checks in-memory cache first.
- **Verification**: `preloadGeocodes` present in history.js on both Pi and server Docker container.
### BUG-10 — GPS-only false trips when car not connected
- **Status**: `CLOSED` 2026-08-11
- **Fix**: `_car_ever_connected` flag in `app_obd.py`. `build_trip_summaries()` returns
empty list when car was never connected.
- **Verification**: Pi bench-test shows 0 trips. No OBD = no GPS-only trips.