Commit Graph
2 Commits
Author SHA1 Message Date
Vito Sansevero 88e44bb068 fix(lora): treat an offline Windows share as unvalidated and make cache tests portable (#362)
Review findings on phase 1: Windows raises FileNotFoundError with winerror
53/67 for an offline share, which is a temporary failure, not a missing file.
Test times are whole milliseconds (NTFS keeps 100 ns steps) and a file system
that rounds them skips; cleanup no longer ignores errors; tests added for
ValueError, NotADirectoryError, a failed reload, resolve failures and the
watched-file set.
2026-10-26 22:46:53 -07:00
Vito Sansevero 9a03766090 feat(lora): cache LoraManager's layout behind file signatures (#362, phase 1)
A new py/lora_layout_cache.py keeps one (install, layout) entry and reuses it
while the configured path, the plugin settings file's and the settings file's
signatures (st_mtime_ns, st_size), the install and every media root's real
path are unchanged and the entry is younger than 30 s. A load whose watched
file changed within 3 s (git's racy rule), could not be checked, or whose
settings were unreadable serves its request only. clear() bumps a generation
so a load that started earlier stores nothing. Hits take no lock.

Not wired yet; phase 2 puts it behind the image hot paths.
2026-10-26 22:36:15 -07:00