v1.3.0 — Code-review fixes + architecture
v1.3.0 — Full code-review pass + architecture
Third full review (Opus, max effort). Closes 7 correctness findings + 6 architecture improvements.
Correctness
- TimeoutError no longer dead-ends setup — aiohttp's total-timeout raises
asyncio.TimeoutError(notClientError); it (and malformed-JSONValueError) are now caught, so a slow miner at startup retries instead of going toSETUP_ERROR. - Concurrent re-login is serialised — an
asyncio.Lock+ epoch counter means two simultaneous 401s produce a singlePOST /unlockinstead of duelling logins that can invalidate each other's token (false re-auth) on single-session firmware. x-api-keykept on login — a miner configured with both API key and password keeps the API-key fallback after a JWT login.- Malformed
/infocan't poison state —isinstanceguard rejects aNone/listpayload. - Switch & pool select no longer bounce — optimistic state is held until the miner's reported state catches up; the command is sent first so a failure surfaces and leaves state intact.
Architecture / improvements
- MAC-based device identity (collision-safe) — adopts the MAC as a stable, DHCP-resilient identity + connection, but only when it is unique across configured miners. Vnish firmware is known to clone identifiers (the reason v1.1.1 moved off the serial), so a cloned MAC falls back to the guaranteed-unique host IP — no device merge. Idempotent in-place device-registry migration preserves history.
- Pool select entity — exposes the previously unreachable
switch_poolas aselect. - Diagnostics — redacted config-entry diagnostics dump.
PARALLEL_UPDATES = 0on every platform (coordinator idiom).- Re-auth dead-end fixed —
assertreplaced with explicitasync_abort. - manifest —
integration_type: device,loggers, codeowner →@temandroid.
i18n / tests
select.pool+reauth_failedstrings (EN + RU);test_select.py.