Skip to content

Harden identity checks, quiet the log, clean up - #49

Merged
Varitras merged 32 commits into
mainfrom
fix/identity-and-logs
Nov 3, 2026
Merged

Varitras merged 32 commits into
mainfrom
fix/identity-and-logs

Conversation

@Varitras

@Varitras Varitras commented Nov 3, 2026

Copy link
Copy Markdown
Owner

Identity

  • An entry from the earlier cloud integration, made local with Reconfigure, now checks that the charger at its address is its own.
  • Reauthentication and Reconfigure check the known serial before sending a password, so another charger is named as such instead of a wrong password.

Log

  • Connections, refused passwords and stalled reconnect attempts are logged at debug level.
  • A defect that repeats per frame is warned about once per connection, with the line it failed at.
  • A charger that accepts the connection but never completes it is retried ever more slowly.

Other fixes

  • A firmware version the charger does not offer is refused before anything is written.
  • A failing disconnect no longer fails an unload.

Cleanup

  • The API definition is loaded once per process.
  • Unused client surface is gone, and comments and docstrings match the code.
  • Test and job time are bounded, and a guard keeps review IDs out of public files.

A finding ID points at notes the repository does not contain; the
reason belongs in the line itself.
The sentences around them already give the reason; where one leaned on
the ID, it now says what happened.
Leftovers from adopting the client, a wrong variant type, and comments
whose setters, sizes and timings had changed.
Also refuse a non-text value for a text property instead of converting
it with str().
The C loader parses it eight times faster; raw-message subscribers,
async property callbacks and six enums had no user.
The guard missed whole files and ID shapes, and took hyphenated MAC
addresses for IDs.
NOTICE says what became of utils and where connection.py came from;
the change markers go, as the client no longer marks changes.
An entry keyed on its serial but still marked as awaiting one (a cloud
entry made local by Reconfigure) kept the mark, so its client never
checked the charger's identity.
Reauth and Reconfigure probed without the entry's serial, so another
charger with another password was reported as a wrong password.
Each repeated per form probe, setup or reconnect cycle. A failing frame
warns once per connection and names the line it failed at; the backoff
starts over only once a connection got ready.
Any version named in the action was sent as is; with nothing on offer,
installing the latest sent the installed version.
A disconnect error at unload left the entry at FAILED_UNLOAD until a
restart. Setup and the form probe each swallowed it on their own; now
the shutdown itself logs it.
The timed check ran over its limit under mutation testing.
A failing value or property callback warned on every frame and blamed
the charger for an unreadable value; both catches now share the budget.
The flow tests ignored it, so a probe built with the wrong serial passed.
The rebuilt guard missed IDs with two digits, which its predecessor
caught, flagged common standard names and read files git ignores.
Also spare common standard names and leave files git ignores alone.
Taking the expected serial over for good let a second attempt against
the same other charger pass.
The frame's own catch warned just the same, so losing the per-value
isolation went unnoticed. Also tighten three descriptions.
An empty list passed the guard unread, the fake knew the serial before
hello, and a failing value was only tested in delta frames.
Addresses leave the line before the search, a one-digit number no longer
counts, and a failed listing says it needs a checkout. The fake knows no
serial until hello, as the client does.
@Varitras
Varitras merged commit 89da4cb into main Nov 3, 2026
8 checks passed
@Varitras
Varitras deleted the fix/identity-and-logs branch November 3, 2026 21: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