feat(bmw-cardata): add bmw-cardata#1417
Conversation
|
@greptileai review Auto-nudge from |
Greptile SummaryThis PR introduces
Confidence Score: 4/5Safe to merge; no P0/P1 defects — only two P2 findings that degrade UX in edge cases without corrupting data. All three previously flagged issues were resolved in commit 171f02f. Two new P2 findings remain: dead /usr/bin LookPath checks on Windows in openBrowser (harmless fallback always fires), and RFC3339-only gap detection in segmentTrips that silently merges all breadcrumbs into one trip if BMW returns non-RFC3339 location timestamps. Neither causes data corruption or auth failures. library/devices/bmw-cardata/internal/cli/trips.go (RFC3339 gap-detection assumption), library/devices/bmw-cardata/internal/cli/auth_login.go (dead LookPath on Windows) Important Files Changed
Reviews (2): Last reviewed commit: "fix(bmw-cardata): address 3 Greptile P2 ..." | Re-trigger Greptile |
1. auth_login.go: openBrowser is now cross-platform (darwin/open, linux/xdg-open, windows/cmd /c start) and surfaces launch errors to stderr instead of silently dropping them. 2. trips.go: guard against bogus trip durations on RFC3339 parse failure (emit duration=null plus a duration_parse_error string correlating with the raw start_at / end_at). 3. store/extras.go: switched the telematic dedup unique index to COALESCE(ts, fetched_at) so NULL-ts rows (descriptors where BMW doesn't return a timestamp) are also deduped by fetched_at; drops the old ts-only index if present. Recored in .printing-press-patches/bmw-cardata-greptile-round-fixes.json.
|
@greptileai review Auto-nudge from |
bmw-cardata
Your BMW's telemetry, on the command line — device-code login, live telematic snapshots, charging history, and a local SQLite store that turns raw VSS data into trends, cost, and fleet insight no other tool gives you.
API: bmw-cardata | Category: devices | Press version: 4.24.0
Spec: BMW CarData REST + OAuth Device Code Flow (downloaded as static OpenAPI assets; spec_format openapi3)
Publication Path
New print — first public release of the bmw-cardata CLI.
CLI Shape
Novel Commands
soc-trendscharging-costquotafleet statusdescriptors searchbattery-healthvehicles difftripsWhat This CLI Does
BMW CarData is the official, free-for-personal-use API for your own vehicle data. This CLI handles the OAuth device-code onboarding, fetches live telematic snapshots, charging history and tyre diagnosis, then keeps it all in SQLite so you can chart SoC trends (soc-trends), reconcile charging cost against your tariff (charging-cost), and see every vehicle at once (fleet status).
The recommended path installs both the
bmw-cardata-pp-clibinary and thepp-bmw-cardataagent skill in one shot:Manuscripts
Validation Results
Publish Live Gate — Documented Override
The publish-time live gate (
dogfood --live, 84 tests) returned 5 failures, none of which are CLI defects. The user authorized proceeding with these documented as environmental/framework issues:sync(json_fidelity): exit 1, HTTP 429 "API rate limit reached" (CU-429)customers get-container-details(happy_path + json_fidelity): exit 5, HTTP 400 "containerId must be 13 characters"descriptors search(error_path): expected non-zero exittail(error_path): expected non-zero exittailcommand prints a warning and exits 0 when the initial fetch returns 4xx. The runner expects non-zero; the generator emits warn-and-continue. Generator contract gap.The earlier Phase 5 full live dogfood (run during generation, before the rate limit was hit) was 12/12 PASS against the real BMW CarData API end-to-end (auth login, get-mappings, get-basic-data, get-telematic-data, write-through to SQLite, and soc-trends/fleet/quota all returned real vehicle data for a BMW X1 xDrive25e PHEV). The publish-time re-run failed on the 4 environmental/framework issues above, not on regressions. The
phase5-acceptance.jsonshipped here represents that validated 12/12 result. Per the user's explicit operator decision, this PR proceeds.Customizations
.printing-press-patches/bmw-cardata-publish-polish-examples-and-vin-validation.json— publish-session polish: realisticExample:blocks on the 8 transcendence commands + VIN format validation (17 chars, no I/O/Q) so the dogfood error_path probe returns non-zero on malformed VINs.Security
fmt.SprintfSQL in the printer-emittedinternal/store/store.gois gated byvalidIdentifierREvalidation at function entry.?placeholders; MQTT usestls.DialTLS 1.2+; session sidecar at0o600.