feat(web): Core Refactor Phase A — extract sampling and cache modules; add adaptive TTL + eviction heuristics, Redis PoC, and metrics wiring. Tests added for TTL, eviction, exports, splash-adaptive, card index, and service worker. Docs+roadmap updated.

This commit is contained in:
matt 2025-09-24 13:57:23 -07:00
parent c4a7fc48ea
commit a029d430c5
49 changed files with 3889 additions and 701 deletions

View file

@ -69,4 +69,7 @@ def test_warm_index_latency_reduction():
get_theme_preview('Blink', limit=6)
warm = time.time() - t1
# Warm path should generally be faster; allow flakiness with generous factor
# If cold time is extremely small (timer resolution), skip strict assertion
if cold < 0.0005: # <0.5ms treat as indistinguishable; skip to avoid flaky failure
return
assert warm <= cold * 1.2, f"Expected warm path faster or near equal (cold={cold}, warm={warm})"