hass.tibber_prices/custom_components/tibber_prices/interval_pool
Julian Pawlowski ebcb9cfe77 fix(interval_pool): rebuild index after dead interval cleanup without empty groups
Cherry-pick of v0.30.1 hotfix (ec3bc9f). When _cleanup_dead_intervals
compacted group lists but no groups became fully empty, the index retained
stale interval_index values pointing past compacted list ends, causing
IndexError in _get_cached_intervals.

Now rebuilds the index whenever dead intervals are removed, even if no
groups are deleted.

Includes regression test for Issue #118 and updated touch operation tests
to reflect that GC now runs immediately after touch-only paths.

Closes #118

Impact: Eliminates IndexError crash for users with brand-new Tibber accounts
that have limited price history, where partial group compaction was most likely.
2026-04-17 12:00:37 +00:00
..
__init__.py feat(interval-pool): add intelligent interval caching and memory optimization 2025-11-25 20:44:39 +00:00
cache.py fix(services): use injected now in resolve_search_range day offset 2026-04-14 19:33:24 +00:00
fetcher.py fix(services): use injected now in resolve_search_range day offset 2026-04-14 19:33:24 +00:00
garbage_collector.py fix(interval_pool): rebuild index after dead interval cleanup without empty groups 2026-04-17 12:00:37 +00:00
index.py refactor(interval_pool): improve reliability and test coverage 2025-12-23 10:10:35 +00:00
manager.py fix(services): use injected now in resolve_search_range day offset 2026-04-14 19:33:24 +00:00
routing.py fix(services): use injected now in resolve_search_range day offset 2026-04-14 19:33:24 +00:00
storage.py feat(interval-pool): add intelligent interval caching and memory optimization 2025-11-25 20:44:39 +00:00