From 622c0b35a776765f1de0bdfd05095de8dedccbee Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Tue, 12 May 2026 17:58:09 -0500 Subject: [PATCH] [core] Document mtime check's package-edit limitation as YAGNI --- esphome/compiled_config.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/esphome/compiled_config.py b/esphome/compiled_config.py index 92cbb7348a..9de2143094 100644 --- a/esphome/compiled_config.py +++ b/esphome/compiled_config.py @@ -53,6 +53,14 @@ def load_compiled_config(conf_path: Path) -> ConfigType | None: Returns None (caller falls back to read_config) when the cache is missing, older than the source YAML, unparseable, or the sidecar is incomplete. + + Known limitation: the mtime check only stats the top-level YAML. + A package / !include / !secret edit that changes a CLI-side key + (e.g. wifi.use_address pinned to a manual IP) without re-touching + the main YAML or recompiling would keep the stale address in the + cache. Realistic workflows recompile when anything material + changes, so this is YAGNI -- revisit if someone actually trips + over it. """ cache_path = compiled_config_path(conf_path.name) if not _cache_is_fresh(cache_path, conf_path):