fix(memory): break transcript and flash compressor import cycle

This commit is contained in:
somew1nd committed 2026-09-01 17:54:17 -07:00
1 parent 0bcddbf1d7
commit 98ee55f5d2
1 file changed
+5 -1
+5 -1
View File
@@ -42,7 +42,6 @@ from typing import Any, Callable
from langchain_core.messages import BaseMessage, HumanMessage from langchain_core.messages import BaseMessage, HumanMessage
from artemis.agents.flash.context_compressor import ScrubEdgeCompressor
from artemis.memory.step_memory import StepMemoryService from artemis.memory.step_memory import StepMemoryService
from artemis.utils.logger import get_logger from artemis.utils.logger import get_logger
@@ -110,6 +109,11 @@ class TranscriptLedger:
# the key out of the serialized message payload entirely. # the key out of the serialized message payload entirely.
self._step_keys: dict[int, str] = {} self._step_keys: dict[int, str] = {}
# Imported here, not at module level: context_compressor imports
# artemis.memory.step_memory, so a top-level import forms a cycle
# whose failure depends on which side is imported first.
from artemis.agents.flash.context_compressor import ScrubEdgeCompressor
self._compressor = ScrubEdgeCompressor( self._compressor = ScrubEdgeCompressor(
summarizer=step_memory, summarizer=step_memory,
prune_history_xml=prune_history_xml, prune_history_xml=prune_history_xml,