- managed_keys owns the env var and file name, so the shared module no longer imports the add-on entrypoint; is_managed takes the loaded set instead of re-reading the file.
- One write_text_atomic() in ini_writer, used by update_ini_values and the add-on.
- as_bool uses configparser's BOOLEAN_STATES.
- Drop the app-level ManagedKeyError handler (every writer already handles it) and fold require_auth's early returns.
- Tests read config.yaml with PyYAML (added to the test extra) instead of a hand-written parser, and share setup helpers.
update_ini_values matches sections ignoring case, but the guard compared them exactly, so a write to [web_viewer] port slipped past a managed [Web_Viewer] port and still rewrote the real key. Both now share one section normalization.
- mypy is clean again (the CI typecheck job was red on new lines).
- The overlay's config backup goes to /data/backups/local, so it no longer overwrites the base config backup taken in the same second.
- One ha_ingress_enabled() helper; a malformed ha_ingress value counts as off instead of disabling the whole web viewer.
- An exception that escapes the bot (e.g. a BLE adapter error) now exits 1 too.
- The web manifest's icon paths are relative, so they resolve with or without a path prefix.
- The root-relative URL scan also catches .href/.src/.action assignments, EventSource, Worker, Audio, Image and io().
The add-on rewrites the keys it owns on every start, so editing them in the viewer would be silently undone. modules/managed_keys.py loads the list the add-on exports (MESHCORE_HA_MANAGED_KEYS) and guards writes in one place: ConfigIniStore.write_sections refuses to change or delete a managed key, and the viewer's other config.ini writers now go through that store instead of calling update_ini_values directly. The plugins page shows managed fields as disabled with "Managed by Home Assistant". With the variable unset, nothing changes.