This file is the project's committed home for project-intrinsic agent knowledge: build, test, release, architecture, and sharp-edge notes that should travel with the code.
- Add durable project-specific notes here as they are discovered through real work.
- CI runs on push/PR:
.github/workflows/ci.yml. Usesuv(seeuv.lock). tests/files are plain scripts (if __name__ == "__main__"), not pytest-based - pytest would collect zero tests here. Run each directly, e.g.uv run python tests/test_field_type_coercion.py.pyproject.tomlhas a[tool.mypy]config but no dev-dependency group declares mypy, souv syncalone won't install it. CI installs it ephemerally viauv run --with mypy mypy teslemetry_stream.Signalinconst.pytracks https://api.teslemetry.com/fields.json; the config route rejects names it does not know withfst_err_validation. Fields the API has retired are not rejected - it accepts the request and names them in a top-levelignoredFieldslist - so the library can lag the published list without breaking.- Config responses are shaped inconsistently: success is flat,
{"updated_vehicles": n}plusignoredFieldswhen some were dropped, while errors are wrapped,{"response": null, "error": ...}. Do not look forupdated_vehiclesunderresponse; that lookup silently never matches. update_configfunnels every caller through one per-vehicle single-flight flush (TeslemetryStreamVehicle._flush): the first caller starts it, later callers merge into the same pending config and await it rather than starting their own PATCH. This exists because a batch of listeners scheduled at once (e.g. HA integration setup) must produce one PATCH, not one per listener - seetests/test_batch_retry_storm.py. A body-shaped error ({"error": ...}) is terminal for that batch: it is not replayed, but the pending config is kept for the next explicitupdate_configcall. A transport-level failure (aiohttp.ClientError/timeout) gets one bounded retry inside the same flush.tests/test_config_update.pycovers the response-shape handling.
Keep this file for knowledge useful to almost every future agent session in this project. Do not repeat what the codebase already shows; point to the authoritative file or command instead. Prefer rewriting or pruning existing entries over appending new ones. When updating this file, preserve this bar for all agents and keep entries concise.