File: src/state/cache_state.py:85-103
Per the in-code audit notes (M9):
fast_mode_header_latched is the only latch with a real integration (src/utils/fast_mode.py).
afk_mode_header_latched — dead-store; AFK toggle component not implemented.
cache_editing_header_latched — dead-store; no Python equivalent of TS's GrowthBook cache-editing treatment.
thinking_clear_latched — dead-store; src/utils/effort.py does not expose the thinking-flip-after-cache-miss event.
prompt_cache_1h_allowlist defaults to empty, so 1h caching is permanently dormant (only 5m caching works). Population was left to a future GrowthBook-integration WI.
Impact: Cache-telemetry headers under-report toggle activity vs the TS reference, and 1h prompt caching can never engage regardless of model/config.
Fix sketch: Wire each latch at its source event as the corresponding feature lands, and add a config-backed (non-GrowthBook) way to populate prompt_cache_1h_allowlist so 1h caching is reachable in the Python port.
File:
src/state/cache_state.py:85-103Per the in-code audit notes (M9):
fast_mode_header_latchedis the only latch with a real integration (src/utils/fast_mode.py).afk_mode_header_latched— dead-store; AFK toggle component not implemented.cache_editing_header_latched— dead-store; no Python equivalent of TS's GrowthBook cache-editing treatment.thinking_clear_latched— dead-store;src/utils/effort.pydoes not expose the thinking-flip-after-cache-miss event.prompt_cache_1h_allowlistdefaults to empty, so 1h caching is permanently dormant (only 5m caching works). Population was left to a future GrowthBook-integration WI.Impact: Cache-telemetry headers under-report toggle activity vs the TS reference, and 1h prompt caching can never engage regardless of model/config.
Fix sketch: Wire each latch at its source event as the corresponding feature lands, and add a config-backed (non-GrowthBook) way to populate
prompt_cache_1h_allowlistso 1h caching is reachable in the Python port.