chore(proto): mirror app-recovered command-domain proto extensions#87
Merged
Conversation
added 2 commits
July 22, 2026 09:05
Additive-only, exact-tag extension of vehicle.proto, car_server.proto, vcsec.proto, common.proto, and managed_charging.proto, mirroring the same schema additions already merged into the api's src/proto/command/* (FSD usage stats + autopilot fields, and the wider comprehensive command-domain extension). Regenerated with protoc v32.0 per tools/regenerate_protos.sh to keep the gencode stamp at 6.32.0.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intent
Mirror the app-recovered command-domain proto extensions (already merged into the api via PR #246 FSD fields and PR #248 comprehensive command-domain extension) into python-tesla-fleet-api's proto/ files, so the python library's command-protocol schema matches the api's. Additive-only, exact-tag, backward-compatible changes to vehicle.proto, car_server.proto, vcsec.proto, common.proto, and managed_charging.proto: DriveState FSD usage-stats block, VehicleState autopilot fields plus the full legacy vehicle-state surface (GuiSettings, VehicleConfig, SohState, AlertState, LightShow*, VehicleImage*, SuspensionState, ChildPresenceDetectionState, VehicleDetailState, ParkedAccessoryState wired into VehicleData), new ChargeState/ClimateState/LocationState/ClosuresState/TirePressureState/MediaDetailState fields and enum members, new VehicleAction entries and their action messages, a structured SetRateTariffRequest body, ManagedCharging response types, and vcsec enum extensions. Verified per-message field-tag identity between api's src/proto/command/.proto and python's proto/.proto before applying (only one apparent conflict found, a false positive from an unrelated same-named message in a different file/package). Regenerated the _pb2/_pb2.pyi artifacts with protoc v32.0 (matching the repo's documented toolchain pin so gencode stays stamped at protobuf runtime 6.32.0 for Home Assistant compatibility) via tools/regenerate_protos.sh. Verified: full compile via protoc, pytest, ruff check, ruff format, and pyright all pass; a quick runtime smoke test exercised several of the new message fields.
What Changed
vehicle.proto,car_server.proto,vcsec.proto,common.proto, andmanaged_charging.protomirroring the app-recovered command-domain extensions (DriveState FSD usage-stats, VehicleState autopilot and legacy vehicle-state surface, new ChargeState/ClimateState/LocationState/ClosuresState/TirePressureState/MediaDetailState fields, new VehicleAction entries, structured SetRateTariffRequest, ManagedCharging response types, and vcsec enum extensions)._pb2.py/_pb2.pyigenerated artifacts viatools/regenerate_protos.sh(protoc v32.0) to keep gencode stamped at protobuf runtime 6.32.0 for Home Assistant compatibility.broadcast.py,AGENTS.md, anddocs/bluetooth_vehicles.mdto note that the newly syncedVehicleStatus.uiDesire/gearfields have no typedlisten_*method yet, only the untypedlisten_broadcastfallback.Risk Assessment
✅ Low: The change is proto-schema-only (plus regenerated gencode) with no application/command-logic code touched; all new fields are additive with no tag collisions (verified via a clean protoc compile across all five .proto files), the gencode is correctly stamped at runtime 6.32.0 matching the pyproject.toml floor and the HA compatibility requirement, and a runtime smoke import/instantiation of the new message fields (GuiSettings, VehicleState.autopilot_base) succeeded.
Testing
Ran the existing 371-test pytest suite (all pass, no regressions from the additive proto regen), compiled all five updated .proto files with protoc to confirm valid schema, and wrote a targeted runtime smoke test constructing/serializing/re-parsing messages across vehicle.proto, car_server.proto, vcsec.proto, common.proto, and managed_charging.proto - all 10 checks passed, confirming the mirrored command-domain schema is genuinely present and functional end-to-end, not just textually added.
/tmp/no-mistakes-evidence/01KY3EV61P95S8DVDTG5G1HXKA/protoc_compile.log)Evidence: Runtime smoke test source exercising new fields across vehicle.proto, car_server.proto, vcsec.proto, common.proto, managed_charging.proto
Evidence: Runtime smoke test output: 10/10 checks pass
[OK] DriveState FSD usage-stats round-trip [OK] VehicleData legacy vehicle-state surface wired [OK] ChargeState new enum members + new fields [OK] ClosuresState side-storage-door fields [OK] LocationState double-precision coordinate fields [OK] VehicleAction new entry setDischargeLimitAction round-trips [OK] SetRateTariffRequest is a structured message [OK] ManagedCharging ManageVehicleChargingResponse round-trip [OK] ManagedChargingAction wraps ManageVehicleChargingResponse [OK] vcsec.proto new enum members present All 10 smoke checks passed.Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
✅ **Test** - passed
✅ No issues found.
uv run pytest tests -q (371 passed, 16 subtests passed, no regressions)protoc --proto_path=proto --python_out=<tmp> proto/*.proto compiles all 5 updated .proto files with zero errorsCustom runtime smoke test constructing/serializing/parsing new fields across all 5 proto files (10/10 checks passed)git diff f686c92..0b1a365 reviewed per proto file to confirm additive-only, exact-tag changesgit status confirmed clean working tree before and after testingtesla_fleet_api/tesla/vehicle/broadcast.py:5- The proto sync added VehicleStatus.uiDesire and VehicleStatus.gear (vcsec.proto), which have no typed listen_ method - only the untyped listen_broadcast fallback covers them. Documentation (broadcast.py docstring, AGENTS.md, docs/bluetooth_vehicles.md) has been corrected in this pass to state this accurately, but the underlying functional gap (no listen_gear/listen_ui_desire) is unresolved and out of scope for a docs/lint-only pass - flagging as a follow-up.pyproject.toml:1- Three unrelated files fail ruff format (pre-existing, not caused by this proto-only change): tesla_fleet_api/tesla/bluetooth.py, tesla_fleet_api/tesla/vehicle/vehicle.py, and tesla_fleet_api/tessie/init.py. None of these are touched by this change (proto/*.proto and generated pb2 files only), so reformatting them here would inject an unrelated, out-of-scope diff. Left unfixed; worth a dedicated formatting cleanup commit.✅ **Push** - passed
✅ No issues found.