mirror of
https://github.com/headroomlabs-ai/headroom.git
synced 2026-08-10 14:27:00 -04:00
fix(read-lifecycle): persist STALE Read originals in the CCR store
ContentRouter.transform instantiated ReadLifecycleManager with
compression_store=kwargs.get("compression_store"), but no caller ever
sets that kwarg. self.store was therefore always None, so STALE/SUPERSEDED
Read markers were emitted with a SHA-256 hash but the original content
was never stored — headroom_retrieve(hash) 404'd on every Read marker,
breaking the CCR contract for the common Claude Code flow (read a file,
edit it, then want the prior content back).
Fall back to get_compression_store() when no store is explicitly injected,
matching how SmartCrusher, Kompress, and the search/log/diff/code
compressors already resolve theirs. The kwargs injection point is kept so
explicit overrides still work.
This commit is contained in:
parent
c632023cc1
commit
dde424783f
1 changed files with 2 additions and 1 deletions
|
|
@ -2417,11 +2417,12 @@ class ContentRouter(Transform):
|
|||
"""
|
||||
# Pre-process: Read lifecycle management (stale/superseded detection)
|
||||
if self.config.read_lifecycle.enabled:
|
||||
from ..cache.compression_store import get_compression_store
|
||||
from .read_lifecycle import ReadLifecycleManager
|
||||
|
||||
lifecycle_mgr = ReadLifecycleManager(
|
||||
self.config.read_lifecycle,
|
||||
compression_store=kwargs.get("compression_store"),
|
||||
compression_store=kwargs.get("compression_store") or get_compression_store(),
|
||||
)
|
||||
lifecycle_result = lifecycle_mgr.apply(
|
||||
messages,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue