Skip to content

docs: correct AGENTS.md lint, release and config-refusal entries; drop stale test map - #65

Merged
Bre77 merged 1 commit into
mainfrom
fm/agentsmd-hist-python-teslemetry-stream
Nov 3, 2026
Merged

Bre77 merged 1 commit into
mainfrom
fm/agentsmd-hist-python-teslemetry-stream

Conversation

@Bre77

@Bre77 Bre77 commented Nov 3, 2026

Copy link
Copy Markdown
Member

This PR updates AGENTS.md using the five worker sessions on this repository since 2026-10-03 (two releases, the listen_WallConnectorTotals feature, the per-door null guard, the CodeRabbit opt-in, and the streaming-allowance refusal fix). Each entry below was checked against the code at main. No code changes.

Removal: the "Test map" section. It maps areas to test file names, which ls tests/ and each file's docstring already show. It had also gone stale: 6 of the 21 test files were missing (test_active_route.py, test_charger_power.py, test_connect_failure_notifies.py, test_door_state_null.py, test_no_token_in_logs.py, test_tpms_warnings.py), and its test_listen_early_exit.py row said ERROR, but listen() logs a WARNING (stream.py). No session used it. Each session found its tests with ls or grep.

Removal (part of the energy_totals entry): the EnergyTotalsEvent field list, the date pass-through rationale and the 0-versus-None semantics of EnergyHistoryTotals. The EnergyHistoryTotals and listen_EnergyTotals docstrings already state these, and the README covers the same ground.

Addition: lint checks only teslemetry_stream/. tests/ has existing ruff errors, and ruff format is not enforced. Evidence: 3 sessions. Two ran ruff check over tests/, got errors in files they had not touched (for example test_field_type_coercion.py), and had to pick out their own errors before narrowing the command. The third found that ruff format --check fails on the committed vehicle.py and checked the parent commit to show that the failure was there before its change. Verified at main: ruff check tests reports 3 errors, and ruff format --check teslemetry_stream would reformat 5 files.

Addition (release entry): a release is its own PR that changes version in pyproject.toml and in the teslemetry-stream entry of uv.lock, with no changelog. The tag goes on that PR's merge commit. Evidence: 2 sessions (the 1.3.0 and 1.3.1 releases). Each grepped for the old version string to find where it lives, and the second rebuilt the steps from the previous bump commit.

Correction (vehicle config): the entry said that the pending config always survives a body-shaped error. Since the streaming-allowance change, _flush clears the pending config on streaming_allowance_exceeded and passes every body-shaped error to listen_config_refused callbacks. The session that made that change did not update this entry, so the entry no longer matched the code.

Correction (energy sites): the entry said to filter energy_totals on id and totals. wall_connector_totals now shares that envelope. A dispatched event carries no SSE topic name, so id and totals match both topics, and the two listeners tell them apart only by the totals keys (is_energy_totals() in const.py). Evidence: 1 session (the wall-connector feature) found that without this check listen_EnergyTotals would turn a wall-connector event into an all-None EnergyHistoryTotals. This is a correction of a wrong entry, not an addition from one incident.

@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Walkthrough

AGENTS.md updates test linting and release guidance. It also clarifies vehicle configuration refusal handling and revises energy totals guidance to cover two totals topics.

Changes: Agent guidance

Layer / File(s) Summary
Test and release guidance
AGENTS.md
The guidance now says to lint changed test files without reformatting untouched code. Release version changes are limited to pyproject.toml and the project entry in uv.lock, followed by tagging the merged release PR commit.
Vehicle configuration and energy totals guidance
AGENTS.md
The guidance says body-shaped config errors go to every listen_config_refused callback and are not replayed. Pending config is retained except for streaming_allowance_exceeded, which clears it. Energy totals guidance now covers both totals topics and their shared envelope. It removes prior details about date interpretation, listener event types, and cumulative totals field values.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Other

Possibly related PRs

Merge Risk: Minimal · up to 87d59

This documentation-only change introduces no established implementation or release risk and is ready to merge.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title clearly describes the documentation updates to lint, release, and config-refusal guidance, as well as removal of stale test-map content.
Description check Passed The description directly explains the AGENTS.md updates, removed stale guidance, and corrected repository practices. It is detailed and related to the changeset.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)

Finishing Touches
Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.
Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between b2a5e17 and 87d59b6.

Files selected for processing: 1
  • AGENTS.md

Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

@Bre77
Bre77 merged commit 99db884 into main Nov 3, 2026
15 checks passed
@Bre77
Bre77 deleted the fm/agentsmd-hist-python-teslemetry-stream branch November 3, 2026 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant